Writing S-Functions    
ssGetInputPortBufferDstPort

Determine the output port that is sharing this input port's buffer.

Syntax

Arguments

S
   SimStruct representing an S-Function block.

inputPortIdx
   Index of the port overwritten by an output port.

Description

Use in any run-time S-function callback routine to determine the output port that is overwriting the specified input port. This can be used when you have specified the following:

If you have this set of conditions, Simulink can use the same memory buffer for an input port and an output port. Simulink determines which ports share memory buffers. Use this function any time after model initialization to get the index of the output port that reuses the specified input port's buffer. If none of the S-function's output ports reuse this input port buffer, this macro returns INVALID_PORT_IDX (= -1).

Languages

C

See Also
ssSetNumInputPorts, ssSetInputPortOverWritable


  ssGetInlineParameters ssGetInputPortComplexSignal