Writing S-Functions | ![]() ![]() |
Specify the number of output ports that a block has.
C Syntax
void ssSetNumInputPorts(SimStruct *S, int_T nOutputPorts)
Ada Syntax
procedure ssSetNumOutputPorts(S : in SimStruct; nOutputPorts : in Integer);
Arguments
S
SimStruct representing an S-function block.
S
. Must be a nonnegative integer.
Description
Use in mdlInitializeSizes
to set to the number of output ports to a nonnegative integer. It should be invoked using
if (!ssSetNumOutputPorts(S,nOutputPorts)) return;
where ssSetNumOutputPorts
returns a 0 if nOutputPorts
is negative or an error occurred while creating the ports. When this occurs, and you return out of your S-function, Simulink will display an error message.
Languages
See Also
ssSetInputPortWidth, ssSetNumInputPorts
![]() | ssSetNumNonsampledZCs | ssSetNumPWork | ![]() |