Main Content

Check for usage of events in Stateflow charts

Check ID: mathworks.jmaab.jm_0012

Guideline: jm_0012: Usage restrictions of events and broadcasting events

Description

Checks for undirected event broadcasts in Stateflow® charts that might cause recursion during simulation and generate inefficient code.

This check requires a Simulink® Check™ and Stateflow license.

Check Parameterization

This check contains sub-checks that correspond to the sub IDs specified in the JMAAB modeling guidelines. You can use the Model Advisor Configuration Editor to specify which sub IDs (one or multiple) to execute.

For reference, the guideline sub ID(s) that are recommended for use by the NA-MAAB and JMAAB modeling standards organizations are:

  • NA-MAAB — No recommendations

  • JMAAB — a1/a2/a3

Note

Sub-check jm_0012_a1 is selected by default.

Results and Recommended Actions

Guideline Sub IDsConditionRecommended Action
jm_0012_a1: Check if Stateflow events are used only in the output of Stateflow blocksStateflow events are not used in the output of Stateflow blocks.Change the scope of above listed Stateflow events to output.
jm_0012_a2: Check if Stateflow broadcast events are directed using "send" syntaxStateflow broadcast events are not directed using "send" syntax.Use "send(event_name, state_name)" syntax to broadcast Stateflow events.
jm_0012_a3: Check if Stateflow broadcast events are directed using qualified event nameStateflow events are not directed using qualified event name.Use "send(state_name.event_name)" syntax to broadcast Stateflow events.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content of library linked blocks.

  • Analyzes content in masked subsystems. By default, the input parameter Look under masks is set to graphical.

  • Analyzes content of library-linked blocks. By default, the input parameter Follow links is set to on.

  • Allows exclusions of blocks and charts.

See Also