Main Content

ssCallSimulinkFunction

Call a declared Simulink Function of a given function prototype at run time.

Syntax

void ssCallSimulinkFunction(SimStruct *S, char *scopedFcnName, int_T numInArgs, ssFcnCallExecArg execInArgs, int_T numOutArgs, ssFcnCallExecArg execOutArgs)

Arguments

S

SimStruct that represents an S-Function block.

scopedFcnName

Name of a Simulink Function with its Visibility parameter set to scoped. Function must have previously been declared using ssDeclareSimulinkFunction.

numInArgs

Number of input arguments.

execInArgs

Information for input arguments.

numOutArgs

Number of output arguments.

execOutArgs

Information for output arguments.

Returns

No return value.

Examples

char fcnPrototype[] = "y = timestwo(u)";
ssDeclareFunctionCaller(S, fcnPrototype); 
ssCallSimulinkFunction(S, "timestwo", 1, inArgs, 1, outArgs);

Languages

C, C++

Version History

Introduced in R2018a