Specify the number of input ports that a block has
boolean_T ssSetNumInputPorts(SimStruct *S, int_T nInputPorts)
S
SimStruct representing an S-Function block.
nInputPorts
Number of input ports on the block represented byS
. Must be a nonnegative integer.
The Boolean valuetrue
if successful. Otherwise, returnsfalse
.
Use inmdlInitializeSizes
to set the number of input ports to a nonnegative integer. Invoke it using
if (!ssSetNumInputPorts(S,nInputPorts)) return;
wheressSetNumInputPorts
returnsfalse
ifnInputPorts
is negative or an error occurs while creating the ports.
C, C++
See the S-functionsfun_multirate.c
used insfcndemo_sfun_multirate
.