Returns channel name(s) from a one-based index. Use the NIDCPOWER_ATTR_CHANNEL_COUNT attribute to determine the upper bound of valid values for index.

Syntax

ViStatus _VI_FUNC niDCPower_GetChannelName(ViSession vi, ViInt32 index, ViInt32 bufferSize, ViChar channelName[])

Remarks

Use this function to identify the fully qualified names of channels. Fully qualified channel names are required to access channels in multi-instrument sessions.

Parameters

NameDirectionTypeDescription
vi[in]ViSession

Identifies a particular instrument session. vi is obtained from the niDCPower_InitializeWithIndependentChannels function.

index[in]ViInt32

Specifies which channel name to return. The index values begin at 1.

bufferSize[in]ViInt32

Specifies the number of bytes in the ViChar array you specify for channelName. If the channelName, including the terminating NUL byte, contains more bytes than you indicate in this attribute, the function copies (buffer size - 1) bytes into the buffer, places an ASCII NUL byte at the end of the buffer, and returns the buffer size you must pass to get the entire value. For example, if the value is 123456 and the buffer size is 4, the function places 123 into the buffer and returns 7.

If you pass 0, you can pass VI_NULL for channelName.

channelName[out]ViChar[]

Returns a string of the channel name(s).

Returns

Reports the status of this operation. To obtain a text description of the status code, call niDCPower_error_message. To obtain additional information concerning the error condition, call niDCPower_GetError. The general meaning of the status code is as follows:

Value

Meaning

0

Success

Positive Values

Warnings

Negative Values

Errors