Writing S-Functions Previous page   Next Page
mdlSetOutputPortDataType

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

C Syntax

C Arguments

S
   SimStruct representing an S-Function block.

port
   Index of an output port.

id
   Data type ID.

M Syntax

M Arguments

s
   Instance of Simulink.MSFcnRunTimeBlock class representing the S-Function block.

port
   Integer value specifying index of port to be set.

typeId
   Integer value specifying ID of port's data type. Use s.getDatatypeName(typeId) to get the data type's name.

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, C++, M

See Also

ssSetOutputPortDataType, ssSetErrorStatus


Previous page  mdlSetOutputPortComplexSignal mdlSetOutputPortDimensionInfo Next page

© 1994-2005 The MathWorks, Inc.