Stateflow | ![]() ![]() |
Transitioning from a Substate to a Substate with Events Example
This example shows the behavior of a transition from an OR substate to an OR substate.
Initially the Stateflow diagram is asleep. State A
.A1
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
. There is a valid transition from state A
.A1
to state B
.B1
. (Condition C_one
is true.)
A
during actions (durA()
) execute and complete.
A
.A1
exit actions (exitA1()
) execute and complete.
A
.A1
is marked inactive.
A
exit actions (exitA()
) execute and complete.
A
is marked inactive.
A
, is executed and completed.
B
is marked active.
B
entry actions (entB()
) execute and complete.
B
.B1
is marked active.
B
.B1
entry actions (entB1()
) execute and complete.
This sequence completes the execution of this Stateflow diagram associated with event E_one
.
![]() | Transitioning from State to State with Events Example | Condition Action Examples | ![]() |