Main Content

ssGetInputPortBufferDstPort

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

Syntax

int_T ssGetInputPortBufferDstPort(SimStruct *S, int_T inputPortIdx)

Arguments

S

SimStruct representing an S-Function block.

inputPortIdx

Index of an input port onS

Returns

Theint_Tindex of the output port that reuses the memory buffer of the input port indicated by the indexinputPortIdx. If none of the S-function's output ports reuse this input port buffer, returnsINVALID_PORT_IDX(-1).

Description

Use this function any time after model initialization to get the index of the output port that reuses the specified input port's buffer.

During model compilation, the Simulink®engine may allocate the same memory buffer to the specified input port and an output port of this S-function if the following conditions apply:

语言

C, C++

Version History

Introduced before R2006a