GetRepCapIndex

IVI Library

Ivi_GetRepCapIndex

Usage

ViStatus Ivi_GetRepCapIndex(ViSession vi, ViChar repeatedCapabilityName[ ], ViChar repeatedCapabilityIdentifier[ ], ViInt32* index);

Purpose

This function obtains the 1-based index of a repeated capability in the internal repeated capability for an IVI session.

If you pass VI_NULL or an empty string for the Repeated Capability Identifier parameter, this function sets the Index output parameter to 1.

If you pass a specific driver identifier for the Repeated Capability Identifier parameter, this function sets the Index output parameter to the 1-based index of the identifier string in the internal repeated capability table.

If you pass a virtual repeated capability identifier, this function returns the one-based index of the specific driver string to which the virtual identifier coerces.

If you pass any other value for the Repeated Capability parameter, this function sets the Index output parameter to 0 and returns an error code.

Parameters

Name Type Description
vi ViSession

The ViSession handle that you obtain from Ivi_SpecificDriverNew. The handle identifies a particular IVI session.

repeatedCapabilityName ViChar[ ]

Pass a string containing the name of the repeated capability on which to operate. For instance, if you are working with the table of channel names, pass in the string "Channel".

repeatedCapabilityIdentifier ViChar[ ]

Pass the repeated capability name for which you want to obtain the index.

The parameter accepts VI_NULL, and empty string, a specific driver-defined repeated capability identifier, or a virtual repeated capability identifier.

index ViInt32*

A 1-based index into the repeated capability table.

If you pass an invalid value for the Repeated Capability Identifier parameter, the function sets this output parameter to 0 and returns an error code.

Return Value

Contains the status code that the function call returns. IVI engine functions can return error and warning values from several sets of status codes. Some status codes are unique to the IVI engine. Other status codes are the same codes that VISA Library functions return. Still others are error or warning values that functions in specific instrument drivers return. Each set of status codes has its own numeric range.

Regardless of the source of the status code, 0 always indicates success, a positive value indicates a warning, and a negative value indicates an error.

Related Topic

IVI Status Codes