使用以下方式追溯至模型
指定注释的格式
模型配置窗格: 代码生成 / 注释
描述
指定 Simulink® 模块、Stateflow® 元素和 MATLAB® 函数模块的注释格式。
依存关系
此参数要求具有 Embedded Coder®。
Simulink 模块注释或 Stateflow 对象注释启用此参数。
设置
模块路径 (默认) | Simulink 标识符
- 模块路径
生成的注释包括从根开始的整个模块路径作为可追溯性链接。例如:
/* Outport: '<Root>/Out1' */CustomCodeComments_Y.Out1 = 1;
Simulink identifier
生成的注释包括对应模块或对象的 Simulink 标识符编号。例如:
/* Outport: 'Out1' (':33') */ CustomCodeComments_Y.Out1 = 1;
推荐的设置
应用场景 | 设置 |
---|---|
调试 | 无影响 |
可追溯性 | 无影响 |
效率 | 无影响 |
安全预警 | 无建议 |
编程用法
参数:BlockCommentType |
类型:字符向量 |
值:'BlockPathComment' (UI 设置 Block path )| 'BlockSIDComment' (UI 设置 Simulink identifier ) |
默认值:'BlockPathComment'
|
版本历史记录
在 R2018a 中推出