BaseInstrument Class Reference

Inheritance diagram for BaseInstrument:

PowerSupply Agilent6627A

List of all members.


Detailed Description

Base Class for all the instrumentation devices.

Author:
Andrea Giachero (Andrea.Giachero@lngs.infn.it)

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

Member Enumeration Documentation

Instrument Types.

Enumerator:
POWER_SUPPLY  Power Supply
DIGITALMM  Digital Multimeter
OSCILLOSCOPE  Oscilloscope
FUN_GENERATOR  Function generator


Constructor & Destructor Documentation

BaseInstrument::BaseInstrument ( const std::string  name,
const std::string  vendor,
InstrumentType_t  inst 
)

ctor

Parameters:
name Instrument name
vendor Instrument vendor
inst Instrument Type (Power Supply, Digital Multimeters, etc)

References DIGITALMM, FUN_GENERATOR, OSCILLOSCOPE, and POWER_SUPPLY.


Member Function Documentation

virtual size_t BaseInstrument::GetErrorCode (  )  const [pure virtual]

Get the error code.

Returns:
if an error occurred returns the related error code

Implemented in Agilent6627A.

virtual const std::string& BaseInstrument::GetErrorMsg (  )  const [pure virtual]

Get the error message.

Returns:
if an error occurred returns the related error message Otherwise return "No Error"

Implemented in Agilent6627A.


Member Data Documentation

const std::string BaseInstrument::f_name [private]

Device Name

Referenced by GetName().

const std::string BaseInstrument::f_vendor [private]

Vendor Name

Referenced by GetVendor().

Instrument Type

Referenced by GetInstrumentCode().


The documentation for this class was generated from the following files:

Generated on Tue Nov 16 10:50:01 2010 for CUORE Software by  doxygen 1.5.6