Module 9 - State Machine Part 1 Flashcards
state machines define the behavior of a system . a state machine diagram provides a view of a state machine behavior.
three kinds of behaviors are
state machine shows up on a STM
activity shows up ACT
interaction shows up SD
weakness of activity diagram ?
cannot answer which ____ invokes that action
structure
swimlane tells reader which structure performs the action
1 not an intuitive diagram
weakness of a sequence diagram ?
#2 harder for people to understand who are not familiar with sysml
#3
3 cannot model an idea to wait before an event is occuring
weakness of a state machine diagram
its the most specific behavior .. it defines a set of states and transitions between states as events occurs . BUT not every object falls in line with a state machine diagram
an owned behavior is a behavior under a block within your model.
a single block can have multiple behaviors nested
under it
classifier behavior
classifier behavior = owned behavior . the attitude control state machine is nested under the block
a classifier behavior is a special role that the behavior plays in the owning block
the behavior that you select to be the classifier behavior for a given block is the behavior that will begin executing ___________ when the block is instantiated
automatically
two top level categories of elements that a state machine can own
Vertices
Transitions
which are vertices in this diagram ?
orbit insertions
knowledge check
two kinds of vertices
1) states
2) pseudo states
and two kinds of transitions
1) external transitions
2)
internal transitions
when is an internal tranistion
three common kinds of states
1) simple state
2)
3) final state
4) submachine state ( not covered in the course) but its how you represent a nested state machine inside a state machine
composite state
two common pseudo states
1) junction pseudo state
2) ______ pseudo state
initial
state machines can have multiple _____ represented by dashed lines
regions. Each region must have at least one active state in a region.
a state machine may transition from one event to another one when an event occurs.
what are the names of the events in this state machine ? when an event occurs a transition may fire resulting in a change in a state.
guard must be true when the event occurs in order for an transition to fire.
startup Event
Shutdown Event
focus on the may if a sensor is in the offline state and a startup event occurs . might happen that powerAvailable == False.
“at rest” in a state means the state is looking at the event pool waiting for the state to
occur
what happens when an event occurs in a state machine ?
it begins by going to that owning ___________ event pool .
object
The state machine consumes that event pool occurrence . at the moment of consuming an event pool the guard gets evaluated
what happens when an outgoing transition fires ?
The run to completion STEP is
#1 Do behavior is terminated
#2 then the run to completion step _____
#3 exit behaviors run and cannot be interrupted
#4 Transition effect behavior cannot be interrupted.
#6 then the next entry behavior is guaranteed to finish
and the state machine is not at rest and is not looking into the event pool.
begins
Transition effect behaviors is
when a run to completion step is executing the state machine behavior is not at rest . Its not looking a the owning objects ____ ______
event pool.
a state machine is at rest and a trigger event occurs for a transition coming out of a different state
ORBIT INSERTION STATE – what is the run to complete step ( sequence )
1. the STM begins executing and there is a run to completion step in the beginning of the STM.
2. Fire thruster transition executes
3. (entry behavior ) Read Temp executes
the state machine is not at ____while the run to completion step is running
rest
ORBIT INSERTION STATE goes into rest behavior and then what behavior executes ?
Do behavior - Execute Spin Stabalization
when does a state look at the event pool ?
only when the state is at rest.
when does a Do behavior get interrupted ?
when a transition gets fired/begins .
the STM has a run to completion step when it executes so the STM is not at rest.
1. entry executes
4. STM is at rest and look at that event pool
2. do
3. exit
sometime later a transfer complete event occurs. the STM is at rest but it detects a new trigger happened and all of the guards get evaluated.
whichever guard is true determine which will
note : another transition is coming out of the orbit insertion state
fire