CARMA C++
MonitorPointValue.h
Go to the documentation of this file.
1 #ifndef CARMA_SDP_MONITORPOINTVALUE_H
2 #define CARMA_SDP_MONITORPOINTVALUE_H
3 
15 #include <carma/util/types.h>
16 
17 #include <boost/shared_ptr.hpp>
18 
19 #include <string>
20 
21 namespace carma {
22 namespace sdp {
23 
24 class MonitorPointValue {
25 public:
26 
27  MonitorPointValue(const carma::util::frameType &frameCount, const carma::monitor::MonitorPoint &mp);
28  MonitorPointValue(const carma::dbms::MonitorAggregateType &type, const std::string &record);
29 
33  carma::util::frameType frameCount() const;
34 
38  int tagID() const;
39 
44 
49 
53  short totalNumberOfSamples() const;
54 
58  short numberOfValidSamples() const;
59 
63  std::string toString() const;
64 
68  std::string avgValue() const;
69  std::string minValue() const;
70  std::string maxValue() const;
71 
75  static short parseShort(const std::string &s);
76  static double parseNumeric(const std::string &s);
77  static std::complex<double> parseComplex(const std::string &s);
78 
79 private:
80 
81  carma::util::frameType frameCount_;
82  int tagID_;
85  short nValidSamples_;
86  short nTotalSamples_;
87 
88  std::string avgValue_;
89  std::string minValue_;
90  std::string maxValue_;
91 };
92 
93 typedef boost::shared_ptr<MonitorPointValue> MonitorPointValuePtr;
94 
95 } // namespace carma::sdp
96 } // namespace carma
97 
98 #endif // CARMA_SDP_MONITORPOINTVALUE_H
VALIDITY
Validity states of the data value.
Definition: MonitorPoint.h:132
Abstract base class for all monitor points.
MonitorAggregateType
aggregate data type of the monitor[point,data file, table]
BLANKING_FLAGGING
Blanking/flagging status of the data.
Definition: MonitorPoint.h:159
unsigned int frameType
Half second frames since Jan 1, 2000.
Definition: types.h:29
relationships between the monitor and dbms systems
std::string toString(const SortOrder &sortOrder)
get a string representing the specified sort order
Abstract base class for a monitor point.
Definition: MonitorPoint.h:68
Various type definitions for util classes.