代码接口包装
描述
选择生成的C或C ++代码接口的包装。
类别:代码生成>接口
设置
默认:不可修复的功能
如果参数语is set toC
;C ++类
如果语is set toC ++
-
C ++类
-
生成一个C ++类接口到模型代码。生成的界面将所需的模型数据封装到C ++类属性中,并将模型入口点功能纳入C ++类方法中。
-
不可修复的功能
-
生成不可避免的代码。模型数据结构是直接在模型代码中的模型入口点功能静态分配和访问的。
-
可重复使用的功能
-
生成可重用,米ulti-instance code that is reentrant, as follows:
对于基于GRT的模型,生成的
source file contains an allocation function that dynamically allocates model data for each instance of the model. For an ERT-based model, you can use parameter使用动态内存分配进行模型初始化控制是否生成分配函数。模型
。c生成的代码通过参考将实时模型数据结构传递给
以及其他模型入口点功能。模型
_步实时模型数据结构用
标题文件。模型
。h
For an ERT-based model, you can use parameter通过根级I/O AS至control how root-level input and output arguments are passed to the reusable model entry-point functions. They can be included in the real-time model data structure that is passed to the functions, passed as individual arguments, or passed as references to an input structure and an output structure.
提示
入口点已导出
。To call the entry-point functions from handwritten code, add an模型
。h#include model.h
directive to the code.When you select
可重复使用的功能
,代码生成器生成一个指向实时模型对象的指针(
)。模型
_MWhen you select
可重复使用的功能
,代码生成器可以生成编译但不是重新进入的代码。例如,如果信号,dwork结构或参数数据具有以外的存储类Auto
,生成全球数据结构。
依赖性
价值
C ++类
仅在参数时可用语is set toC ++
。选择
可重复使用的功能
orC ++类
启用参数Multi-instance code error diagnostic。对于基于ERT的系统目标文件,选择
可重复使用的功能
启用参数通过根级I/O ASand使用动态内存分配进行模型初始化。启用参数经典呼叫接口, 选择
不可修复的功能
。对于基于ERT的系统目标文件,选择
C ++类
enables the following model configuration controls for customizing the model class interface:配置C ++类接口按钮
数据成员可见性/访问控制子板
参数产生驱动器and使用动态内存分配进行模型块实例化
对于基于ERT的系统目标文件,您可以选择
可重复使用的功能
与静态ERT_MAIN.C
模块,如果您执行以下操作:设置参数通过根级I/O AS至
模型数据结构的一部分
。Select parameter使用动态内存分配进行模型初始化。
对于基于ERT的系统目标文件,您无法选择
可重复使用的功能
如果你是:自定义
model_step
功能原型选择子系统块参数Function with separate data
使用一个子系统
有多个共享来源的端口
具有子系统多个实例使用的端口,并具有不同的样本时间,数据类型,复杂性,帧状态或尺寸
Has output marked as a global signal
对于每个实例,都包含具有不同名称或参数设置的相同块
选择
可重复使用的功能
does not change the code generated for function-call subsystems.
Command-Line Information
Parameter:CodeInterfacePackaging |
类型:角色向量 |
价值:'C ++类' |'Nonreusable function' |'Reusable function' |
默认:'Nonreusable function' 如果TargetLang is set to'C' ;'C ++类' 如果TargetLang is set to'C ++' |
推荐设置
应用 | Setting |
---|---|
调试 | No impact |
可追溯性 | No impact |
效率 | 可重复使用的功能 orC ++类 |
安全预防措施 | No impact |
也可以看看
Related Topics
- 模型配置参数: Code Generation Interface
- 为模型入口点功能配置代码生成
- Generate Reentrant Code from Top Models
- Combine Code Generated for Multiple Models or Multiple Instances of a Model
- Generate Reentrant Code from Top Models
- 生成C ++类接口到模型或子系统代码
- Customize Generated C++ Class Interfaces(嵌入式编码器)
- Control Generation of Functions for Subsystems
- 从子系统生成返回代码
- 支持代码重复使用的S函数金宝app
- Static Main Program Module(嵌入式编码器)
- 自定义生成的C函数接口(嵌入式编码器)
- 生成非虚拟子系统的模块化功能代码(嵌入式编码器)
- 生成用于导出到外部代码库的组件源代码(嵌入式编码器)