Ivi_NeedToCheckStatus
Usage
ViBoolean = Ivi_NeedToCheckStatus(ViSession vi);
Purpose
This function returns an indication of whether the instrument driver has interacted with the instrument since the last time the IVI engine or the driver checked the status of the instrument.
Typically, the PREFIX_CheckStatus function that is internal to an instrument driver calls Ivi_NeedToCheckStatus to help determine whether it is necessary to invoke the check status callback for the session.
The IVI engine maintains an internal needToCheckStatus variable for each session indicating whether it is necessary to check the status of the instrument. When you create a new session, the initial value of the variable is VI_TRUE. The IVI engine sets the needToCheckStatus variable to VI_TRUE when it invokes the read callback or write callback for an attribute for which the IVI_VAL_DONT_CHECK_STATUS flag is 0. The Ivi_WriteInstrData and Ivi_WriteFromFile functions also set the variable to VI_TRUE. The IVI engine sets the variable to VI_FALSE after it invokes the check status callback successfully.
The Ivi_SetNeedToCheckStatus function allows an instrument driver to set the state of the internal needToCheckStatus variable. A driver typically sets the variable to VI_TRUE before it attempts direct instrument I/O. It sets it to VI_FALSE after it calls the check status callback successfully.
Ivi_NeedToCheckStatus returns the value of the internal needToCheckStatus variable. If the vi parameter is invalid, Ivi_NeedToCheckStatus returns VI_FALSE.
Note Do not call this function unless you have already locked the session. |
Parameters
Name | Type | Description |
---|---|---|
vi | ViSession |
The ViSession handle that you obtain from Ivi_SpecificDriverNew. The handle identifies a particular IVI session. |
Return Value
Returns the value of the Ivi_NeedToCheckStatus variable for the session.
Values:
VI_TRUE (1) | Need to check status |
VI_FALSE(0) | No need to check status |
If you pass an invalid session handle to the function, this parameter returns VI_FALSE.