This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


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


int_T ssGetInputPortBufferDstPort(SimStruct *S, int_T inputPortIdx)



SimStruct representing an S-Function block.


Index of an input port on S


The int_T index of the output port that reuses the memory buffer of the input port indicated by the index inputPortIdx. If none of the S-function's output ports reuse this input port buffer, returns INVALID_PORT_IDX (-1).


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++

Introduced before R2006a

Was this topic helpful?