メインコンテンツ

Input and Output Component Interface Signals

R2026b
Since R2022b

Metric ID

slcomp.ComponentInterfaceSignals

Description

Use this metric to count the number of root-level, input signals and output signals that connect to the component interface.

This metric counts signals to or from:

  • Simulink® Inport blocks

  • Simulink Outport blocks

  • Input ports for Stateflow® charts

  • Output ports for Stateflow charts

  • Inputs and outputs to MATLAB® code

Supported Artifacts

You can collect this metric for Units and Components. To control what the dashboard classifies as a unit or component, see Categorize Models in Hierarchy as Components or Units.

Computation Details

The metric:

  • Returns the number of component interface signals. If the data type of an input or output is Bus, the metric counts the individual elements in the bus.

  • Displays a warning if the data type of an input or output is set to 'Inherit: auto'. The metric is unable to resolve inherited data types. Specify valid data types, other than 'Inherit: auto', for root outports and inports.

  • Displays a warning if the 'HasAccessToBaseWorkspace' property for a model is set to true. Data type definitions accessed from the base workspace are not considered by traceability analysis. Changes to base workspace variables will not cause the metric to be recollected.

Collection

To collect data for this metric, execute the metric engine with the metric ID.

metric_engine = metric.Engine;
results = execute(metric_engine,"slcomp.ComponentInterfaceSignals")

Results

For this metric, instances of metric.Result return the Value as structure with these fields:

  • InputSignals — The number of input component interface signals.

  • OutputSignals — The number of output component interface signals.

See Also

Objects

Functions

Topics