Writing S-Functions    
mdlSetInputPortDataType

Set the data types of the signals accepted by an input port.

Syntax

Arguments

S
   SimStruct representing an S-Function block.

port
   Index of a 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 the input 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 they are unknown. 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 routine, Simulink assumes that the block accepts any data type and sets the input port data type to the specified value.

Languages

C

See Also

ssSetInputPortDataType, ssSetErrorStatus


  mdlSetInputPortComplexSignal mdlSetInputPortDimensionInfo