GetUserChannelName

IVI Library

Ivi_GetUserChannelName

Usage

ViStatus Ivi_GetUserChannelName(ViSession vi, ViChar channelString[ ], ViConstString* userChannelName);

Purpose

This function finds the highest-level channel name that corresponds to the specific driver channel string you specify. It returns a pointer to the name in the User Channel Name output parameter.

If you specify a channel string that the end-user assigns to a virtual channel name in the ivi.ini configuration file, the function returns a pointer to the virtual channel name. If the end-user assigns the channel string to multiple virtual channel names, the function returns a pointer to the first virtual channel name it finds.

If no virtual channel names correspond to the channel string and the channel string is in the channel table that the specific instrument driver defines, the function returns a pointer to the channel string. If the channel string is not in the table, the function sets the User Channel Name output parameter to VI_NULL 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.

channelString ViChar[ ]

A specific driver channel string. The specific instrument driver specifies the valid channel strings using Ivi_BuildChannelTable and Ivi_AddToChannelTable.

userChannelName ViConstString*

The highest-level channel name that corresponds to the specific driver channel string you pass in the Channel String parameter.

Do not modify the contents of the channel name.

This might be a virtual channel name, the channel string, or VI_NULL.

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