Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

C++ 数据接口和函数接口

控制从 Simulink 模型生成的 C++ 类

要生成可轻松插入您现有软件架构中的高效 C++ 代码,请配置 C++ 类接口。从模型生成 C++ 类接口时,模型显示为类,数据元素显示为类成员,模型函数显示为类方法。通过以交互方式或编程方式配置 C++ 类接口,您可以配置:

  • 类信息 - 类名称和命名空间

  • 类成员信息 - 类成员数据可见性和访问方法

  • 类方法信息 - 类方法名称和参数

您可以使用这些自定义快速调整基于速率和导出函数模型生成的接口,以满足您的应用程序集成要求。

工具

代码映射 - C++ 编辑器Configure how model elements and functions appear in generated C++ code

对象

coder.mapping.api.CodeMappingCPPModel data and interface configuration for C++ code generation

函数

全部展开

coder.mapping.api.getGet code mappings for model
coder.mapping.utils.createCreate code mappings object for configuring data and function interface for C and C++ code generation
findGet model elements for the category of model code mappings
getClassNameGet class name of model
setClassNameSet class name of model
getClassNamespaceGet class namespace for a model
setClassNamespaceSet class namespace of model
getDataGet code mapping configuration for model data
setDataConfigure model data for C++ code generation
getFunctionGet code configuration from code mappings for model function
setFunctionSet code mapping information for model function

主题