文档帮助中心
从指定的属性创建实现返回参数,并添加到代码替换表项的实现
arg = createAndSetCImplementationReturn (hEntry argType变长度输入宗量)
例子
参数= createAndSetCImplementationReturn (hEntry,argType,变长度输入宗量)从指定的属性创建实现返回参数,并将该参数添加到代码替换表的实现中。
参数= createAndSetCImplementationReturn (hEntry,argType,变长度输入宗量)
参数
hEntry
argType
变长度输入宗量
实现返回参数必须描述基本的数字数据类型,例如双,单,int32,int16,int8,uint32,uint16,uint8,或布尔(不是定点数据类型)。
双
单
int32
int16
int8
uint32
uint16
uint8
布尔
全部折叠
这个例子展示了如何使用createAndSetCImplementationReturn函数与createAndAddImplementationArg函数指定操作符实现的输出和输入参数。
createAndSetCImplementationReturn
createAndAddImplementationArg
op_entry = RTW.TflCOperationEntry;. . .createAndSetCImplementationReturn (op_entry“环球套票。TflArgNumeric”,...“名字”,“日元”,...“IOType”,“RTW_IO_OUTPUT”,...“IsSigned”,真的,...“字”32岁的...“FractionLength”, 0);createAndAddImplementationArg (op_entry“环球套票。TflArgNumeric”,...“名字”,‘u1’,...“IOType”,“RTW_IO_INPUT”,...“IsSigned”,真的,...“字”32岁的...“FractionLength”, 0);createAndAddImplementationArg (op_entry“环球套票。TflArgNumeric”,...“名字”,“u2”,...“IOType”,“RTW_IO_INPUT”,...“IsSigned”,真的,...“字”32岁的...“FractionLength”, 0);
这些示例展示了一些常用的类型规范createAndSetCImplementationReturn.
hEntry = RTW.TflCOperationEntry;. . .% uint8:createAndSetCImplementationReturn (hEntry“环球套票。TflArgNumeric”,...“名字”,“日元”,...“IOType”,“RTW_IO_OUTPUT”,...“IsSigned”假的,...“字”8...“FractionLength”, 0);%单:createAndSetCImplementationReturn (hEntry“环球套票。TflArgNumeric”,...“名字”,“日元”,...“IOType”,“RTW_IO_OUTPUT”,...“DataTypeMode”,“单一”);%的两倍:createAndSetCImplementationReturn (hEntry“环球套票。TflArgNumeric”,...“名字”,“日元”,...“IOType”,“RTW_IO_OUTPUT”,...“DataTypeMode”,“双”);%布尔:createAndSetCImplementationReturn (hEntry“环球套票。TflArgNumeric”,...“名字”,“日元”,...“IOType”,“RTW_IO_OUTPUT”,...“DataTypeMode”,“布尔”);
的hEntry先前通过实例化代码替换项类返回的代码替换表项句柄,例如hEntry=环球套票。TflCFunctionEntry或hEntry=环球套票。TflCOperationEntry.
hEntry=环球套票。TflCFunctionEntry
hEntry=环球套票。TflCOperationEntry
例子:op_entry
op_entry
“环球套票。TflArgNumeric”
的argType指定要创建的参数类型的字符向量或字符串标量。使用“环球套票。TflArgNumeric”数字。
例子:“环球套票。TflArgNumeric”
例子:“名称”,“日元”
“名称”,“日元”
指定可选的逗号分隔的对名称,值参数。的名字参数名和价值为对应值。的名字必须出现在引号内。可以以任意顺序指定多个名称和值对参数Name1, Value1,…,的家.
名称,值
的名字
价值
Name1, Value1,…,的家
“名字”
“IOType”
“RTW_IO_OUTPUT”
使用“RTW_IO_OUTPUT”为输出。
例子:“IOType”、“RTW_IO_OUTPUT”
“IOType”、“RTW_IO_OUTPUT”
“IsSigned”
真正的
假
设置为时的布尔值真正的,表示参数已签名。默认值是真正的.
例子:IsSigned,真的
IsSigned,真的
“字”
16
例子:“字”,16岁
“字”,16岁
“DataTypeMode”
“定点:二进制点缩放”
“定点:斜率和偏差缩放”
“布尔”
“双”
“单一”
你可以指定数据类型(与扩展)或DataTypeMode,但不要同时指明两者。
数据类型
扩展
DataTypeMode
例子:'DataTypeMode','Fixed-point: binary point scaling'
'DataTypeMode','Fixed-point: binary point scaling'
“数据类型”
“固定”
例子:“数据类型”,“固定”
“数据类型”,“固定”
“缩放”
“BinaryPoint”
“SlopeBias”
使用“BinaryPoint”对于二值点缩放或“SlopeBias”用于斜率和偏差缩放。
例子:“缩放”、“BinaryPoint”
“缩放”、“BinaryPoint”
“坡”
1.0
可以选择指定此参数或SlopeAdjustmentFactor和FixedExponent参数,但不要同时指定两者。
SlopeAdjustmentFactor
FixedExponent
例子:“坡”,1.0
“坡”,1.0
“SlopeAdjustmentFactor”
F
F2E
E
您可以选择指定坡参数或该参数与的组合FixedExponent参数,但不要同时指定两者。
坡
例子:“SlopeAdjustmentFactor”,1.0
“SlopeAdjustmentFactor”,1.0
“FixedExponent”
-15
您可以选择指定坡参数或该参数与的组合SlopeAdjustmentFactor参数,但不要同时指定两者。
例子:“FixedExponent”,0
“FixedExponent”,0
“偏见”
0.0
例子:“偏见”,0.0
“偏见”,0.0
“FractionLength”
15
例子:“FractionLength”,0
“FractionLength”,0
中指定返回参数createAndSetCImplementationReturn函数调用是可选的。
你点击一个链接对应于这个MATLAB命令:
通过在MATLAB命令窗口中输入命令来运行命令。Web浏览器不支持MATLAB命令。金宝app
选择一个网站,在那里获得翻译的内容,并看到当地的活动和优惠。根据您的位置,我们建议您选择:.
你也可以从以下列表中选择一个网站:
选择中国网站(中文或英文)以获得最佳网站性能。其他MathWorks国家站点没有针对您所在位置的访问进行优化。
与当地办事处联系
得到审判现在