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

This class contains methods for accessing monitor configuration information. More...

#include <carma/dbms/MonitorDataDatabase.h>

Public Member Functions

std::string getCanonicalSystemName (const std::string &tableName) const
 get the canonical file system path to the specified monitor data table More...
 
carma::dbms::Table getMonitorDataIndexTableEntries (const carma::dbms::TimeRangeFilter &trFilter, const carma::dbms::MonitorAggregateType &aggType, const bool includeNullTimes=true) const
 get entries in the MonitorDataIndexTable corresponding to the supplied filters More...
 
virtual void insertIntoMonitorIndexTable (const std::string &tableName, const int &partitionID, const MonitorAverageType &averageType, const MonitorAggregateType &aggType, const carma::util::frameType &creationFrame) const
 insert a row into the monitor data index table The SQL statement that is executed is "INSERT INTO " + MONITOR_INDEX_TABLE + " (tableName, creationFrame, " More...
 
 MonitorDataDatabase (const carma::dbms::DBConnection *const dbc)
 constructor More...
 
void updateMonitorIndexTable (const std::string &tableName, const MonitorAverageType &averageType) const
 insert the max and min frame counts into the specified row in the monitor index table. More...
 
void updateMonitorIndexTable (const int &minAge) const
 insert the min/max frameCounts/Integrations into the monitor index table for all tables with NULLs currently in these columns with creationFrames > minAge frames ago More...
 

Static Public Member Functions

static void getCreateMonitorTableStatementParts (const MonitorAverageType &averageType, const MonitorAggregateType &aggType, const std::string &tag, std::string &tableName, std::string &columnClause, std::string &pkClause)
 construct portions of the statement used to create a monitor table the basic creation statement is "CREATE TABLE " + tableName + "(" More...
 
static std::string getMonitorDataTableBaseName (const MonitorAverageType &averageType, const MonitorAggregateType aggType)
 

Detailed Description

This class contains methods for accessing monitor configuration information.

Definition at line 30 of file MonitorDataDatabase.h.

Constructor & Destructor Documentation

carma::dbms::MonitorDataDatabase::MonitorDataDatabase ( const carma::dbms::DBConnection *const  dbc)

constructor

Member Function Documentation

std::string carma::dbms::MonitorDataDatabase::getCanonicalSystemName ( const std::string &  tableName) const

get the canonical file system path to the specified monitor data table

Parameters
tableNamethe table name for which to get the system path
Returns
the canonical (complete path) table name
static void carma::dbms::MonitorDataDatabase::getCreateMonitorTableStatementParts ( const MonitorAverageType averageType,
const MonitorAggregateType aggType,
const std::string &  tag,
std::string &  tableName,
std::string &  columnClause,
std::string &  pkClause 
)
static

construct portions of the statement used to create a monitor table the basic creation statement is "CREATE TABLE " + tableName + "("

  • columnClause + pkClause + ")"
    Parameters
    [in]averageTypethe monitor table average type
    [in]dataTypethe monitor table data type
    [in]tagtag to add to the base monitor table name
    [out]tableNamethe table name
    [out]columnClausethe columnClause
    [out]pkClausethe primary key cluase
carma::dbms::Table carma::dbms::MonitorDataDatabase::getMonitorDataIndexTableEntries ( const carma::dbms::TimeRangeFilter trFilter,
const carma::dbms::MonitorAggregateType aggType,
const bool  includeNullTimes = true 
) const

get entries in the MonitorDataIndexTable corresponding to the supplied filters

Parameters
trFilterthe time range filter to use
aggTypethe aggregate data type
includeNullTimesinclude entries which have NULLs for min/maxIntegration? Such entries usually indicate that the tables are in the process of being written.
Returns
a Table with the specified entries
virtual void carma::dbms::MonitorDataDatabase::insertIntoMonitorIndexTable ( const std::string &  tableName,
const int &  partitionID,
const MonitorAverageType averageType,
const MonitorAggregateType aggType,
const carma::util::frameType creationFrame 
) const
virtual

insert a row into the monitor data index table The SQL statement that is executed is "INSERT INTO " + MONITOR_INDEX_TABLE + " (tableName, creationFrame, "

  • "partitionID) VALUES('" + tableName + "', " + creationFrame + ", "
  • partitionID + ")"
Parameters
tableNamethe name of the table to be added
paritionIDthe id of the partition on which the table is located
creationFramethe frame at which the table was created
Exceptions
DBConnectionException
void carma::dbms::MonitorDataDatabase::updateMonitorIndexTable ( const std::string &  tableName,
const MonitorAverageType averageType 
) const

insert the max and min frame counts into the specified row in the monitor index table.

Generally called after data has been copletely loaded into a table

Parameters
tableNameupdate the data for this table
Exceptions
DBConnectionException
void carma::dbms::MonitorDataDatabase::updateMonitorIndexTable ( const int &  minAge) const

insert the min/max frameCounts/Integrations into the monitor index table for all tables with NULLs currently in these columns with creationFrames > minAge frames ago

Parameters
theminimum age (in half-second frames) a table has to have for it to be updated

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