FunctionPortSpecification
描述
查询和配置C调用者块函数定义和返回参数。配置C调用者块输入参数编程。
创建
“FunctionPortSpecification”myCCallerObj = get_param (gcb)
创建一个C调用者块为选定的配置对象C调用者块。
属性
对象的功能
getGlobalArg |
得到一个对象定义一个全局变量的一块C调用者 |
例子
创建一个C调用者配置对象
这个示例创建了一个C调用者配置对象使用“slexCCallerExample”
演示模型。
my_CCallerObj = get_param (“slexCCallerExample / C调用者”,“FunctionPortSpecification”)
my_CCallerObj = FunctionPortSpecification属性:CPrototype:“real_T添加(real_T u1, u2乐队real_T);“InputArguments: [1×2 Simulink.CustomCod万博1manbetxe。FunctionArgument] ReturnArgument:(1×1 S万博1manbetximulink.CustomCode。FunctionArgument] GlobalArguments: [1×0 Simulink.CustomCode.FunctionArgument]
FunctionArgument
对象的输入端口1:inargone = my_CCallerObj.InputArguments (1)
inargone = FunctionArgument属性:名称:‘u1’PortNumber: 1大小:' 1 '类型:“双”标签:u1的范围:“参数”
inargone。标签=“inputport1”
inargone = FunctionArgument属性:名称:‘u1’PortNumber: 1大小:' 1 '类型:“双”标签:“inputport1”范围:“参数”
版本历史
介绍了R2019b