Stateflow    

Keyword Identifiers

Stateflow action language is heavily dependent on action language keywords that identify different types of actions. For an understanding of each keyword, see the following topics:

State Action Type Keywords

Each of the following keywords defines a category of action language notation for states. The short form of each keyword uses the characters displayed in bold type.

State Action Language Keyword
Meaning
during
Actions that follow are executed as part of a state's during action.
entry
Actions that follow are executed as part of a state's entry action.
exit
Actions that follow are executed as part of a state's exit action.
on event_name
Actions that follow are executed when the event_name specified as an argument to the on keyword is broadcast.

Implicit Event Keywords

Each of the following keywords generates implicit events in the action language notation for states and transitions (see Implicit Events). The short form of each keyword uses the characters displayed in bold type.

State Action Language Keyword
Meaning
change(data_name)
Specifies and implicitly generates a local event when the value of data_name changes.
enter(state_name)
Specifies and implicitly generates a local event when the specified state_name is entered.
exit(state_name)
Specifies and implicitly generates a local event when the specified state_name is exited.
tick
Same as wakeup keyword.
wakeup
Specifies and implicitly generates a local event when the chart of the action being evaluated awakens.

Special Function Keywords

Each of the keywords listed below call special functions in the action language notation for states and transitions.

Special Function Keyword
Meaning
in(state_name)
A condition function that is evaluated as true when the state_name specified as the argument is active.
ml(evalString,arg1,arg2,...)
Action specifies a call using ml function notation. See ml Function.
ml.MATLAB_workspace_data
Action specifies a call using the ml name space notation. See ml Namespace Operator.
send(event_name,state_name)
Send the event_name specified to the state_name specified (directed event broadcasting). See Directed Event Broadcasting.


  Types of Action Language Operations