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 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 int, QDaqChannel > *const | fChannels |
Private Member Functions | |
size_t | GetPulserBoard (const std::string &BoardName) |
Private Attributes | |
QSlowTypes::QSlowDevice_t | fDevice |
QSlowTypes::QSlowMode_t | fMode |
QBaseEleDevice::QBaseEleDevice | ( | QEleBaseInterface * | IFace, | |
QSlowTypes::QSlowDevice_t | Device, | |||
QSlowTypes::QSlowMode_t | Mode, | |||
std::map< unsigned int, QDaqChannel > & | Channels | |||
) |
dtor
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().
const QSlowTypes::QSlowDevice_t QBaseEleDevice::GetDeviceType | ( | ) | const [inline, protected] |
Get electronics device type.
References fDevice.
Referenced by CreateIdChannels(), CreateLgChannels(), and Dump().
const QSlowTypes::QSlowMode_t QBaseEleDevice::GetMode | ( | ) | const [inline, protected] |
Get current 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.
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.
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.
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 |
References fErr, fPhyChannels, QSLOW_LG, and QApolloError::Set().
QEleBaseInterface* QBaseEleDevice::fFace [protected] |
Used communication interface (QElePPortInterface, QEleNetworkInterface, etc)
Referenced by CreateIdChannels(), and GetInterface().
QApolloError* QBaseEleDevice::fErr [protected] |
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().