Download presentation
Presentation is loading. Please wait.
Published byLorena Clark Modified over 9 years ago
1
Real Time Systems Advanced State Machines
2
Behaviour (part 2) - 2 Outline Simple and Composite States Transition Segments and Junction Points Run-to-Completion Group Transitions and History Self & Internal Transitions Exercise
3
Behaviour (part 2) - 3 Simple and Composite States composite simple external view ??
4
Behaviour (part 2) - 4 Simple and Composite States internal view What triggers these transitions?
5
Behaviour (part 2) - 5 Transition Segments transition segments => a transition chain single trigger State?
6
Behaviour (part 2) - 6 Junction Points - 2 types Termination (history) extension
7
Behaviour (part 2) - 7 Design Tip: Unnamed Transitions / Segments Do not leave these “unnamed” transitions in your models!!!
8
Behaviour (part 2) - 8 Run-to Completion a capsule exhibits run-to-completion semantics: meaning that a capsule will not be interrupted by the run-time services library while it is executing a run-to-completion step. when a message is received by a capsule, the entire transition chain executes (before another message is delivered); data sent with a message is only accessible until the end of the run-to completion a local copy must be made to preserve the data
9
Behaviour (part 2) - 9 Run-to Completion consider event “done” while in sub-state “paint”. what is the sequence of execution code? “Workstation” state“producing” sub-state
10
Behaviour (part 2) - 10 Group Transitions transitions from hierarchical states that are common to all sub-states example: “error” while in the sub-state “paint” what is the sequence of execution code?
11
Behaviour (part 2) - 11 History (*deep) the deepest sub-state when the containing state was last active. example: “reset” what is the sequence of execution code ?
12
Behaviour (part 2) - 12 Self-transition a transition “out-of” and “back-into” a state what are the consequences of getting a status message while in the “paint” sub-state?
13
Behaviour (part 2) - 13 Internal-transition a self-transition which never exits the state does not fire all entry / exit code up & down the state hierarchy; example: the new “status” transition
14
Behaviour (part 2) - 14 Behaviour Exercise – part 1 Go to the RoseRT on-line Help Complete the animated Concept Tutorial entitled: Capsule Hierarchical State Machines {if you have not already done so}
15
Behaviour (part 2) - 15 Behaviour Exercise – part 2 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
16
Behaviour (part 2) - 16 Television Satellite Receiver – Top State changeChannel,
17
Behaviour (part 2) - 17 Television Satellite Receiver – Operate Sub-state
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.