Stateflow    

Executing an Event

A Stateflow chart executes only in response to an event. This occurs on two levels. First, Simulink updates the chart, which awakens it for execution. Second, once the chart is awakened, it continues to respond to events until there are no more events. The chart then goes to sleep. When another event occurs, the chart is awakened (from sleep) to respond to the event.

Because Stateflow runs on a single thread, actions that take place based on an event are atomic to that event. This means that all activity caused by the event in the chart is completed before returning to whatever activity was taking place prior to reception of the event. Once action is initiated by an event, it is completed unless interrupted by an early return.

See the following topics to continue with the behavior of events:


  Stateflow Semantics Sources for Stateflow Events