Take care of configuring the FESA process from either configuration files or command line arguments. More...
#include <ProcessConfiguration.h>
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_ |
Take care of configuring the FESA process from either configuration files or command line arguments.
FesaException | If an invalid command line argument was specified |
Definition at line 22 of file ProcessConfiguration.h.
fesa::ProcessConfiguration::ProcessConfiguration | ( | int | argc, | |
char * | argv[] | |||
) |
Constructor.
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.
bool fesa::ProcessConfiguration::getBoolValue | ( | const std::string & | tag | ) | const |
Get a boolean property value.
tag | The name of the property |
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.
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.
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.
tag | The name of the property |
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.
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.
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.
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.
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.
tag | The name of the property |
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 |
Check if a property is defined.
tag | The name of the property |
Definition at line 100 of file ProcessConfiguration.cpp.
References impl_.
Referenced by fesa::Thread::AdjustProcessPriority(), fesa::ThreadPriorityConfigurationFromFile::getPrioCMW(), fesa::ThreadPriorityConfigurationFromFile::getPrioEventSource(), fesa::ThreadPriorityConfigurationFromFile::getPrioNotificationConsumer(), fesa::ThreadPriorityConfigurationFromFile::getPrioNotificationthread(), fesa::ThreadPriorityConfigurationFromFile::getPrioPersistence(), and fesa::ThreadPriorityConfigurationFromFile::getPrioRTScheduler().
bool fesa::ProcessConfiguration::isHelpNeeded | ( | ) | const |
Check if user spcified a help argument.
Definition at line 23 of file ProcessConfiguration.cpp.
References impl_.
bool fesa::ProcessConfiguration::isInTimingSimulationMode | ( | ) | const |
Check if timing simulation is enabled.
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.
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.
name | The name of the CMW server |
Definition at line 79 of file ProcessConfiguration.cpp.
References impl_.
boost::scoped_ptr<ProcessConfigurationImpl> fesa::ProcessConfiguration::impl_ [private] |
Definition at line 136 of file ProcessConfiguration.h.
Referenced by getBoolValue(), getCMWConfigFile(), getCMWServerName(), getIntValue(), getLabMsgConfigFile(), getLogConfigFile(), getLoggingMode(), getMsgConfigFile(), getStringValue(), isDefined(), isHelpNeeded(), isInTimingSimulationMode(), load(), printHelp(), and setCMWServerName().