Click or drag to resize

GetModel

Get the model of the current instrument or the instrument that is simulated.

virtual CString GetModel() const abstract;
Return Value

Returns the current instrument model.

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

The following example demonstrates use of the GetModel function.

C++
// CoAcme4321.cpp
HRESULT Acme4321::Configure()
{
  HRESULT hr = S_OK;

  // This method is NOT supported by the models that end with "B"
  CString strModel = GetModel();
  if (strModel.Right(1) == _T("B"))
    return err.ModelNotSupported(strModel);

  hr = InstrPrintCommand();

  return hr;
}
See Also

Download a complete CHM version of this documentation here.