9 #ifndef CARMA_DBMS_MONITORDESCRIPTION_H
10 #define CARMA_DBMS_MONITORDESCRIPTION_H
15 #include "carma/corba/corba.h"
45 const bool& persistent,
const unsigned& updateInterval,
46 const bool& spectrum);
54 shortName_ = shortName;
57 inline void setLongName(
const std::string& longName) {
61 inline void setUnits(
const std::string& units) { units_ = units; }
63 inline void setDescription(
const std::string& description) {
64 description_ = description;
97 (
const carma::monitor::ThresholdValueEnum& thresholdType,
100 double getThresholdValue
101 (
const carma::monitor::ThresholdValueEnum& thresholdType)
const;
109 (
const carma::monitor::ThresholdValueEnum& thresholdType)
const;
116 (
const carma::monitor::ThresholdValueEnum& thresholdType)
const;
124 return subsystemName_;
131 inline std::string
getName()
const {
return cname_;}
149 inline std::string
getUnits()
const {
return units_; }
171 return monitorPointType_;
194 return integrateFunction_;
226 const std::string& description =
"");
238 const std::string& description =
"");
256 inline void setLocation(
const std::string& location) {
257 location_ = location;
260 inline std::string getLocation()
const {
return location_; }
262 inline void setDevice(
const std::string& device) { device_ = device; }
264 inline std::string getDevice()
const {
return device_; }
274 std::string& msg)
const;
288 const std::string &fieldName,
289 const std::string &oldValue,
290 const std::string &newValue)
const;
293 const char *fieldName,
294 const std::string &oldValue,
295 const std::string &newValue)
const;
303 const std::string &canonicalName,
313 std::string subsystemName_;
318 std::string location_;
328 std::string shortName_;
330 std::string longName_;
335 std::string description_;
338 std::string integrateFunction_;
345 std::vector<std::string> enumeratorNames_;
346 std::map<std::string,std::string> enumeratorDescriptions_;
363 bool isDefaultWarnLo_;
364 bool isDefaultWarnHi_;
365 bool isDefaultErrLo_;
366 bool isDefaultErrHi_;
MonitorPointType getMonitorPointType() const
get the monitor point type
std::string getDescription() const
get the monitor point description
bool isEqualExceptForTime(const MonitorDescription &md) const
are all fields in the specified description, except perhaps for the time_ field, equal to the fields ...
std::map< std::string, std::string > getEnumeratorDescriptions() const
get enumerator descriptions
void setTime(const carma::util::frameType &frameCount)
set the frame count for which this description became valid
std::string getName() const
get the canonical name of the monitor point
unsigned int frameType
Half second frames since Jan 1, 2000.
bool isPersistent() const
is the point persistent?
void setEnumeratorDescription(const std::string &enumerator, const std::string &description="")
add set an enumerators description, unlike addEnumerator, this method should only be called on an exi...
A MonitorDescription object holds all information on a monitor point which is stored in the database ...
relationships between the monitor and dbms systems
int getUpdateInterval() const
get the update interval
bool areStaticFieldsEqual(const MonitorDescription &other, std::string &msg) const
are the static fields of this monitor description the same as the specified description?
std::string getLongName() const
get the long name
std::string toString() const
produce a string representation of the monitor point description
bool isSpectrum() const
does the point represent a spectrum?
bool isDefaultThresholdValue(const carma::monitor::ThresholdValueEnum &thresholdType) const
is the specified threshold value the default value, ie, is the specified threshold value stored as NU...
std::string getShortName() const
get the short name
void addEnumerator(const std::string &enumerator, const std::string &description="")
add an enumerator and its description
std::string getSubsystemName() const
get the subystem name to which this point belongs
MonitorPointType
describes to what class this monitor point belongs
double getThresholdDefaultValue(const carma::monitor::ThresholdValueEnum &thresholdType) const
get the default value for the specified threshold.
carma::util::frameType getTime() const
get the frame count for which this description became valid
std::vector< std::string > getEnumerators() const
get enumerators names
type definitions for monitor system
void setThresholdValue(const carma::monitor::ThresholdValueEnum &thresholdType, const double &value)
set the value of the low warning threshold.
void setShortName(const std::string &shortName)
set short name
void makeStaticChangedString(std::ostringstream &ss, const std::string &fieldName, const std::string &oldValue, const std::string &newValue) const
Create the string describing what static field for which a changed had been attempted.
MonitorDescription(const std::string &canonicalName, const MonitorPointType &mpType, const MonitorPointDataType &dataType, const bool &persistent, const unsigned &updateInterval, const bool &spectrum)
constructor
std::string getUnits() const
get the units
std::string getIntegrateFunction() const
get the name of the function used to integrate (average) the half-second data
MonitorPointDataType
type of the monitor point.