Declare Simulink Function with a given function prototype and scope.
void ssDeclareSimulinkFunction(SimStruct *S, char *fcnPrototype, SSSimulinkFunctionPtr fcnPtr, SSSimulinkFunctionVisibility fcnVisibility)
S
SimStruct representing an S-Function block.
fcnPrototype
Interface between a function caller and a Simulink Function.
fcnPtr
Pointer to local function.
fcnVisibility
Enumerated type SSSimulinkFunctionVisibility
with
two permissible values, SS_SCOPED_VISIBILITY
and
SS_GLOBAL_VISIBILITY
.
No return value.
char fcnPrototype[] = "y = timestwo(u)"; ssDeclareSimulinkFunction(S, fcnPrototype, "timestwo", SS_GLOBAL_VISIBILITY);
C, C++
The model sfcndemo_simulinkfunction_getset
is an S-function
example that models an object with get and set methods using two scoped Simulink
Functions.
ssCallSimulinkFunction
, ssDeclareFunctionCaller
, ssGetSimulinkFunctionInput
, ssGetSimulinkFunctionOutput
, ssQuerySimulinkFunction
, ssSetSimulinkFunctionArgComplexity
, ssSetSimulinkFunctionArgDataType
, ssSetSimulinkFunctionArgDimensions