Documentation Center

  • Trials
  • Product Updates

State Loop

Run child components for all states in current context

Description

This component runs its children for all states in its context. The parent component of this component determines the context.

  • Model Loop: Includes all states in the models.

  • System Loop: Includes all states in the systems.

  • Machine Loop: Includes all states in the machines.

  • Chart Loop: Includes all states in the charts.

  • State Loop: Includes all states in the current state.

For conditional processing based on states, you can use the RptgenSF.getReportedState function. For more information, see Loop Context Functions.

State Types

  • Include "and" and "or" states: Includes AND and OR states in the loop.

  • Include "box" states: Includes "box" states in the loop.

  • Include functions: Includes "function" states in the loop.

  • Include truth tables: Includes truth tables in the loop.

  • Include MATLAB functions: Includes MATLAB® functions in the loop.

Loop Options

  • Report depth: Specifies the level on which to loop.

    • Local children only

    • All objects

  • Skip autogenerated charts under truth table: Keeps autogenerated state objects under truth tables from appearing in the report.

  • Search Stateflow: Indicates specific states to include in the loop.

Section Options

  • Create section for each object in loop: Inserts a section in the generated report for each object found in the loop.

  • Display the object type in the section title: Inserts the object type automatically into the section title in the generated report.

  • Create link anchor for each object in loop: Creates a hyperlink to the object in the generated report.

Insert Anything into Report?

Yes, section, if you select the Create section for each object in loop option.

Class

rptgen_sf.csf_state_loop

Was this topic helpful?