Stateflow    
outputData

Create, retrieve, or delete a data output to Simulink of this state's activity status

Syntax

Description

The outputData method of this state creates, retrieves, or deletes a special data object of type State. This data is attached internally to an output port on this state's Stateflow block in Simulink to output the activity status of this state to Simulink during run-time.

Arguments

thisState
The state object for which to add a special port.
action
This string value can be one of the following:
  • 'create' -- Returns a new data object of type State and attaches it internally to a new state activity output port on this state's Stateflow block.
  • 'get' -- Returns this state's existing data object of type State attached internally to an existing state activity output port on this state's Stateflow block.
  • 'delete' -- Deletes this state's data object of type State and the state activity output port on its Stateflow block to which it is attached.

Returns

StateData
The data object of type State for this state

Example

If state A is represented by State object sA, the following command creates a new data object of type State, which is output to Simulink and contains state A's activity:

The Stateflow Chart block in Simulink that contains state A now has an output port labeled A, the name of state A. In Explorer, state A now contains a data object of type State whose scope is Output to Simulink.

The following command returns a Data object, d, for the data output to Simulink containing state A's activity:

The following command deletes the data output to Simulink containing state A's activity:


  outerTransitions parse