Stateflow    

Event Actions

Example: Event Actions and Superstates

This example shows the semantics of event actions within superstates.

Initially the Stateflow diagram is asleep. State A.A1 is active. Event E_three occurs and awakens the Stateflow diagram. Event E_three 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_three. There is no valid transition.
  2. State A executes and completes during actions (durA()).
  3. State A executes and completes the on event E_three action (A_one).
  4. State A checks its children for valid transitions. There are no valid transitions.
  5. State A1 executes and completes during actions (durA1()).
  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_three.


 Connective Junctions Parallel (AND) States