Public Types | |
enum | InstrumentType_t { POWER_SUPPLY = 0, DIGITALMM = 1, OSCILLOSCOPE = 3, FUN_GENERATOR = 4 } |
Instrument Types. More... | |
Public Member Functions | |
BaseInstrument (const std::string name, const std::string vendor, InstrumentType_t inst) | |
ctor | |
virtual | ~BaseInstrument () |
dtor | |
const InstrumentType_t | GetInstrumentCode () const |
Get the Instrument Type Code. | |
const std::string & | GetInstrumentDes () const |
Get the description about the Instrument Type. | |
const std::string & | GetName () const |
Get Instrument Name. | |
const std::string & | GetVendor () const |
GetInstrument Vendor. | |
virtual std::string | GetIDN ()=0 |
Get the instrument identification. | |
virtual bool | IsError () const =0 |
Return true if an error occurred. | |
virtual size_t | GetErrorCode () const =0 |
Get the error code. | |
virtual const std::string & | GetErrorMsg () const =0 |
Get the error message. | |
Private Attributes | |
const std::string | f_name |
const std::string | f_vendor |
const InstrumentType_t | f_type |
Static Private Attributes | |
static std::map < InstrumentType_t, std::string > | g_instruments |
BaseInstrument::BaseInstrument | ( | const std::string | name, | |
const std::string | vendor, | |||
InstrumentType_t | inst | |||
) |
ctor
name | Instrument name | |
vendor | Instrument vendor | |
inst | Instrument Type (Power Supply, Digital Multimeters, etc) |
References DIGITALMM, FUN_GENERATOR, OSCILLOSCOPE, and POWER_SUPPLY.
virtual size_t BaseInstrument::GetErrorCode | ( | ) | const [pure virtual] |
Get the error code.
Implemented in Agilent6627A.
virtual const std::string& BaseInstrument::GetErrorMsg | ( | ) | const [pure virtual] |
Get the error message.
Implemented in Agilent6627A.
const std::string BaseInstrument::f_name [private] |
Device Name
Referenced by GetName().
const std::string BaseInstrument::f_vendor [private] |
Vendor Name
Referenced by GetVendor().
const InstrumentType_t BaseInstrument::f_type [private] |
Instrument Type
Referenced by GetInstrumentCode().