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 — a1/a2/a3
MATLAB Versions
All
Rule
Sub ID a1
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 a2
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 a3
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 a1:
Recursive processing in a chart is prevented by using Stateflow events in the Stateflow Chart output only.
Sub IDs a2, a3:
Improves readability because transitions that are triggered by events are clearly identified.
Verification
Model Advisor check: Check for usage of events and broadcasting events in Stateflow charts (Simulink Check)
Last Changed
R2020a
See Also
Events (Stateflow)
Use Events to Execute Charts (Stateflow)
Broadcast Local Events to Synchronize Parallel States (Stateflow)
Version History
Introduced in R2020a