RcuConf::CommandCoder Class Reference
[Steering classes]

#include <CommandCoder.h>

Inheritance diagram for RcuConf::CommandCoder:

CommandCoderBase

Detailed Description

Command coder used by the InterCom Layer to configure the front-end electronics.

The class is a thin wrapper around the Configurator class. It simply forwards requests to the internal Configurator object.

The class is a singleton, meaning there can be only one object of this class at any given point.

The database connection is chosen at configure time by the configure option --with-datbase.

The Rcu++ connection is always the coder: connection.

Definition at line 77 of file CommandCoder.h.

Public Member Functions

 CommandCoder ()
virtual ~CommandCoder ()
virtual int createDataBlock (char *target, int tag)
virtual long int * getDataBlock ()
virtual std::vector< std::string > getError ()

Protected Member Functions

void init ()
bool readConfig ()

Protected Attributes

RcuDb::Server * fServer
Rcuxx::Rcu * fRcuxx
Rcuxx::Bc * fBcxx
Rcuxx::Altro * fAltroxx
RcufRcu
BcfBc
AltrofAltro
ConfiguratorfConfigurator
int fRet
std::vector< std::string > fErrors
std::string fDbUrl
std::string fRcuUrl
bool fVerbose
bool fDebug
bool fInit
std::string fDetector


Constructor & Destructor Documentation

RcuConf::CommandCoder::CommandCoder  ) 
 

Constructor.

Definition at line 80 of file CommandCoder.cxx.

References fDbUrl, fRcuUrl, fVerbose, and RCUXX_URL.

virtual RcuConf::CommandCoder::~CommandCoder  )  [inline, virtual]
 

Destructor.

Definition at line 83 of file CommandCoder.h.


Member Function Documentation

int RcuConf::CommandCoder::createDataBlock char *  target,
int  tag
[virtual]
 

Create a data block.

Parameters:
target Where to send it
tag The tag
Returns:
Error code

Implements CommandCoderBase.

Definition at line 194 of file CommandCoder.cxx.

References RcuConf::Configurator::ErrorString(), fConfigurator, fErrors, fRet, fVerbose, init(), and RcuConf::Configurator::Write().

long int * RcuConf::CommandCoder::getDataBlock  )  [virtual]
 

Get the command block.

Returns:
data block

Implements CommandCoderBase.

Definition at line 241 of file CommandCoder.cxx.

References fConfigurator, fDebug, fVerbose, RcuConf::Rcu::GetBlock(), and RcuConf::Configurator::RCU().

virtual std::vector<std::string> RcuConf::CommandCoder::getError  )  [inline, virtual]
 

Get list of error strings.

Returns:
List of error strings

Implements CommandCoderBase.

Definition at line 100 of file CommandCoder.h.

References fErrors.

void RcuConf::CommandCoder::init  )  [protected]
 

initialize the command coder

Definition at line 104 of file CommandCoder.cxx.

References fAltro, fAltroxx, fBc, fBcxx, fConfigurator, fDbUrl, fDebug, fDetector, fInit, fRcu, fRcuUrl, fRcuxx, fServer, readConfig(), and RcuConf::Configurator::SetDebug().

Referenced by createDataBlock().

bool RcuConf::CommandCoder::readConfig  )  [protected]
 

Read configuration file.

Returns:
true on success, false otherwise

Definition at line 140 of file CommandCoder.cxx.

References fDbUrl, fDebug, fDetector, fRcuUrl, and fVerbose.

Referenced by init().


Field Documentation

Altro* RcuConf::CommandCoder::fAltro [protected]
 

Altro component.

Definition at line 120 of file CommandCoder.h.

Referenced by init().

Rcuxx::Altro* RcuConf::CommandCoder::fAltroxx [protected]
 

Rcu++ ALTRO connection.

Definition at line 114 of file CommandCoder.h.

Referenced by init().

Bc* RcuConf::CommandCoder::fBc [protected]
 

Bc Component.

Definition at line 118 of file CommandCoder.h.

Referenced by init().

Rcuxx::Bc* RcuConf::CommandCoder::fBcxx [protected]
 

Rcu++ BC connection.

Definition at line 112 of file CommandCoder.h.

Referenced by init().

Configurator* RcuConf::CommandCoder::fConfigurator [protected]
 

Configurator.

Definition at line 122 of file CommandCoder.h.

Referenced by createDataBlock(), getDataBlock(), and init().

std::string RcuConf::CommandCoder::fDbUrl [protected]
 

Database url.

Definition at line 128 of file CommandCoder.h.

Referenced by CommandCoder(), init(), and readConfig().

bool RcuConf::CommandCoder::fDebug [protected]
 

Debug.

Definition at line 134 of file CommandCoder.h.

Referenced by getDataBlock(), init(), and readConfig().

std::string RcuConf::CommandCoder::fDetector [protected]
 

Detector.

Definition at line 138 of file CommandCoder.h.

Referenced by init(), and readConfig().

std::vector<std::string> RcuConf::CommandCoder::fErrors [protected]
 

Error strings.

Definition at line 126 of file CommandCoder.h.

Referenced by createDataBlock(), and getError().

bool RcuConf::CommandCoder::fInit [protected]
 

Whether we've been initialized.

Definition at line 136 of file CommandCoder.h.

Referenced by init().

Rcu* RcuConf::CommandCoder::fRcu [protected]
 

Rcu component.

Definition at line 116 of file CommandCoder.h.

Referenced by init().

std::string RcuConf::CommandCoder::fRcuUrl [protected]
 

RCU url.

Definition at line 130 of file CommandCoder.h.

Referenced by CommandCoder(), init(), and readConfig().

Rcuxx::Rcu* RcuConf::CommandCoder::fRcuxx [protected]
 

Rcu++ Rcu connection.

Definition at line 110 of file CommandCoder.h.

Referenced by init().

int RcuConf::CommandCoder::fRet [protected]
 

Return value.

Definition at line 124 of file CommandCoder.h.

Referenced by createDataBlock().

RcuDb::Server* RcuConf::CommandCoder::fServer [protected]
 

Database server.

Definition at line 108 of file CommandCoder.h.

Referenced by init().

bool RcuConf::CommandCoder::fVerbose [protected]
 

Verbosity.

Definition at line 132 of file CommandCoder.h.

Referenced by CommandCoder(), createDataBlock(), getDataBlock(), and readConfig().


The documentation for this class was generated from the following files:
Top of page Last update Fri Apr 27 01:54:16 2007
Copyright © 2004 Christian Holm Created by DoxyGen 1.3.5