| Stateflow | ![]() |
Self-Loop Transition Example
This example shows the behavior of a self-loop transition using a connective junction.
Initially the Stateflow diagram is asleep. State A is active. Event E_one occurs and awakens the Stateflow diagram. Condition [C_one] is false. 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 segment from state A to the connective junction. The transition segment labeled with a condition and action is evaluated for validity. Because the condition [C_one] is not valid, the complete transition from state A to state B is not valid. The transition segment from the connective junction back to state A is valid.
A exit actions (exitA()) execute and complete.
A is marked inactive.
A_two is executed and completed.
A is marked active.
A entry actions (entA()) execute and complete.
This sequence completes the execution of this Stateflow diagram associated with event E_one.
| If-Then-Else Decision Construct Example | For Loop Construct Example | ![]() |