QBaseEleDevice Class Reference

Inherited by QBessel, QFrontEnd, and QPulser.

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 int, QDaqChannel > &Channels)
 dtor
virtual ~QBaseEleDevice ()
 dtor
virtual const QErrorSetInt (int Id, size_t Value, const std::string &What, QAddressing_t Add)=0
virtual const QErrorSetInt (int Crate, int Board, int Ch, size_t Value, const std::string &What)=0
virtual const QErrorGetInt (int Id, size_t &Value, const std::string &What, QAddressing_t Add)=0
virtual const QErrorGetInt (int Crate, int Board, int Channel, size_t &Value, const std::string &What)=0
virtual const QErrorGetString (int Id, std::string &Text, const std::string &What, QAddressing_t Add)=0
virtual const QErrorStart (int Id, const std::string &What, QAddressing_t Add)=0
virtual const QErrorStart (int Crate, int Board, int Channel, const std::string &What)=0
const QErrorGetQError ()
virtual void Dump ()
 Dump mapping on screen (only for debug purpose).
QEleBaseInterfaceGetInterface ()
 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 QErrorCreateLgChannels ()
 Create the logical channel mapping exploiting the information stored on the database.
const QErrorCreateIdChannels ()
 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
QEleBaseInterfacefFace
QApolloErrorfErr
std::map< int, QEleChannel * > fPhyChannels
std::map< int, QEleChannel * > fIdChannels
const std::map< unsigned int,
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

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 int, 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

References CreateIdChannels(), CreateLgChannels(), fErr, GetMode(), and QApolloError::Reset().


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.

References fDevice.

Referenced by CreateIdChannels(), CreateLgChannels(), and Dump().

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.

References fMode.

Referenced by Dump(), and QBaseEleDevice().

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.

References Dump(), fChannels, fErr, fIdChannels, fPhyChannels, GetDeviceType(), QSlowControlServer::GetInstance(), QApolloError::GetQError(), QApolloError::Set(), and QSlowControlServer::SetBaseMode().

Referenced by QBaseEleDevice().

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

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

Returns:
a QError with the current error status.

References fChannels, fErr, fFace, fIdChannels, GetDeviceType(), QSlowControlServer::GetInstance(), QApolloError::GetQError(), QApolloError::Set(), and QSlowControlServer::SetBaseMode().

Referenced by QBaseEleDevice().

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

References fErr, fPhyChannels, QSLOW_LG, and QApolloError::Set().


Member Data Documentation

Used communication interface (QElePPortInterface, QEleNetworkInterface, etc)

Referenced by CreateIdChannels(), and GetInterface().

Interface for error handling

Referenced by CreateIdChannels(), CreateLgChannels(), GetEleChannel(), and QBaseEleDevice().

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

Map of electronics channel ordered by Physical Channels

Referenced by CreateLgChannels(), Dump(), and GetEleChannel().

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

Map of electronics channel ordered by Id

Referenced by CreateIdChannels(), and CreateLgChannels().

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

Map of Daq channels

Referenced by CreateIdChannels(), and CreateLgChannels().

QSlowTypes::QSlowDevice_t QBaseEleDevice::fDevice [private]

Device Type: QSLOW_FRONTEND, QSLOW_BESSEL, QSLOW_PULSER

Referenced by GetDeviceType().

QSlowTypes::QSlowMode_t QBaseEleDevice::fMode [private]

Server Mode: QSLOW_BASE_MODE, QSLOW_TUNING_MODE, QSLOW_RUN_MOD

Referenced by GetMode().


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

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