Using Stateflow     Search    Help Desk 

Semantics of Active and Inactive States

This example shows the semantics of active and inactive states


.

Initially the Stateflow diagram is asleep and both states are inactive. An event occurs and the Stateflow diagram is awakened. This is the semantic sequence:

   1.
The Stateflow diagram root checks to see if there is a valid transition as a result of the event. A valid default transition to state A is detected.
   2.
State A is marked active.
   3.
State A entry actions execute and complete (entA()).
   4.
The Stateflow diagram goes back to sleep waiting to be awakened by another event.
Event E_one occurs and the Stateflow diagram is awakened. State A is active. This is the semantic sequence:

   1.
The Stateflow diagram root checks to see if there is a valid transition as a result of E_one. A valid transition is detected from state A to state B.
   2.
State A exit actions execute and complete (exitA()).
   3.
State A is marked inactive.
   4.
State B is marked active.
   5.
State B entry actions execute and complete (entB()).
   6.
The Stateflow diagram goes back to sleep, to be awakened by the next event.


[ Previous | Help Desk | Next ]