FunctionPortSpecification
Description
Query and configure the C Caller block function definition and return argument. Configure the C Caller block input arguments programmatically.
Creation
myCCallerObj = get_param(gcb, 'FunctionPortSpecification')
creates a
C Caller block configuration object for the selected C Caller
block.
Properties
Object Functions
getGlobalArg | Get an object definition of a global variable in a C Caller block |
Examples
Create a C Caller Configuration Object
This example creates a C Caller configuration object using the
'slexCCallerExample'
demo
model.
my_CCallerObj = get_param('slexCCallerExample/C Caller','FunctionPortSpecification')
my_CCallerObj = FunctionPortSpecification with properties: CPrototype: 'real_T add(real_T u1, real_T u2);' InputArguments: [1×2 Simulink.CustomCode.FunctionArgument] ReturnArgument: [1×1 Simulink.CustomCode.FunctionArgument] GlobalArguments: [1×0 Simulink.CustomCode.FunctionArgument]
FunctionArgument
object for the 1st input
port:inargone = my_CCallerObj.InputArguments(1)
inargone = FunctionArgument with properties: Name: 'u1' PortNumber: 1 Size: '1' Type: 'double' Label: 'u1' Scope: 'Parameter'
inargone.Label = 'inputport1'
inargone = FunctionArgument with properties: Name: 'u1' PortNumber: 1 Size: '1' Type: 'double' Label: 'inputport1' Scope: 'Parameter'
Version History
Introduced in R2019b