ssDeclareSimulinkFunction
Declare Simulink Function with a given function prototype and scope.
Syntax
void ssDeclareSimulinkFunction(SimStruct *S, char *fcnPrototype, SSSimulinkFunctionPtr fcnPtr, SSSimulinkFunctionVisibility fcnVisibility)
Arguments
-
S
-
SimStruct representing an S-Function block.
-
fcnPrototype
-
Interface between a function caller and a Simulink Function.
-
fcnPtr
-
指针to local function.
-
fcnVisibility
-
Enumerated type
SSSimulinkFunctionVisibility
with two permissible values,SS_SCOPED_VISIBILITY
andSS_GLOBAL_VISIBILITY
.
Returns
No return value.
Description
char fcnPrototype[] = "y = timestwo(u)"; ssDeclareSimulinkFunction(S, fcnPrototype, "timestwo", SS_GLOBAL_VISIBILITY);
Languages
C, C++
Example
The modelsfcndemo_simulinkfunction_getset
is an S-function example that models an object with get and set methods using two scoped Simulink Functions.
See Also
ssCallSimulinkFunction
,ssDeclareFunctionCaller
,ssGetSimulinkFunctionInput
,ssGetSimulinkFunctionOutput
,ssQuery金宝appSimulinkFunction
,ssSetSimulinkFunctionArgComplexity
,ssSetSimulinkFunctionArgDataType
,ssSetSimulinkFunctionArgDimensions