niDMM_GetNextInterchangeWarning

NI-DMM C/CVI/VB

niDMM_GetNextInterchangeWarning

ViStatus = niDMM_GetNextInterchangeWarning(ViSession Instrument_Handle, ViInt32 Buffer_Size, ViChar Interchange_Warning[])

Purpose

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

The driver performs interchangeability checking when NIDMM_ATTR_INTERCHANGE_CHECK is set to VI_TRUE (1). The function returns an empty string in the Interchange_Warning parameter if no interchangeability warnings remain for the session. In general, the instrument driver generates interchangeability warnings when an attribute that affects the behavior of the instrument is in a state that you did not specify.

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies a particular instrument session. You obtain the Instrument_Handle parameter from niDMM_init or niDMM_InitWithOptions. The default is None.
Buffer_Size ViInt32 Passes the number of bytes in the ViChar array you specify for the Interchange_Warning parameter. If the next interchangeability warning string, including the terminating NULL byte, contains more bytes than you indicate in this parameter, the function copies Buffer_Size –1 bytes into the buffer, places an ASCII NULL 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 the Interchange_Warning buffer parameter. The default value is None.

Output
Name Type Description
Interchange_Warning ViChar[] Returns the next interchange warning for the IVI session. If there are no interchange warnings, the function returns an empty string. The buffer must contain at least as many elements as the value you specify with the Buffer_Size parameter.

Return Value

Name Type Description
Status ViStatus Reports the Status of this operation. To obtain a text description of the status code, call niDMM_error_message. To obtain additional information concerning the error condition, use niDMM_GetError.