Module 10- State Machine Part 2 Flashcards
difference between events and behaviors
- an event occurs at a discrete moment in time ** has no duration**
- a behavior has duration
relationship between them
- when an event occurs it may trigger the event of a behavior then that executes over a period of time
and while a behavior executes it may ______________
generate new event occurrences that might kick off more behaviors
Four kinds of events
- signal event
- call event
- change event … keyword “when”
- time _____
time event
and how they can be used as triggers in transitions ??
at - absolute time event
after - discrete time event after 2mins
review from activity diagram .. accept event action . This waits for an event to occur in the event pool. Then it consumes the event and moves on to the next step.
an accept event action could have any event as a trigger
signal , call , _________or time event
change
signal event- reception - signal
call change event- operation - parameter list
big idea .. the signal event … call event .. change event … or time events can be used as a _____ on transitions in a state machine
trigger
a signal event trigger corresponds to a ____
reception
the reception is owned by the block that owns that state machine behavior
signal event trigger matches the reception owned by the block that _________
owns that state machine behavior
problem is the STM doesn’t show the owning block you would have to dig into the model . Solution - go into the block that owns that state machine behavior.. double check if that block owns that reception .. which receptions owns signals
thats the only way to know which block owns that signal event
what would you wait for to know that a signal event has been triggered ?
an arrival of the ____________
signal .
signal event triggers must correspond to the signal owned by the block
note a signal can own properties / attributes. the matching reception would have parameters.
what does a classifier behavior mean = owned behavior of that element
the classifier behavior is assigned by the user to begin ___________
automatically
remember that only receptions can own signals
there must be «signal»
change event triggers begin with when and boolean expression in
parenthesis
a call event trigger corresponds to an OPERATION owned by the blocked that owns the ________ behavior
signal event trigger corresponds to a RECEPTION owned by the blocked that owns the ________ behavior
state machine
Operation and receptions are _________features that that block can perform when called to do so
behavioral
This example shows a call event on a trigger which can only represent a
operation
two kinds of time event
1. relative time event - begins with After 2 mins
2. absolute time event - begins with
at 12:00pm PST
how do relative and absolute time events work in a state machine ?
when would this transition fire ?
1. if the state machine is in the state Hav Comm link
the log system status
if the state machine is at rest and is in another state the time event runs at the specific time but that event gets consumed and nothing gets triggered .