User`s guide
The C MEX S-Function SimStruct
3-105
ssSetInputPortReusable
(S,inputPortIdx,value)
(continued)
Note that this is a suggestion and not a requirement for
the Simulink engine. If Simulink cannot resolve buffer
reuse in local memory, it resets
value=0 and places the
input port signals into global memory.
ssSetNumOutputPorts
(S,nOutputPorts)
Used in mdlInitializeSizes t o set to the number of
output ports to a nonnegative integer. It should be
invoked using:
if (!ssSetNumOutputPorts(S,nOutputPorts))
return;
wheressSetNumOutputPorts returns a0 if nOutputPorts
is negative or an error o ccurred while creating the ports.
When this occurs, and you return out of your S-function,
Simulink will display an error message.
ssSetOutputPortWidth
(S,outputPortIdx,width)
Used in mdlInitializeSizes (a fter
ssSetNumOutputPorts) to specify a nonzero positive
integer width or
DYNAMICALLY_SIZED for each output port
indexstartingat0.
ssSetOutputPortSampleTime
(S,outputPortIdx,period)
Used in mdlInitializeSizes (a fter
ssSetNumOutputPorts)tospecifythesampletimeperiod
as continuous or as a discrete value for each output port
index. This should only be used if you have specified
port-based sample times.
ssSetOutputPortOffsetTime
(S,outputPortIdx,offset)
Used in mdlInitializeSizes (a fter
ssSetNumOutputPorts) to specify the sample time offset
value for each output port index. This should only be
used i f you have specified the S-function’s sample times
as port-based.
Table 3-7: Input and Output Port Signal SimStruct Macros (Continued)
Macro Description