| Writing S-Functions | ![]() |
Set the data type of an output port.
C Syntax
Ada Syntax
procedure ssSetOutputPortDataType(S : in SimStruct; port : in Integer := 0; id : in Integer); Arguments
S
SimStruct representing an S-Function block or a Simulink model.
ID of the data type accepted by port.
Description
Use this function in mdlInitializeSizes to set the data type of the output port specified by port. If the output port's data type is determined dynamically, for example, from the data type of a block parameter, set the data type to DYNAMICALLY_TYPED.
Languages
Example
Suppose that you want to create an S-function with two output ports, the first of which gets its data type from a block parameter and the second of which outputs signals of type int16_T. The following code sets up the data types.
See Also
ssGetOutputPortDataType
| ssSetOutputPortComplexSignal | ssSetOutputPortDimensionInfo | ![]() |