coder.mapping.api.get
获取模型的代码映射
说明
代码映射 将指定模型的活动代码映射以对象 coderMapObj = coder.mapping.api.get(simulinkModel)coderMapObj 形式返回。代码映射将模型数据元素与用于 C 或 C++ 代码生成的配置相关联。如果一个模型具有多个代码映射,则活动代码映射是与活动系统目标文件关联的映射。
如果代码映射不存在,则会生成错误。Simulink® 会在您为模型打开代码生成器时创建一个代码映射对象。如果您尚未为该模型打开代码生成器,则可以调用 coder.mapping.utils.create 函数来创建一个代码映射对象。
示例
输入参数
输出参量
版本历史记录
在 R2020b 中推出
另请参阅
coder.mapping.api.CodeMapping | coder.mapping.utils.create | coder.mapping.api.CoderDictionary | coder.mapping.api.CodeMappingCPP (Embedded Coder)
主题
- 模型接口元素的 C 数据代码接口配置
- Programmatically Configure C++ Interface (Embedded Coder)