Stateflow | ![]() ![]() |
Condition and Transition Actions Example
This example shows the behavior of a simple condition and transition action specified on a transition from one exclusive (OR) state to another.
Initially the Stateflow diagram is asleep. State A
is active. Event E_one
occurs and awakens the Stateflow diagram. Condition C_one
is true. Event E_one
is processed from the root of the Stateflow diagram down through the hierarchy of the Stateflow diagram:
E_one
. A valid transition from state A
to state B
is detected. The condition C_one
is true. The condition action A_one
is detected on the valid transition and is immediately executed and completed. State A
is still active.
A
exit actions (ExitA()
)
execute and complete.
A
is marked inactive.
A_two
is executed and completed.
B
is marked active.
B
entry actions (entB()
) execute and complete.
This sequence completes the execution of this Stateflow diagram associated with event E_one
when state A
is initially active.
![]() | Condition Action Example | Condition Actions in For Loop Construct Example | ![]() |