Stateflow | ![]() ![]() |
Overview
A state describes a mode of a reactive system. States in a Stateflow diagram represent these modes. The activity or inactivity of the states dynamically changes based on events and conditions.
Every state has hierarchy. In a Stateflow diagram consisting of a single state, that state's parent is the Stateflow diagram itself. A state also has history that applies to its level of hierarchy in the Stateflow diagram. States can have actions that are executed in a sequence based upon action type. The action types are: entry
, during
, exit
, or on
event_name
actions.
This table shows the button icon and a short description of a state.
Name |
Button Icon |
Description |
State |
Use a state to depict a mode of the system. |
Superstate
A state is a superstate if it contains other states, called substates.
Substate
A state is a substate if it exists in another state.
![]() | How Hierarchy Is Represented | State Decomposition | ![]() |