代码生成器尝试首先为共享实用程序文件夹生成常量参数。如果常量参数没有生成到共享实用程序文件夹中,则在top模型的全局常量参数结构中定义它们。结构的声明,ConstParam_
,是在模型
:模型
. h
/* const参数(自动存储)*/ typedef struct{/*表达式:[1 2 3 4 5 6 7]*引用:'/Constant' */ real_T Constant_Value[7];/* Expression:[7 6 5 4 3 2 1] *引用by: ' /Gain' */ real_T Gain_Gain[7];} ConstParam_model;
模型
_constP
是在:/ *常数参数(自动存储)* / const ConstParam_model model_ConstP ={/ *表情:(1 2 3 4 5 6 7)*引用:“< Root > /常数”* /{1.0,2.0,3.0,4.0,5.0,6.0,7.0},/ *表情:[7 6 5 4 3 2 1]*引用:“< Root > /增益”* / {7.0,6.0,5.0,4.0,3.0,2.0,1.0}};
模型
_constP
作为参数传递给引用的模型。