Documentation

xPCGetSigIdxfromLabel

Return array of signal indices

Prototype

int xPCGetSigIdxfromLabel(int port, const char *sigLabel, int *sigIds);

Arguments

port

Enter the value returned by the function xPCOpenTcpIpPort.

sigLabel

Character string with the name of a signal label.

sigIds

Return array of signal indices.

Return

If the function finds a signal, it fills an array sigIds with signal indices and returns 0. If it does not find a signal, it returns -1.

Description

The xPCGetSigIdxfromLabel function returns in sigIds the array of signal indices for signal sigName. This function assumes that you have labeled the signal for which you request the indices (see the Signal name parameter of the Signal Properties Controls (Simulink)). The Simulink® Real-Time™ software refers to Simulink signal names as signal labels. The creator of the custom program already knows the signal name/label. Signal labels must be unique.

sigIds must be large enough to contain the array of indices. You can use the xPCGetSigLabelWidth function to get the amount of memory that the program must allocate for the sigIds array.

Introduced in R2007a

Was this topic helpful?