| Contents | Index |
StateData = thisState.outputData(action)
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 a Simulink model to output the activity status of this state to the Simulink base workspace during run-time.
thisState | The state object for which to add a special port. |
action | This string value can be one of the following:
|
StateData | The data object of type State for this state |
If state A is represented by State object sA, the following command creates a new data object of type State, which is output to the Simulink base workspace and contains state A's activity:
s.outputData('create')
The Chart block in the Simulink model that contains state A now has an output port labeled A, the name of state A. In the Model 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 the Simulink base workspace containing state A's activity:
s.outputData('get')
The following command deletes the data output to the Simulink base workspace containing state A's activity:
s.outputData('delete')

Learn how engineers use Stateflow to model state machines in their Simulink models.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |