| Writing S-Functions | ![]() |
Specify the number of input ports that a block has.
C Syntax
void ssSetNumInputPorts(SimStruct *S, int_T nInputPorts)
Ada Syntax
procedure ssSetNumInputPorts(S : in SimStruct; nInputPorts : in Integer);
Arguments
S
SimStruct representing an S-function block.
S. Must be a nonnegative integer.
Description
Used in mdlInitializeSizes to set to the number of input ports to a nonnegative integer. It should be invoked using
if (!ssSetNumInputPorts(S,nInputPorts)) return;
where ssSetNumInputPorts returns 0 if nInputPorts is negative or an error occurred while creating the ports. When this occurs, Simulink displays an error.
Languages
See Also
ssSetInputPortWidth, ssSetNumOutputPorts
| ssSetNumDWork | ssSetNumIWork | ![]() |