GetSerialNumber
Get the serial number of the current instrument or the instrument that is simulated.
Syntax
Section titled “Syntax”virtual CString GetSerialNumber() const abstract;Return value
Section titled “Return value”Returns the current instrument serial number.
Remarks
Section titled “Remarks”The value returned by this function is established by implementation of the InitializeIdentification function. By default, that function parses the *IDN? result to retrieve detailed information about the connected instrument.
Example
Section titled “Example”The following example demonstrates use of the GetSerialNumber function.
HRESULT Acme4321::Configure(){ HRESULT hr = S_OK;
// This method is NOT supported by instruments with serial numbers that end in "X" CString strSerial = GetSerialNumber(); if (strSerial.Right(1) == _T("X")) return err.ModelNotSupported(GetModel());
hr = InstrPrintCommand();
return hr;}