CARMA C++
carma::dbms::DBConfigurator Class Reference

Class used for configuring a DBConnection. More...

#include <carma/dbms/DBConfigurator.h>

Public Member Functions

 DBConfigurator (const std::string &filename)
 constructor More...
 
std::map
< carma::dbms::MonitorAggregateType,
std::string > 
getAverageAreas (const carma::dbms::MonitorAverageType &avgType, const carma::dbms::MonitorDataAreaType &area)
 get the monitor point data directories corresponding to the specified average type and the specified More...
 
std::map< std::string,
std::string > 
getConfiguration () const
 get configuration data More...
 
std::string getDataDirectory (const MonitorDataAreaType &mpArea, const MonitorAverageType &avgType, const MonitorAggregateType &aggType) const
 get the specified data directory More...
 
std::string getDataSource () const
 get the ODBC data source More...
 
std::string getDBName () const
 get the database name More...
 
std::string getDBUser () const
 get the database user More...
 
std::string getLogBufferSharedMemoryName () const
 
std::string getLogLoadDirectory () const
 
std::string getLogWriteDirectory () const
 
std::string getLogWriteFileBaseName () const
 
std::map
< carma::dbms::MonitorDataIndex,
std::string > 
getMonitorDataAreas () const
 get monitor point data areas as a map of monitorAreaIndices to directory names More...
 
std::string getODBCini () const
 get the name of the odbc.ini file More...
 
std::string getPasswordFile () const
 get the password file for the dbuser this method makes no attempt to do file or existence checking More...
 
std::string getPipeFileNames () const
 
unsigned getPort () const
 get the port for remote, native connections More...
 
std::string getRDBMS () const
 get the rdbms More...
 
std::string getSocket () const
 get the socket for local, native connections More...
 
std::string getSyslogMMAPFileName () const
 
std::string getTopDir () const
 
std::string getWorkDir () const
 
 ~DBConfigurator ()
 Destructor. More...
 

Protected Member Functions

std::string getValue (const std::string &key) const
 

Protected Attributes

std::map< MonitorAggregateType,
std::string > 
aggType2String_
 
std::map< MonitorDataAreaType,
std::string > 
areaType2String_
 
std::map< MonitorAverageType,
std::string > 
averageType2String_
 
std::map< std::string,
std::string > 
pairs_
 

Detailed Description

Class used for configuring a DBConnection.

Definition at line 28 of file DBConfigurator.h.

Constructor & Destructor Documentation

carma::dbms::DBConfigurator::DBConfigurator ( const std::string &  filename)

constructor

Parameters
filenameconfig file name
Exceptions
NotFoundExceptionif the file cannot be read
carma::dbms::DBConfigurator::~DBConfigurator ( )

Destructor.

Member Function Documentation

std::map<carma::dbms::MonitorAggregateType,std::string> carma::dbms::DBConfigurator::getAverageAreas ( const carma::dbms::MonitorAverageType avgType,
const carma::dbms::MonitorDataAreaType area 
)

get the monitor point data directories corresponding to the specified average type and the specified

Parameters
avgTypethe average type of the data
thearea of interest
Returns
areas where the specified monitor point data are located
Exceptions
NotFoundExceptionif a data area hasn't been defined
std::map<std::string,std::string> carma::dbms::DBConfigurator::getConfiguration ( ) const

get configuration data

Definition at line 46 of file DBConfigurator.h.

std::string carma::dbms::DBConfigurator::getDataDirectory ( const MonitorDataAreaType mpArea,
const MonitorAverageType avgType,
const MonitorAggregateType aggType 
) const

get the specified data directory

std::string carma::dbms::DBConfigurator::getDataSource ( ) const

get the ODBC data source

std::string carma::dbms::DBConfigurator::getDBName ( ) const

get the database name

std::string carma::dbms::DBConfigurator::getDBUser ( ) const

get the database user

std::string carma::dbms::DBConfigurator::getLogBufferSharedMemoryName ( ) const
Returns
index file that syslog2db will write
Deprecated:
No longer used in favor of in memory buffer
Returns
index file that syslog2db will write
std::string carma::dbms::DBConfigurator::getLogLoadDirectory ( ) const
Returns
The directory to which the flat log files were symlinked, so that logDataLoader can load them into the dbms
std::string carma::dbms::DBConfigurator::getLogWriteDirectory ( ) const
Returns
the list of all log files, including debug logs
Deprecated:
No longer used in favor of IPQ
Returns
The directory to which the flat log files were written, so that logDataDeleter can mark them for delete them.
std::string carma::dbms::DBConfigurator::getLogWriteFileBaseName ( ) const
Returns
base file name for processed data that syslog2db; frame count is appended to this name.
std::map<carma::dbms::MonitorDataIndex, std::string> carma::dbms::DBConfigurator::getMonitorDataAreas ( ) const

get monitor point data areas as a map of monitorAreaIndices to directory names

Returns
monitor data areas
std::string carma::dbms::DBConfigurator::getODBCini ( ) const

get the name of the odbc.ini file

std::string carma::dbms::DBConfigurator::getPasswordFile ( ) const

get the password file for the dbuser this method makes no attempt to do file or existence checking

std::string carma::dbms::DBConfigurator::getPipeFileNames ( ) const
Returns
a list of comma separated fully qualified paths to pipe files
unsigned carma::dbms::DBConfigurator::getPort ( ) const

get the port for remote, native connections

std::string carma::dbms::DBConfigurator::getRDBMS ( ) const

get the rdbms

std::string carma::dbms::DBConfigurator::getSocket ( ) const

get the socket for local, native connections

std::string carma::dbms::DBConfigurator::getSyslogMMAPFileName ( ) const
Returns
base file name for processed data that syslog2db; frame count is appended to this name.
std::string carma::dbms::DBConfigurator::getTopDir ( ) const
Returns
The top directory to be used to write ASCII files.
std::string carma::dbms::DBConfigurator::getWorkDir ( ) const
Returns
The directory to be used to write ASCII files that have been converted from binary.

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