Event Actions in a Superstate Example

The following example shows the use of event actions in a superstate.

Initially, the Stateflow chart is asleep. State A.A1 is active. Event E_three occurs and awakens the chart. Event E_three is processed from the root of the chart down through the hierarchy of the chart:

  1. The Stateflow chart root checks to see if there is a valid transition as a result of E_three. There is no valid transition.

  2. State A during actions (durA()) execute and complete.

  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 during actions (durA1()) execute and complete.

  6. The chart goes back to sleep.

This sequence completes the execution of this Stateflow chart associated with event E_three.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS