QBaseEleDevice Class Reference

List of all members.

Detailed Description

base class for each electronics device controlled by SlowServer

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


Public Types

enum  QAddressing_t { QSLOW_LG = 0, QSLOW_ID = 1 }
 Addressing Mode. More...

Public Member Functions

 QBaseEleDevice (QEleBaseInterface *IFace, QSlowTypes::QSlowDevice_t Device, QSlowTypes::QSlowMode_t Mode, std::map< unsigned short, QDaqChannel > &Channels)
 dtor
virtual ~QBaseEleDevice ()
 dtor
virtual const QError & SetInt (int Id, size_t Value, const std::string &What, QAddressing_t Add)=0
virtual const QError & SetInt (int Crate, int Board, int Ch, size_t Value, const std::string &What)=0
virtual const QError & GetInt (int Id, size_t &Value, const std::string &What, QAddressing_t Add)=0
virtual const QError & GetInt (int Crate, int Board, int Channel, size_t &Value, const std::string &What)=0
virtual const QError & GetString (int Id, std::string &Text, const std::string &What, QAddressing_t Add)=0
virtual const QError & Start (int Id, const std::string &What, QAddressing_t Add)=0
virtual const QError & Start (int Crate, int Board, int Channel, const std::string &What)=0
const QError & GetQError ()
virtual void Dump ()
 Dump mapping on screen (only for debug purpose).
QEleBaseInterface & GetInterface ()
 Get communication interface.

Protected Member Functions

const QSlowTypes::QSlowDevice_t GetDeviceType () const
 Get electronics device type.
const QSlowTypes::QSlowMode_t GetMode () const
 Get current mode.
const QError & CreateLgChannels ()
 Create the logical channel mapping exploiting the information stored on the database.
const QError & CreateIdChannels ()
 Create the identification mapping exploiting the information stored on the database.
QEleChannel * GetEleChannel (int who, QAddressing_t Add)
 Get the specified electronics channel. This method searchs the channel inside the map fPhyChannels and/or fIdChannels.

Protected Attributes

std::ostringstream fMsgString
QEleBaseInterface * fFace
QApolloError * fErr
std::map< int, QEleChannel * > fPhyChannels
std::map< int, QEleChannel * > fIdChannels
const std::map< unsigned short,
QDaqChannel > *const 
fChannels

Private Member Functions

size_t GetPulserBoard (const std::string &BoardName)

Private Attributes

QSlowTypes::QSlowDevice_t fDevice
QSlowTypes::QSlowMode_t fMode


Member Enumeration Documentation

enum QBaseEleDevice::QAddressing_t

Addressing Mode.

Enumerator:
QSLOW_LG  Addressing by Logical Channel
QSLOW_ID  Addressing by Identification


Constructor & Destructor Documentation

QBaseEleDevice::QBaseEleDevice ( QEleBaseInterface *  IFace,
QSlowTypes::QSlowDevice_t  Device,
QSlowTypes::QSlowMode_t  Mode,
std::map< unsigned short, QDaqChannel > &  Channels 
)

dtor

Parameters:
IFace used communication interface QElePPortInterface, QEleNetworkInterface, etc)
Device electronics device type (QSLOW_FRONTEND, QSLOW_BESSEL, QSLOW_PULSER)
Mode server mode (QSLOW_BASE_MODE, QSLOW_TUNING_MODE, QSLOW_RUN_MODE)
Channels maps containing the active channels


Member Function Documentation

const QSlowTypes::QSlowDevice_t QBaseEleDevice::GetDeviceType (  )  const [inline, protected]

Get electronics device type.

Returns:
device type, possible response: QSLOW_FRONTEND, QSLOW_BESSEL, QSLOW_PULSER.

const QSlowTypes::QSlowMode_t QBaseEleDevice::GetMode (  )  const [inline, protected]

Get current mode.

Returns:
server mode, possible response: QSLOW_BASE_MODE, QSLOW_TUNING_MODE, QSLOW_RUN_MODE.

const QError & QBaseEleDevice::CreateLgChannels (  )  [protected]

Create the logical channel mapping exploiting the information stored on the database.

Returns:
a QError with the current error status.

const QError & QBaseEleDevice::CreateIdChannels (  )  [protected]

Create the identification mapping exploiting the information stored on the database.

Returns:
a QError with the current error status.

QEleChannel * QBaseEleDevice::GetEleChannel ( int  who,
QAddressing_t  Add 
) [protected]

Get the specified electronics channel. This method searchs the channel inside the map fPhyChannels and/or fIdChannels.

Parameters:
who logical channel or identification (who=lg or who=Id)
Add type of addressing. If Add=QSLOW_LG then "who" is the logical channel else if Add=QSLOW_ID then who is the identification
Returns:
a pointer to the specified electronics channel


Member Data Documentation

QEleBaseInterface* QBaseEleDevice::fFace [protected]

Used communication interface (QElePPortInterface, QEleNetworkInterface, etc)

QApolloError* QBaseEleDevice::fErr [protected]

Interface for error handling

std::map<int,QEleChannel*> QBaseEleDevice::fPhyChannels [protected]

Map of electronics channel ordered by Physical Channels

std::map<int,QEleChannel*> QBaseEleDevice::fIdChannels [protected]

Map of electronics channel ordered by Id

const std::map<unsigned short,QDaqChannel>* const QBaseEleDevice::fChannels [protected]

Map of Daq channels

QSlowTypes::QSlowDevice_t QBaseEleDevice::fDevice [private]

Device Type: QSLOW_FRONTEND, QSLOW_BESSEL, QSLOW_PULSER

QSlowTypes::QSlowMode_t QBaseEleDevice::fMode [private]

Server Mode: QSLOW_BASE_MODE, QSLOW_TUNING_MODE, QSLOW_RUN_MOD


The documentation for this class was generated from the following files:
Generated on Fri Mar 6 13:40:42 2009 for CUORE Software by  doxygen 1.5.1