GetLogicalNamesList

IVI Library

Ivi_GetLogicalNamesList

Usage

ViStatus Ivi_GetLogicalNamesList(IviLogicalNameEntry** logicalNamesList, ViInt32* numberOfEntries);

Purpose

This function returns a list of the logical names that the IVI engine currently recognizes. You can define logical names in the IVI configuration file.

You pass logical names to class driver initialization functions to identify the physical device and specific driver module you want to use in a session.

The ivi.h include file defines the structure of an entry in the list as follows.

typedef struct

{ViString  logicalName;
ViBoolean  fromFile;
} IviLogicalNameEntry;

The fromFile field is always set to VI_TRUE.

The function dynamically allocates an array of IviLogicalNameEntry structures and returns a pointer to it. The logical names you define at run-time appear before the logical names from the configuration file. The last entry in the array is a termination entry that has VI_NULL in the logicalName field. The function also returns the number of logical names in the list, excluding the termination entry. When you are done with the list, you must free it by calling Ivi_DisposeLogicalNamesList.

Call Ivi_GetNthLogicalName to extract the data from an entry in the list. Do not change the values of any of the entries in the list.

You can pass VI_NULL for the Logical Names List parameter, in which case the function just returns the number of logical names.

Parameters

Name Type Description
logicalNamesList IviLogicalNameEntry**

Returns the pointer to an array of the logical names that the IVI engine currently recognizes.

numberOfEntries ViInt32*

Returns the number of entries in the logical names list, excluding the termination entry.

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