Stateflow | ![]() ![]() |
Syntax
where E
is the base event for the at
operator and n
is any expression that evaluates to an integer value.
Semantics
The at
operator is true only at the n
th occurrence of the base event E
since activation of the associated state.
Usage
The following example illustrate use of the at
operator in a transition expression.
ROTATION[at(10, CLK)]
This expression permits a transition out of the associated state only if a ROTATION
event occurs exactly 10 CLK
cycles after activation of the state.
The next example illustrates usage of a before
event in a state's during
action.
Heater_on on at(10, CLK): status("heater on");
This example causes the Heater_on
state to display a status message 10 CLK
cycles after activation of the associated state.
![]() | Before Operator | Every Operator | ![]() |