niDCPower_GetNextInterchangeWarning

NI-DCPower Function Reference

niDCPower_GetNextInterchangeWarning

ViStatus niDCPower_GetNextInterchangeWarning (ViSession vi, ViInt32 bufferSize, ViChar interchangeWarning[]);

Purpose

This function returns the interchangeability warning associated with the IVI session. It retrieves and clears the earliest instance in which the class driver recorded an interchangeability warning. Interchangeability warnings indicate that using your application with a different device may cause a different behavior.

NI-DCPower performs interchangeability checking when the NIDCPOWER_ATTR_INTERCHANGE_CHECK attribute is set to VI_TRUE. This function returns an empty string in warning if no interchangeability warnings remain for the session. In general, NI-DCPower generates interchangeability warnings when an attribute that affects the behavior of the device is in a state that you did not specify.

Parameters

Input
Name Type Description
vi ViSession Identifies a particular instrument session. vi is obtained from the niDCPower_init or niDCPower_InitWithOptions function.
bufferSize ViInt32 Specifies the number of bytes in the ViChar array you specify for interchangeWarning. If the next interchangeability warning string, 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 a negative number, the function copies the value to the buffer regardless of the number of bytes in the value.

If you pass 0, you can pass VI_NULL for interchangeWarning.
Output
Name Type Description
interchangeWarning ViChar[] Returns the next interchange warning for the IVI session. If there are no interchange warnings, the function returns an empty string.

Return Value

Name Type Description
StatusViStatus

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.