Stateflow | ![]() ![]() |
Default Transition and a History Junction Example
This example shows the behavior of a superstate with a default transition and a history junction.
Initially the Stateflow diagram is asleep. State A
is active. There is a history junction and state B4
was the last active substate of superstate B
. Event E_one
occurs and awakens the Stateflow diagram. Event E_one
is processed from the root of the Stateflow diagram down through the hierarchy of the Stateflow diagram:
A
exit actions (exitA()
) execute and complete.
A
is marked inactive.
B
is marked active.
B
entry actions (entB()
) execute and complete.
B
uses the history junction to determine the substate destination of the transition into the superstate.
B
.B4
was the last active substate, which becomes the destination of the transition.
B
.B4
is marked active.
B
.B4
entry actions (entB4()
) execute and complete.
This sequence completes the execution of this Stateflow diagram associated with event E_one
.
![]() | Default Transition to a Junction Example | Labeled Default Transitions Example | ![]() |