PollInstrumentErrors
Queries the instrument for device errors.
Syntax
Section titled “Syntax”virtual HRESULT PollInstrumentErrors();Return value
Section titled “Return value”Returns S_OK if the device indicated there were no errors, otherwise a failure HRESULT.
Remarks
Section titled “Remarks”By default, the PollInstrumentErrors function issues a “*ESR?” query to the device and parses the response to determine if an error occurred. If an error was reported by the device, an error HRESULT is returned. Driver implementers may override this function to provide specialized logic for interrogating their device for errors.
This function is typically not called directly by user code. Rather, it is used internally in the implementation of various Nimbus Template Library I/O functions, as demonstrated in the example below.
Example
Section titled “Example”The following example demonstrates use of the PollInstrumentErrors function.
inline HRESULT CIoSession::WriteString(const CString& strData, bool bFlush, long lTimeout){ HRESULT hr = S_OK;
hr = WriteStringNoPoll(strData, bFlush, lTimeout);
if (SUCCEEDED(hr)) { hr = PollInstrumentErrors(); }
return hr;}