Writing S-Functions | ![]() ![]() |
Get the vector of signal elements emitted by an output port.
Syntax
Arguments
S
SimStruct representing an S-Function block.
Description
Returns a pointer to the vector of signal elements output by port
.
Note
If the port outputs a signal of type double (real_T ), you must use ssGetOutputPortRealSignal to get the signal vector.
|
Example
Assume that the output port data types are int16_T
.
nOutputPorts = ssGetNumOutputPorts(S); for (i = 0; i < nOutputPorts; i++) { int16_T *y = (int16_T *)ssGetOutputPortSignal(S,i); int_T ny = ssGetOutputPortWidth(S,i); for (j = 0; j < ny; j++) { SomeFunctionToFillInOutput(y[j]); } }
Languages
See Also
ssGetOutputPortRealSignal
![]() | ssGetOutputPortSampleTime | ssGetOutputPortSignalAddress | ![]() |