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 that represents 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
andSS_GLOBAL_VISIBILITY
.
Returns
No return value.
Description
char fcnPrototype[] = "y = timestwo(u)"; ssDeclareSimulinkFunction(S,fcnPrototype,"timestwo",SS_GLOBAL_VISIBILITY);
Languages
C, C++
Examples
The model sfcndemo_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
, ssQuerySimulinkFunction
, ssSetSimulinkFunctionArgComplexity
, ssSetSimulinkFunctionArgDataType
, ssSetSimulinkFunctionArgDimensions
Version History
Introduced in R2018a