jm_0012: Usage restrictions of events and broadcasting events
Since R2020a
Guideline Publication
Control Algorithm Modeling Guidelines - Using MATLAB®, Simulink®, and Stateflow®
Sub ID Recommendations
NA-MAAB — No recommendations
JMAAB — a, b1/b2
MATLAB Versions
All
Rule
Sub ID a
Stateflow events shall be used only in Stateflow Chart (Stateflow) output.
Not Applicable
Event is used only in the Stateflow Chart output.
Event is used other than in the Stateflow Chart output.
Sub ID b1
The send
(Stateflow) syntax
send(event_name, state_name)
shall be
used to broadcast Stateflow events.
Not Applicable
Event is broadcast using the send
syntax.
The state that receives the broadcast has not been defined in
the send
(Stateflow)
syntax.
Sub ID b2
The send
(Stateflow) syntax
send(state_name.event_name)
with the
qualified event name shall be used to broadcast Stateflow events.
Not Applicable
The qualified event name is used in the event being broadcast.
The state that receives the broadcast has not been described
in the send
(Stateflow)
syntax.
Rationale
Sub ID a:
Recursive processing in a chart is prevented by using Stateflow events in the Stateflow Chart output only.
Sub IDs b1, b2:
Improves readability because transitions that are triggered by events are clearly identified.
Verification
Model Advisor check: Check for usage of events in Stateflow charts (Simulink Check)
Last Changed
R2024b
See Also
Events (Stateflow)
Use Events to Execute Charts (Stateflow)
Broadcast Local Events to Synchronize Parallel States (Stateflow)
Version History
Introduced in R2020a