Stateflow    

Transitions from Multiple Sources to a Common Destination Example

This example shows the behavior of transitions from multiple sources to a single destination using a connective junction.

Initially the Stateflow diagram is asleep. State 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 a valid transition segment from state A to the connective junction and from the junction to state C.
  2. State A exit actions (exitA()) execute and complete.
  3. State A is marked inactive.
  4. State C is marked active.
  5. State C entry actions (entC()) execute and complete.
  6. 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.


  Transitions from a Common Source to Multiple Destinations Example Transitions from a Source to a Destination Based on a Common Event Example