Stateflow | ![]() ![]() |
Actions
Actions take place as part of Stateflow diagram execution. The action can be executed either as part of a transition from one state to another or based on the activity status of a state.
Transitions ending in a state can have condition actions and transition actions, as shown in the following example:
In the diagram on page 2-10, the transition segment from StateA1b
to the connective junction is labeled with the condition action func1()
and the transition action func2()
. The semantics of how and why actions take place are discussed throughout the examples listed in Semantic Examples.
States can have entry
, during
, exit
, and on
event_name
actions. For example,
Action language defines the types of actions you can specify and their associated notations. An action can be a function call, the broadcast of an event, the assignment of a value to a variable, and so on.
Stateflow supports both Mealy and Moore finite state machine modeling paradigms. In the Mealy model, actions are associated with transitions, whereas in the Moore model they are associated with states. Stateflow supports state actions, transition actions, and condition actions. For more information, see the following:
![]() | History Junction | Connective Junctions | ![]() |