Stateflow | ![]() ![]() |
State Execution Example
The following example demonstrates the execution semantics (behavior) of event reactive behavior by active and inactive states.
Inactive Diagram Event Reaction
Initially the Stateflow diagram and its states are inactive. This is the semantic sequence that follows an event:
A
is marked active.
A
entry actions (entA()
) execute and complete.
Sleeping Diagram Event Reaction
The Stateflow diagram is now asleep and waiting to be awakened by another event.
E_one
. A valid transition is detected from state A
to state B
.
A
exit actions (exitA()
) execute and complete.
A
is marked inactive.
B
is marked active.
B
entry actions (entB()
) execute and complete.
![]() | Exiting an Active State | Early Return Logic for Event Broadcasts | ![]() |