GetSimulate
Indicates if simulation is enabled.
Syntax
Section titled “Syntax”virtual bool GetSimulate() const abstract;Return value
Section titled “Return value”Returns true if simulation is enabled, otherwise false.
Example
Section titled “Example”The following example demonstrates use of the GetSimulate function.
HRESULT Acme4321::Query(double* Frequency, double* Gain){ HRESULT hr = S_OK;
// Do not communicate with instrument if simulation is on if (GetSimulate()) { // Return simulated values *Frequency = 1.2E9; *Gain = 0.5; return S_OK; }
hr = io.QueryNumber(_T("FREQ?"), Frequency); if (SUCCEEDED(hr)) { hr = io.QueryNumber(_T("GAIN?"), Gain); }
return hr;}