Stateflow | ![]() ![]() |
Cyclic Behavior to Avoid with Condition Actions Example
This example shows a notation to avoid when using event broadcasts as condition actions because the semantics result in cyclic behavior.
Initially the Stateflow diagram is asleep. State On
is active. 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:
E_one
.
E_one
is detected on the valid transition, which is immediately executed. State On
is still active.
E_one
awakens the Stateflow diagram a second time.
Step 1 to 5 continue to execute in a cyclical manner. The transition label indicating a trigger on the same event as the condition action broadcast event results in unrecoverable cyclic behavior. This sequence never completes when event E_one
is broadcast and state On
is active.
![]() | Condition Actions to Broadcast Events to Parallel (AND) States Example | Default Transition Examples | ![]() |