niDMM_GetNextCoercionRecord

NI-DMM C/CVI/VB

niDMM_GetNextCoercionRecord

ViStatus = niDMM_GetNextCoercionRecord(ViSession Instrument_Handle, ViInt32 Buffer_Size, ViChar Coercion_Record[])

Purpose

This function returns the coercion information associated with the IVI session, and it retrieves and clears the oldest instance in which NI-DMM coerced a value you specified to another value.

If you set NIDMM_ATTR_RECORD_COERCIONS to VI_TRUE (1), NI-DMM keeps a list of all coercions it makes on ViInt32 or ViReal64 values that you pass to NI-DMM functions. Use this function to retrieve information from that list.

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 Coercion_Record parameter. If the next coercion record 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 Coercion_Record buffer parameter.

The default value is None.

Output
Name Type Description
Coercion_Record ViChar[] Returns the next Coercion_Record for the IVI session.

If there are no coercions records, 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.