Writing S-Functions Previous page   Next Page
mdlSetInputPortComplexSignal

Set the numeric types (real, complex, or inherited) of the signals accepted by an input port

C Syntax

C Arguments

S
   SimStruct representing an S-Function block.

port
   Index of a port.

csig
   Numeric type of signal.

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 whether the port accepts real (0) or complex (1) signals.

Description

Simulink calls this routine to set the input port signal type. The S-function must check whether the specified signal type is a valid type for the specified port. If it is valid, the S-function must set the signal type of the specified input port. Otherwise, it must report an error using ssSetErrorStatus. The S-function can also set the signal types of other input and output ports with unknown signal types. Simulink reports an error if the S-function changes the signal type of a port whose signal type is known.

If the S-function does not implement this routine, Simulink assumes that the S-function accepts a real or complex signal and sets the input port signal type to the specified value.

Languages

C, C++, M

See Also

ssSetInputPortComplexSignal, ssSetErrorStatus


Previous page  mdlSetDefaultPortDimensionInfo mdlSetInputPortDataType Next page

© 1994-2005 The MathWorks, Inc.