Stateflow    

Labeled Default Transitions Example

This example shows the use of a default transition with a label.

Initially the Stateflow diagram is asleep. State A is active. Event E_one occurs, awakening the Stateflow diagram. Event E_one is processed from the root of the Stateflow diagram down through the hierarchy of the Stateflow diagram with the following steps:

  1. The Stateflow diagram root checks to see if there is a valid transition as a result of E_one.
  1. There is a valid transition from state A to superstate B. The transition is valid if event E_one or E_two occurs.

  1. State A exit actions execute and complete (exitA()).
  2. State A is marked inactive.
  3. State B is marked active.
  4. State B entry actions execute and complete (entB()).
  5. State B detects a valid default transition to state B.B1. The default transition is valid as a result of E_one.
  6. State B.B1 is marked active.
  7. State B.B1 entry actions execute and complete (entB1()).
  8. The Stateflow diagram goes back to sleep, waiting to be awakened by another event.

This sequence completes the execution of this Stateflow diagram associated with event E_one when state A is initially active.


  Default Transition and a History Junction Example Inner Transition Examples