SetValInStringCallback

IVI Library

Ivi_SetValInStringCallback

Usage

ViStatus Ivi_SetValInStringCallback(ViSession vi, ViAttr attributeID, ViChar value[ ]);

Purpose

This function sets the value of a ViString attribute in the context of the read or coerce callback function for it.

All read functions for ViString attributes must use this function to report the new value of the attribute. All coerce functions for ViString attributes must use this function to report the coerced value.

Parameters

Name Type Description
vi ViSession

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

attributeID ViAttr

Pass the attribute ID that the ViString attribute read or coerce callback receives.

value ViChar[ ]

The value that you want to report from the read or coerce callback.

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