Main Content

Stateflow Chart Objects Metric

Metric ID

Metric ID: mathworks.metrics.StateflowChartObjectCount

Description

Metric Type: Size

Model Advisor Check ID: mathworks.metricchecks.StateflowChartObjectCount

Run this metric to calculate the number of Stateflow® objects. For each chart in the model, the results provide the number of the following Stateflow objects:

  • Atomic subcharts

  • Boxes

  • Data objects

  • Events

  • Graphical functions

  • Junctions

  • Linked charts

  • MATLAB® functions

  • Notes

  • Simulink® functions

  • States

  • Transitions

  • Truth tables

This metric is available with Simulink Check™. To collect data for this metric, use getMetrics with the metric identifier, mathworks.metrics.StateflowChartObjectCount.

The slmetric.metric.AggregationMode property setting is Sum.

Computation Details

The metric:

  • Runs on library models.

  • Analyzes content in masked subsystems.

  • If specified, analyzes the content of library-linked blocks or referenced models.

Collection

To collect results for this metric using the Model Advisor, run the check, Stateflow chart objects metric in By Task > Model Metrics > Count Metrics. The Model Advisor check displays the number of Stateflow objects in each chart in the model. The check does not analyze charts in referenced models or return aggregated results.

Results

For this metric, instances of slmetric.metric.Result provide the following results:

  • Value: Number of Stateflow objects.

  • AggregatedValue: Number of Stateflow objects for a component and its subcomponents.

  • Measures: Not applicable.

See Also

Related Topics