Stateflow    

Nongraphical Objects

Stateflow defines the nongraphical objects described in the following sections:

Event, data, and target objects do not have graphical representations in the Stateflow diagram editor. However, you can see them in the Stateflow Explorer. See The Stateflow Explorer Tool.

Event Objects

An event is a Stateflow object that can trigger a whole Stateflow chart or individual actions in a chart. Because Stateflow charts execute by reacting to events, you specify and program events into your charts to control their execution. You can broadcast events to every object in the scope of the object sending the event, or you can send an event to a specific object. You can define explicit events that you specify directly, or you can define implicit events to take place when certain actions are performed, such as entering a state. For a full description of events, see Defining Events.

Data Objects

A Stateflow chart stores and retrieves data that it uses to control its execution. Stateflow data resides in its own workspace, but you can also access data that resides externally in the Simulink model or application that embeds the Stateflow machine. When creating a Stateflow model, you must define any internal or external data that you use in the action language of a Stateflow chart. For a full description of data objects, see Defining Data.

Target Objects

You build targets in Stateflow to execute the application you program in Stateflow charts and the Simulink model that contains them. A target is a program that executes a Stateflow model or a Simulink model containing a Stateflow machine. You build a simulation target (named sfun) to execute a simulation of your model. You build a Real-Time Workshop target (named rtw) to execute the Simulink model on a supported processor environment. You build custom targets (with names other than sfun or rtw) to pinpoint your application to a specific environment. For a full description of target objects in Stateflow and Simulink, see Overview of Stateflow Targets.


  Graphical Objects The Data Dictionary