主要内容

本页采用了机器翻译。点击此处可查看英文原文。

组件需求

自 R2025a 起

度量 ID

slcomp.mt.ComponentRequirements

描述

您可以使用此度量来统计组件中已实现的功能性需求数量。

支持的工件

该度量收集工程中 Units 的度量结果。要控制仪表板将什么归类为单位,请参阅 将模型按层级结构分类为组件或单元

计算详细信息

该度量仅包含以下需求:

  • 需求类型设置为 Functional

  • 需求链接到一个组件,该组件的链接类型设置为 Implements

收集

要收集此度量的数据,请执行度量引擎并使用度量 ID slcomp.mt.ComponentRequirementsgetMetrics

metric_engine = metric.Engine;
execute(metric_engine,"slcomp.mt.ComponentRequirements");
results = getMetrics(metric_engine,"slcomp.mt.ComponentRequirements")

收集此度量的数据会加载模型文件,并且需要 Requirements Toolbox™ 许可证。

结果

对于此度量,函数 getMetrics 返回一个 metric.Result 实例。metric.Result 的实例包含以下属性:

属性描述数据类型示例值
Value组件中实现的功能性需求数量struct
  struct with fields:

    Count: 3
Artifacts已实现的功能性需求信息struct 数组
  1×3 struct array with fields:

    UUID
    Name
    ParentUUID
    ParentName

另请参阅

对象

函数

主题