GetViReal64EntryFromString

IVI Library

Ivi_GetViReal64EntryFromString

Usage

ViStatus Ivi_GetViReal64EntryFromString(ViChar commandString[ ], IviRangeTablePtr rangeTable, ViReal64* discreteOrMinValue, ViReal64* maxValue, ViReal64* coercedValue, ViInt32* tableIndex, ViInt32* commandValue);

Purpose

This function finds the first range table entry for which the cmdString field matches the string you specify. If the function finds an entry, it returns the contents of the entry. If it does not find an entry, it returns an IVI_ERROR_INVALID_VALUE error.

The function compares strings in a case-sensitive manner.

If the string you specify terminates with a carriage return ('\r') or newline ('\n') character, the cmdString fields in the table do not have to contain the termination character. The function considers the strings to match if the string you specify begins with the string in the cmdString field, followed by a carriage return, newline, or ASCII NUL byte.

The function returns the discreteOrMinValue, maxValue, and coercedValue fields as ViReal64 values.

Parameters

Name Type Description
commandString ViChar[ ]

Specify the command string that you want to find in the range table.

If the string you specify terminates with a carriage return ('\r') or newline ('\n') character, the cmdString fields in the table do not have to contain the termination character. The function considers the strings to match if the string you specify begins with the string in the cmdString field, followed by a carriage return, newline, or ASCII NUL byte.

rangeTable IviRangeTablePtr

Specify the address of the range table in which to search for the command string.

discreteOrMinValue ViReal64*

If the search succeeds, this parameter returns the value of the discreteOrMinValue field of the entry.

You can pass VI_NULL for the parameter if you are not interested in this value.

maxValue ViReal64*

If the search succeeds, this parameter returns the value of the maxValue field of the entry.

You can pass VI_NULL for the parameter if you are not interested in this value.

coercedValue ViReal64*

Specify the coerced value that you want to find in the range table.

tableIndex ViInt32*

If the search succeeds, this parameter returns the 0-based index of the entry.

You can pass VI_NULL for the parameter if you are not interested in this value.

commandValue ViInt32*

Specify the command value that you want to find in the range table.

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