Upload
betty-sutton
View
214
Download
1
Embed Size (px)
Citation preview
Real Time Systems
BehaviourExercise Solution
Behaviour Exercise - 2
Exercise
Refer to the following 2 state diagrams: Television Satellite Receiver – Top State Television Satellite Receiver – Operate Sub-state
Assume that initially you are in the Locked sub-state. After that follow the state machine wherever the transition chains take you: doDiagnostics followed by changeChannel followed by orderMovie followed by status followed by diag_timeout signal;
assume EvaluateTest = false
Behaviour Exercise - 3
Television Satellite Receiver – Top State
changeChannel,
Behaviour Exercise - 4
Television Satellite Receiver – Operate Sub-state
Behaviour Exercise - 5
Exercise - solution
Assume that initially you are in the Locked sub-state. After that follow the state machine wherever the transition chains take you: doDiagnostics
doDiagnostics enter Diagnostic *end in Diagnostic
followed by changeChannel ignoreSignals *end in Diagnostic
Behaviour Exercise - 6
Exercise - solution
followed by orderMovie exit Diagnostic deferMovie enter Diagnostic *end in Diagnostic
followed by status exit Diagnostic exit Operate Status enter Diagnostic *end in Diagnostic
Behaviour Exercise - 7
Exercise - solution
followed by diag_timeout signal; {assume EvaluateTest = false} exit Diagnostic EvaluateTest (return false) False Exit Operate failedDiagnostics Enter Failed