fesa::ProcessConfiguration Class Reference

Take care of configuring the FESA process from either configuration files or command line arguments. More...

#include <ProcessConfiguration.h>

List of all members.

Public Member Functions

 ProcessConfiguration (int argc, char *argv[])
 Constructor.
 ~ProcessConfiguration ()
 Destructor.
bool isHelpNeeded () const
 Check if user spcified a help argument.
void printHelp () const
 Print out information on arguments that can be given to a Fesa binary.
void load (const ConfigDirs &configDirs)
 Decode the command line arguments and load the configuration files. All configuration parameters frome these files are stored in this class.
const std::string & getLogConfigFile () const
 Get the name and location of the logging configuration file.
const std::string & getCMWConfigFile () const
 Get the name and location of the CMW configuration file.
const std::string & getMsgConfigFile () const
 Get the name and location of the file with exception messages.
const std::string & getLabMsgConfigFile () const
 Get the name and location of the lab specific file with exception messages.
const std::string & getCMWServerName () const
 Get the name of the CMW server.
void setCMWServerName (const std::string &name)
 Set the name of the CMW server.
bool isInTimingSimulationMode () const
 Check if timing simulation is enabled.
LoggingMode::LoggingMode getLoggingMode () const
 Get the logging mode - normal, verbose, or very verbose.
bool isDefined (const std::string &tag) const
 Check if a property is defined.
std::string getStringValue (const std::string &tag) const
 Get a string property value.
int getIntValue (const std::string &tag) const
 Get a numerical property value.
bool getBoolValue (const std::string &tag) const
 Get a boolean property value.

Private Attributes

boost::scoped_ptr
< ProcessConfigurationImpl
impl_

Detailed Description

Take care of configuring the FESA process from either configuration files or command line arguments.

Exceptions:
FesaException If an invalid command line argument was specified

Definition at line 22 of file ProcessConfiguration.h.


Constructor & Destructor Documentation

fesa::ProcessConfiguration::ProcessConfiguration ( int  argc,
char *  argv[] 
)

Constructor.

Parameters:
argc argc given to main
argv argv given to main

Definition at line 11 of file ProcessConfiguration.cpp.

fesa::ProcessConfiguration::~ProcessConfiguration (  ) 

Destructor.

Definition at line 17 of file ProcessConfiguration.cpp.


Member Function Documentation

bool fesa::ProcessConfiguration::getBoolValue ( const std::string &  tag  )  const

Get a boolean property value.

Parameters:
tag The name of the property
Returns:
The value of the property
Exceptions:
FesaException If the property with the given name was not found or the property is not boolean

Definition at line 121 of file ProcessConfiguration.cpp.

References impl_.

Referenced by fesa::FesaDeviceServer::FesaDeviceServer().

const std::string & fesa::ProcessConfiguration::getCMWConfigFile (  )  const

Get the name and location of the CMW configuration file.

Returns:
The name and location of the CMW configuration file

Definition at line 51 of file ProcessConfiguration.cpp.

References impl_.

Referenced by fesa::FesaDeviceServer::FesaDeviceServer(), and fesa::FesaDeviceServer::initCMW().

const std::string & fesa::ProcessConfiguration::getCMWServerName (  )  const

Get the name of the CMW server.

Returns:
The name of the CMW server

Definition at line 72 of file ProcessConfiguration.cpp.

References impl_.

Referenced by fesa::AbstractServerEquipment::getServerNameFromConfigurationFile().

int fesa::ProcessConfiguration::getIntValue ( const std::string &  tag  )  const

Get a numerical property value.

Parameters:
tag The name of the property
Returns:
The value of the property
Exceptions:
FesaException If the property with the given name was not found or the property is not numerical

Definition at line 114 of file ProcessConfiguration.cpp.

References impl_.

Referenced by fesa::AbstractMsgQueue::Constants::Constants(), and fesa::AbstractEventSourceFactory::createOnDemandEventSource().

const std::string & fesa::ProcessConfiguration::getLabMsgConfigFile (  )  const

Get the name and location of the lab specific file with exception messages.

Returns:
The name and location of the CMW configuration file

Definition at line 65 of file ProcessConfiguration.cpp.

References impl_.

Referenced by fesa::FesaException::preloadMessages().

const std::string & fesa::ProcessConfiguration::getLogConfigFile (  )  const

Get the name and location of the logging configuration file.

Returns:
The name and location of the logging configuration file

Definition at line 44 of file ProcessConfiguration.cpp.

References impl_.

LoggingMode::LoggingMode fesa::ProcessConfiguration::getLoggingMode (  )  const

Get the logging mode - normal, verbose, or very verbose.

Returns:
The logging mode

Definition at line 93 of file ProcessConfiguration.cpp.

References impl_.

const std::string & fesa::ProcessConfiguration::getMsgConfigFile (  )  const

Get the name and location of the file with exception messages.

Returns:
The name and location of the CMW configuration file

Definition at line 58 of file ProcessConfiguration.cpp.

References impl_.

Referenced by fesa::FesaException::preloadMessages().

std::string fesa::ProcessConfiguration::getStringValue ( const std::string &  tag  )  const

Get a string property value.

Parameters:
tag The name of the property
Returns:
The value of the property
Exceptions:
FesaException If the property with the given name was not found

Definition at line 107 of file ProcessConfiguration.cpp.

References impl_.

Referenced by fesa::AbstractServerEquipment::AbstractServerEquipment().

bool fesa::ProcessConfiguration::isDefined ( const std::string &  tag  )  const
bool fesa::ProcessConfiguration::isHelpNeeded (  )  const

Check if user spcified a help argument.

Returns:
true if a help argument was specified, false otherwise

Definition at line 23 of file ProcessConfiguration.cpp.

References impl_.

bool fesa::ProcessConfiguration::isInTimingSimulationMode (  )  const

Check if timing simulation is enabled.

Returns:
true if timing simulation is enabled, false otherwise

Definition at line 86 of file ProcessConfiguration.cpp.

References impl_.

void fesa::ProcessConfiguration::load ( const ConfigDirs configDirs  ) 

Decode the command line arguments and load the configuration files. All configuration parameters frome these files are stored in this class.

Parameters:
configDirs Directories where the configuration files are

Definition at line 37 of file ProcessConfiguration.cpp.

References impl_.

void fesa::ProcessConfiguration::printHelp (  )  const

Print out information on arguments that can be given to a Fesa binary.

Definition at line 30 of file ProcessConfiguration.cpp.

References impl_.

void fesa::ProcessConfiguration::setCMWServerName ( const std::string &  name  ) 

Set the name of the CMW server.

Parameters:
name The name of the CMW server

Definition at line 79 of file ProcessConfiguration.cpp.

References impl_.


Member Data Documentation


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1