GPIBBaseInterface Class Reference

Inheritance diagram for GPIBBaseInterface:

GPIBUSBniInterface

List of all members.


Detailed Description

Base GPIB interface, all the GPIB interfaces must be inherit from it.

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

Public Member Functions

 GPIBBaseInterface (int board_idx, int primary_add, int secondary_add)
 ctor
virtual ~GPIBBaseInterface ()
 dtor
virtual bool DoCommand (const std::string &cmd)=0
 Built GPIB command to send to the device. No answer from the device is expected.
virtual bool DoCommand (const std::string &cmd, std::string &answer)=0
 Built GPIB command to send to the device. An answer from the device is expected.
virtual bool IsError ()=0
 return true if an error is occured
virtual size_t GetErrorCode ()=0
 Getter for the error code.
virtual std::string GetErrorMsg ()=0
 Getter for the error message.
virtual size_t GetStatusCode ()=0
 Getter for the current status code.
virtual std::string GetStatusMsg ()=0
 Getter for the status message.
const int GetBoardIndex () const
 Getter for the board index.
const int GetPrimaryAddress () const
 Getter for the primary address.
const int GetSecondaryAddress () const
 Getter for the secondary address.
const
QSlowTypes::QSlowEleInterface_t 
GetType () const
 get interface type

Protected Member Functions

virtual bool Open ()=0
 Open GPIB device.
virtual bool Close ()=0
 Close GPIB device.
virtual bool Clear ()=0
 clean GPIB device

Private Attributes

const int f_board_idx
const int f_primary_add
const int f_secondary_add
const
QSlowTypes::QSlowEleInterface_t 
f_type

Constructor & Destructor Documentation

GPIBBaseInterface::GPIBBaseInterface ( int  board_idx,
int  primary_add,
int  secondary_add 
)

ctor

Parameters:
board_idx GPIB interface Board Index (GPIB0 = 0, GPIB1 = 1, ...)
primary_add GPIB primary address
secondary_add GPIB secondary address


Member Function Documentation

virtual bool GPIBBaseInterface::DoCommand ( const std::string &  cmd  )  [pure virtual]

Built GPIB command to send to the device. No answer from the device is expected.

Parameters:
cmd commad to send
Returns:
true on success, false on failure. In case of failure the error code is set. The error code can be retrieved by mean of GetErrorCode() while the error message can be retrieved by mean of GetErrorMsg()

Implemented in GPIBUSBniInterface.

virtual bool GPIBBaseInterface::DoCommand ( const std::string &  cmd,
std::string &  answer 
) [pure virtual]

Built GPIB command to send to the device. An answer from the device is expected.

Parameters:
cmd commad to send
answer response from the device.
Returns:
true on success, false on failure. In case of failure the error code is set. The error code can be retrieved by mean of GetErrorCode() while the error message can be retrieved by mean of GetErrorMsg()

Implemented in GPIBUSBniInterface.

virtual size_t GPIBBaseInterface::GetErrorCode (  )  [pure virtual]

Getter for the error code.

Returns:
if an error occured returns the related errorcod

Implemented in GPIBUSBniInterface.

virtual std::string GPIBBaseInterface::GetErrorMsg (  )  [pure virtual]

Getter for the error message.

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

Implemented in GPIBUSBniInterface.

Referenced by QSlowControlServer::LoadInstrumentDevice().

virtual std::string GPIBBaseInterface::GetStatusMsg (  )  [pure virtual]

Getter for the status message.

Returns:
string filled with the current device status

Implemented in GPIBUSBniInterface.

Referenced by QSlowControlServer::LoadInstrumentDevice().

virtual bool GPIBBaseInterface::Open (  )  [protected, pure virtual]

Open GPIB device.

Returns:
true on success, false on failure. In case of failure the error code is set. The error code can be retrieved by mean of GetErrorCode() while the error message can be retrieved by mean of GetErrorMsg()

Implemented in GPIBUSBniInterface.

virtual bool GPIBBaseInterface::Close (  )  [protected, pure virtual]

Close GPIB device.

Returns:
true on success, false on failure. In case of failure the error code is set. The error code can be retrieved by mean of GetErrorCode() while the error message can be retrieved by mean of GetErrorMsg()

Implemented in GPIBUSBniInterface.

virtual bool GPIBBaseInterface::Clear (  )  [protected, pure virtual]

clean GPIB device

Returns:
true on success, false on failure. In case of failure the error code is set. The error code can be retrieved by mean of GetErrorCode() while the error message can be retrieved by mean of GetErrorMsg()

Implemented in GPIBUSBniInterface.


Member Data Documentation

const int GPIBBaseInterface::f_board_idx [private]

Board Index

Referenced by GetBoardIndex().

const int GPIBBaseInterface::f_primary_add [private]

Primary Address

Referenced by GetPrimaryAddress().

Secondary Address

Referenced by GetSecondaryAddress().

const QSlowTypes::QSlowEleInterface_t GPIBBaseInterface::f_type [private]

Interface type

Referenced by GetType().


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