Stateflow    

Inner Transition to a History Junction Example

This example shows the behavior of an inner transition to a history junction.

Initially the Stateflow diagram is asleep. State A.A1 is active. There is history information because superstate A 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:

  1. The Stateflow diagram root checks to see if there is a valid transition as a result of E_one. There is no valid transition.
  2. State A during actions execute and complete.
  3. State A checks itself for valid transitions and detects that there is a valid inner transition to a history junction. According to the behavior of history junctions, the last active state, A.A1, is the destination state.
  4. State A.A1 exit actions execute and complete.
  5. State A.A1 is marked inactive.
  6. State A.A1 is marked active.
  7. State A.A1 entry actions execute and complete.
  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 there is an inner transition to a history junction and state A.A1 is active.


  Processing Events with an Inner Transition to a Connective Junction Example Connective Junction Examples