Stateflow | ![]() ![]() |
Data and Event Arguments
When you use data and event objects as arguments to functions that you call in action language, they are assumed to be defined at the same level in the hierarchy as the action language that references them. If they are not found at that level, Stateflow attempts to resolve the object name by searching up the hierarchy. Data or event object arguments that are parented anywhere else must have their path hierarchies defined explicitly.
In the following example, state A calls the graphical function addit
to add the Stateflow data x
and y
and store the result in data z
.
The following Explorer window shows that data x
and y
are defined for state AA and not for state A. However, data value z is defined for state A (not shown).
Because state AA owns the data x
and y
, when state A passes them as arguments to the graphical function addit
, they must be referenced by their path hierarchy.
There are a variety of functions that you can call in Stateflow action language that use data as arguments. See the following sections:
Only the temporal logic operators take events as an argument. See Using Temporal Logic.
![]() | Inferring Return Size for ml Expressions | Arrays in Action Language | ![]() |