Writing S-Functions    
mdlSetOutputPortDataType

Set the data type of the signals emitted by an output port.

Syntax

Arguments

S
   SimStruct representing an S-Function block.

port
   Index of an output port.

id
   Data type ID.

Description

Simulink calls this routine to set the data type of port. The S-function must check whether the specified data type is a valid data type for the specified port. If it is a valid data type, it must set the data type of port. Otherwise, it must report an error, using ssSetErrorStatus.

The S-function can also set the data types of other input and output ports if their data types have not been set. Simulink reports an error if the S-function changes the data type of a port whose data type has been set.

If the block does not implement this method, Simulink assumes that the block accepts any data type and sets the input port data type to the specified value.

Languages

C

See Also

ssSetOutputPortDataType, ssSetErrorStatus


  mdlSetOutputPortComplexSignal mdlSetOutputPortDimensionInfo