Documentation

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.

ssGetInputPortConnected

Determine whether a port is connected to a nonvirtual block

Syntax

int_T ssGetInputPortConnected(SimStruct *S, int_T port)

Arguments

S

SimStruct representing an S-Function block.

port

Port whose connection status is needed.

Returns

Either an int_T (1 or 0) or boolean_T (true or false) value indicating if the input port specified by the index port is connected to a nonvirtual block.

Description

Returns 1 (true) if the specified port on the block represented by S is connected directly or indirectly, i.e., via virtual blocks, to a nonvirtual block. Can be invoked anywhere except in mdlInitializeSizes or mdlCheckParameters. The S-function must have previously set the number of input ports in mdlInitializeSizes, using ssSetNumInputPorts.

Languages

C, C++

Example

See the S-function sfun_dynsize.c used in sfcndemo_sfun_dynsize.

Introduced before R2006a

Was this topic helpful?