CARMA C++
monitorPointSpecializations.h
Go to the documentation of this file.
1 #ifndef CARMA_MONITOR_MONITORPOINTSPECIALIZATIONS_H
2 #define CARMA_MONITOR_MONITORPOINTSPECIALIZATIONS_H
3 
4 
31 
32 
33 namespace carma {
34 namespace monitor {
35 
36 class MonitorPointThreshold;
37 
38 typedef MonitorPointAverageT< long > MonitorPointAverageBool;
39 typedef MonitorPointAverageT< int > MonitorPointAverageEnum;
40 typedef MonitorPointAverageT< long > MonitorPointAverageSerialNo;
41 typedef MonitorPointAverageT< ::std::string > MonitorPointAverageString;
42 typedef MonitorPointAverageT< ::std::complex< float > >
43  MonitorPointAverageComplex;
44 
45 
50 public:
52  typedef char AccumReportType;
53 
58  MonitorPointChar(const std::string& name,
59  MONITOR_POINT_TYPE monitorPointType = MONITOR);
60 
61 
66  virtual ~MonitorPointChar() {};
67 
74  void setValue(const char c, int sampleIndex = 0) const;
75 
81  char getValue(int sampleIndex = 0) const;
82 
86  char getAve() const;
87 
88  /*
89  * Converts value to a string with both character value and hex
90  * @param sampleIndex sample index (0 is first sample)
91  */
92  virtual std::string getValueToString(int sampleIndex = 0) const;
93 
94  /*
95  * Converts average to a string with both character value and hex
96  * @param sampleIndex sample index (0 is first sample)
97  */
98  virtual std::string getAverageToString() const;
99 
105  void setWarnLowDefault (const char threshold);
106 
112  void setWarnHighDefault (const char threshold);
113 
119  void setErrorLowDefault (const char threshold);
120 
126  void setErrorHighDefault (const char threshold);
127 
136  virtual std::string getAccumulatedAverageAsString (const AccumType & accum) const;
137 
145  virtual AccumReportType getAccumulatedAverage (const AccumType & accum) const;
146 
153  virtual AccumReportType getMaxValue (const AccumType & accum) const;
154 
161  virtual AccumReportType getMinValue (const AccumType & accum) const;
162 
163  // Already documented in base class
164  virtual void updateFrameAverage( ScratchAverages & scratchAvgs );
165 
166  // Already documented in base class
167  virtual double getValueNumeric( int sampleIndex ) const;
168 
169  // Already documented in base class
170  virtual double getAveNumeric( ) const;
171 
183  (const MonitorPointThreshold& threshold, char charVal) const;
184 
185  // documented in base class
186  virtual void evaluateTolerance (const MonitorPointThreshold& threshold);
187 
188 private:
189  /*
190  * Converts to a string with both character value and hex
191  * @param value
192  */
193  std::string getValueToString(char c) const;
194 };
195 
196 
201 public:
203  typedef unsigned char AccumReportType;
204 
209  MonitorPointByte(const std::string& name,
210  MONITOR_POINT_TYPE monitorPointType = MONITOR);
211 
212 
217  virtual ~MonitorPointByte() {};
218 
225  void setValue(const unsigned char c, int sampleIndex = 0) const;
226 
232  unsigned char getValue(int sampleIndex = 0) const;
233 
237  unsigned char getAve() const;
238 
239  // Already documented in base class
240  virtual std::string getValueToString(int sampleIndex = 0) const;
241 
247  void setWarnLowDefault (const unsigned char threshold);
248 
254  void setWarnHighDefault (const unsigned char threshold);
255 
261  void setErrorLowDefault (const unsigned char threshold);
262 
268  void setErrorHighDefault (const unsigned char threshold);
269 
270  // Already documented in base class
271  virtual std::string getAverageToString() const;
272 
281  virtual std::string getAccumulatedAverageAsString (const AccumType & accum) const;
282 
290  virtual AccumReportType getAccumulatedAverage (const AccumType & accum) const;
291 
298  virtual AccumReportType getMaxValue (const AccumType & accum) const;
299 
306  virtual AccumReportType getMinValue (const AccumType & accum) const;
307 
308  // Already documented in base class
309  virtual void updateFrameAverage( ScratchAverages & scratchAvgs );
310 
311  // Already documented in base class
312  virtual double getValueNumeric( int sampleIndex ) const;
313 
314  // Already documented in base class
315  virtual double getAveNumeric( ) const;
316 
328  (const MonitorPointThreshold& threshold, unsigned char byteVal) const;
329 
330  // documented in base class
331  virtual void evaluateTolerance (const MonitorPointThreshold& threshold);
332 
333 };
334 
339 public:
341  typedef short AccumReportType;
342 
347  MonitorPointShort(const std::string& name,
348  MONITOR_POINT_TYPE monitorPointType = MONITOR);
349 
350 
356 
363  void setValue(const short i, int sampleIndex = 0) const;
364 
370  short getValue(int sampleIndex = 0) const;
371 
375  short getAve() const;
376 
377  // Already documented in base class
378  virtual std::string getValueToString(int sampleIndex = 0) const;
379 
385  void setWarnLowDefault (const short threshold);
386 
392  void setWarnHighDefault (const short threshold);
393 
399  void setErrorLowDefault (const short threshold);
400 
406  void setErrorHighDefault (const short threshold);
407 
408  // Already documented in base class
409  virtual std::string getAverageToString() const;
410 
419  virtual std::string getAccumulatedAverageAsString (const AccumType & accum) const;
420 
428  virtual AccumReportType getAccumulatedAverage (const AccumType & accum) const;
429 
436  virtual AccumReportType getMaxValue (const AccumType & accum) const;
437 
444  virtual AccumReportType getMinValue (const AccumType & accum) const;
445 
446  // Already documented in base class
447  virtual void updateFrameAverage( ScratchAverages & scratchAvgs );
448 
449  // Already documented in base class
450  virtual double getValueNumeric( int sampleIndex ) const;
451 
452  // Already documented in base class
453  virtual double getAveNumeric( ) const;
454 
466  (const MonitorPointThreshold& threshold, short shortVal) const;
467 
468  // documented in base class
469  virtual void evaluateTolerance (const MonitorPointThreshold& threshold);
470 
471 
472 };
473 
478 public:
480  typedef long AccumReportType;
481 
486  MonitorPointInt(const std::string& name,
487  MONITOR_POINT_TYPE monitorPointType = MONITOR);
488 
489 
495 
502  void setValue(long i, int sampleIndex = 0) const;
503 
509  long getValue(int sampleIndex = 0) const;
510 
514  long getAve() const;
515 
516  // Already documented in base class
517  virtual std::string getValueToString(int sampleIndex = 0) const;
518 
524  void setWarnLowDefault (const long threshold);
525 
531  void setWarnHighDefault (const long threshold);
532 
538  void setErrorLowDefault (const long threshold);
539 
545  void setErrorHighDefault (const long threshold);
546 
547  // Already documented in base class
548  virtual std::string getAverageToString() const;
549 
558  virtual std::string getAccumulatedAverageAsString (const AccumType & accum) const;
559 
568  virtual AccumReportType getAccumulatedAverage (const AccumType & accum) const;
569 
576  virtual AccumReportType getMaxValue (const AccumType & accum) const;
577 
584  virtual AccumReportType getMinValue (const AccumType & accum) const;
585 
586  // Already documented in base class
587  virtual void updateFrameAverage( ScratchAverages & scratchAvgs );
588 
589  // Already documented in base class
590  virtual double getValueNumeric( int sampleIndex ) const;
591 
592  // Already documented in base class
593  virtual double getAveNumeric( ) const;
594 
606  (const MonitorPointThreshold& threshold, long longVal) const;
607 
608  // documented in base class
609  virtual void evaluateTolerance (const MonitorPointThreshold& threshold);
610 
611 
612 };
613 
618 class MonitorPointBool: public MonitorPoint {
620 public:
621  typedef MonitorPointAverageBool AccumType;
622  typedef bool AccumReportType;
623 
628  MonitorPointBool(const std::string& name,
629  MONITOR_POINT_TYPE monitorPointType = MONITOR);
630 
635  virtual ~MonitorPointBool() {};
636 
643  void setValue(const bool b, int sampleIndex = 0) const;
644 
650  bool getValue(int sampleIndex = 0) const;
651 
655  virtual bool getAve() const;
656 
667  void setWarnLowDefault (bool boolVal);
668 
679  void setWarnHighDefault (bool boolVal);
680 
691  void setErrorLowDefault (bool boolVal);
692 
703  void setErrorHighDefault (bool boolVal);
704 
719  bool getWarnLow (const MonitorPointThreshold& threshold) const;
720 
735  bool getWarnHigh (const MonitorPointThreshold& threshold) const;
736 
751  bool getErrorLow (const MonitorPointThreshold& threshold) const;
752 
767  bool getErrorHigh (const MonitorPointThreshold& threshold) const;
768 
776  virtual void resetAccumulator (AccumType & accum) const;
777 
787  (AccumType & accum, int index) const;
788 
796  virtual void accumulate (AccumType & accum) const;
797 
806  virtual void accumulateAverage (AccumType & accum);
807 
816  virtual std::string getAccumulatedAverageAsString (const AccumType & accum) const;
817 
825  virtual AccumReportType getAccumulatedAverage (const AccumType & accum) const;
826 
833  virtual AccumReportType getMaxValue (const AccumType & accum) const;
834 
841  virtual AccumReportType getMinValue (const AccumType & accum) const;
842 
843  // Already documented in base class
844  virtual std::string getValueToString(int sampleIndex = 0) const;
845 
846  // Already documented in base class
847  virtual std::string getAverageToString() const;
848 
849  // Already documented in base class
850  virtual void updateFrameAverage( ScratchAverages & scratchAvgs );
851 
863  (const MonitorPointThreshold& threshold, bool boolVal) const;
864 
865  // documented in base class
866  virtual void evaluateTolerance (const MonitorPointThreshold& threshold);
867 
868  private:
869 
870  int nValidSamples_;
871 };
872 
873 
900 public:
902  typedef int AccumReportType;
903 
909  MonitorPointEnum(const std::string& name,
910  const bool bitmask = false,
911  MONITOR_POINT_TYPE monitorPointType = MONITOR);
912 
918 
922  bool isBitmask() const { return this->bitmask_; }
923 
929  virtual short getWidth() const;
930 
935  void setNumEnumerations(int num);
936 
940  int getNumEnumerations() const;
941 
947  void addEnumWarnLowDefault (const long enumValue);
948 
955  void removeEnumWarnLowDefault (const long enumValue);
956 
962  void addEnumWarnHighDefault (const long enumValue);
963 
970  void removeEnumWarnHighDefault (const long enumValue);
971 
977  void addEnumErrorLowDefault (const long enumValue);
978 
985  void removeEnumErrorLowDefault (const long enumValue);
986 
992  void addEnumErrorHighDefault (const long enumValue);
993 
1000  void removeEnumErrorHighDefault (const long enumValue);
1001 
1009  virtual void resetAccumulator (AccumType & accum) const;
1010 
1021  (AccumType & accum, int index) const;
1022 
1030  virtual void accumulate (AccumType & accum) const;
1031 
1040  virtual void accumulateAverage (AccumType & accum);
1041 
1050  virtual std::string getAccumulatedAverageAsString (const AccumType & accum) const;
1051 
1059  virtual AccumReportType getAccumulatedAverage (const AccumType & accum) const;
1060 
1067  virtual AccumReportType getMaxValue (const AccumType & accum) const;
1068 
1075  virtual AccumReportType getMinValue (const AccumType & accum) const;
1076 
1077  // Default implementation that inserts the maximum value
1078  virtual void updateFrameAverage( ScratchAverages & scratchAvgs );
1079 
1091  (const MonitorPointThreshold& threshold, int enumVal) const;
1092 
1093  // documented in base class
1094  virtual void evaluateTolerance (const MonitorPointThreshold& threshold);
1095 
1096  ::std::string getRawStringForEnumValue( int enumValue ) const;
1097 
1098  void setValue(const long i, int sampleNo) const;
1099  int getValue(int sampleNo) const;
1100  int getAve() const;
1101 
1102 protected:
1103 
1108  virtual std::string convertToString(int enumValue) const = 0;
1109 
1110 private:
1111  int nEnumerations_;
1112  int nValidSamples_;
1113  const bool bitmask_;
1114 };
1115 
1121 public:
1122 
1128  MonitorPointReal(const std::string& name, MonitorValueType monitorValueType,
1129  MONITOR_POINT_TYPE monitorPointType = MONITOR);
1130 
1131 
1136  virtual ~MonitorPointReal() {};
1137 
1138 };
1139 
1144 public:
1146  typedef float AccumReportType;
1147 
1152  MonitorPointFloat(const std::string& name,
1153  MONITOR_POINT_TYPE monitorPointType = MONITOR);
1154 
1155 
1160  virtual ~MonitorPointFloat() {};
1161 
1168  void setValue(const float f, int sampleIndex = 0) const;
1169 
1175  float getValue(int sampleIndex = 0) const;
1176 
1180  float getAve() const;
1181 
1182  // Already documented in base class
1183  virtual std::string getValueToString(int sampleIndex = 0) const;
1184 
1190  void setWarnLowDefault (const float threshold);
1191 
1197  void setWarnHighDefault (const float threshold);
1198 
1204  void setErrorLowDefault (const float threshold);
1205 
1211  void setErrorHighDefault (const float threshold);
1212 
1213  // Already documented in base class
1214  virtual std::string getAverageToString() const;
1215 
1216  // Already documented in base class
1217  virtual double getValueNumeric( int sampleIndex ) const;
1218 
1219  // Already documented in base class
1220  virtual double getAveNumeric( ) const;
1221 
1230  virtual std::string getAccumulatedAverageAsString (const AccumType & accum) const;
1231 
1240  virtual AccumReportType getAccumulatedAverage (const AccumType & accum) const;
1241 
1250  virtual AccumReportType getMaxValue (const AccumType & accum) const;
1251 
1259  virtual AccumReportType getMinValue (const AccumType & accum) const;
1260 
1261  // Already documented in base class
1262  virtual void updateFrameAverage( ScratchAverages & scratchAvgs );
1263 
1275  (const MonitorPointThreshold& threshold, float floatVal) const;
1276 
1277  // documented in base class
1278  virtual void evaluateTolerance (const MonitorPointThreshold& threshold);
1279 
1280 
1281 };
1282 
1287 public:
1289  typedef double AccumReportType;
1290 
1295  MonitorPointDouble(const std::string& name,
1296  MONITOR_POINT_TYPE monitorPointType = MONITOR);
1297 
1298 
1303  virtual ~MonitorPointDouble() {};
1304 
1311  void setValue(const double f, int sampleIndex = 0) const;
1312 
1318  double getValue(int sampleIndex = 0) const;
1319 
1323  double getAve() const;
1324 
1325  // Already documented in base class
1326  virtual std::string getValueToString(int sampleIndex = 0) const;
1327 
1333  void setWarnLowDefault (const double threshold);
1334 
1340  void setWarnHighDefault (const double threshold);
1341 
1347  void setErrorLowDefault (const double threshold);
1348 
1354  void setErrorHighDefault (const double threshold);
1355 
1356  // Already documented in base class
1357  virtual std::string getAverageToString() const;
1358 
1359  // Already documented in base class
1360  virtual double getValueNumeric( int sampleIndex ) const;
1361 
1362  // Already documented in base class
1363  virtual double getAveNumeric( ) const;
1364 
1373  virtual std::string getAccumulatedAverageAsString (const AccumType & accum) const;
1374 
1382  virtual AccumReportType getAccumulatedAverage (const AccumType & accum) const;
1383 
1391  virtual AccumReportType getMaxValue (const AccumType & accum) const;
1392 
1400  virtual AccumReportType getMinValue (const AccumType & accum) const;
1401 
1402  // Already documented in base class
1403  virtual void updateFrameAverage( ScratchAverages & scratchAvgs );
1404 
1416  (const MonitorPointThreshold& threshold, double doubleVal) const;
1417 
1418  // documented in base class
1419  virtual void evaluateTolerance (const MonitorPointThreshold& threshold);
1420 
1421 
1422 };
1423 
1428 class MonitorPointComplex: public MonitorPoint {
1430 public:
1431  typedef MonitorPointAverageComplex AccumType;
1432  typedef ::std::complex< float > AccumReportType;
1433 
1434  typedef enum stringValueEnum {
1435 
1446 
1447  } stringValueReturnType;
1448 
1453  MonitorPointComplex(const std::string& name,
1454  MONITOR_POINT_TYPE monitorPointType = MONITOR);
1455 
1456 
1461  virtual ~MonitorPointComplex() {};
1462 
1469  void setValue(const std::complex<float>& f, int sampleIndex = 0) const;
1470 
1476  std::complex<float> getValue(int sampleIndex = 0) const;
1477 
1481  std::complex<float> getAve() const;
1482 
1483  // Already documented in base class
1484  virtual std::string getValueToString(int sampleIndex = 0) const;
1485 
1493  void setWarnLowDefault (const float threshold);
1494 
1502  void setWarnHighDefault (const float threshold);
1503 
1511  void setErrorLowDefault (const float threshold);
1512 
1520  void setErrorHighDefault (const float threshold);
1521 
1522 
1523  // Already documented in base class
1524  virtual std::string getAverageToString() const;
1525 
1533  virtual void resetAccumulator (AccumType & accum) const;
1534 
1544  (AccumType & accum, int index) const;
1545 
1553  virtual void accumulate (AccumType & accum) const;
1554 
1563  virtual void accumulateAverage (AccumType & accum);
1564 
1573  virtual std::string getAccumulatedAverageAsString (const AccumType & accum) const;
1574 
1582  virtual AccumReportType getAccumulatedAverage (const AccumType & accum) const;
1583 
1590  virtual AccumReportType getMaxValue (const AccumType & accum) const;
1591 
1598  virtual AccumReportType getMinValue (const AccumType & accum) const;
1599 
1600  // Already documented in base class
1601  virtual void updateFrameAverage( ScratchAverages & scratchAvgs );
1602 
1614  (const MonitorPointThreshold& threshold,
1615  std::complex<float> complexVal) const;
1616 
1617  // documented in base class
1618  virtual void evaluateTolerance (const MonitorPointThreshold& threshold);
1619 
1620 
1627  void setPrecision(short precision);
1628 
1635  short getPrecision() const;
1636 
1642  bool operator==(const MonitorComponent& component) const;
1643 
1648  void setStringRepresentation(const stringValueReturnType& type);
1649 
1650  stringValueReturnType getStringRepresentation(void) const;
1651 
1652 protected:
1653 
1659  std::complex<float> getMaxSampleValue () const;
1660 
1666  std::complex<float> getMinSampleValue () const;
1667 
1668 private:
1669  int nValidSamples_;
1670  short precision_;
1671  stringValueReturnType stringReturnType_;
1672  std::string getValueToString(std::complex<float> f) const;
1673 };
1674 
1683 public:
1685  typedef double AccumReportType;
1686 
1691  MonitorPointAbstime(const std::string& name,
1692  MONITOR_POINT_TYPE monitorPointType = MONITOR);
1693 
1694  enum ABSTIME_FORMAT {
1695  DATE,
1696  TIME,
1697  DATE_AND_TIME
1698  };
1699 
1704  virtual ~MonitorPointAbstime() {};
1705 
1710  void setFormat(ABSTIME_FORMAT format);
1711 
1715  ABSTIME_FORMAT getFormat() const;
1716 
1721  std::string getFormattedAbstime(double mjd) const;
1722 
1729  void setValue(const double f, int sampleIndex = 0) const;
1730 
1736  double getValue(int sampleIndex = 0) const;
1737 
1741  double getAve() const;
1742 
1743  // Already documented in base class
1744  virtual std::string getValueToString(int sampleIndex = 0) const;
1745 
1751  void setWarnLowDefault (const double threshold);
1752 
1758  void setWarnHighDefault (const double threshold);
1759 
1765  void setErrorLowDefault (const double threshold);
1766 
1772  void setErrorHighDefault (const double threshold);
1773 
1774  // Already documented in base class
1775  virtual std::string getAverageToString() const;
1776 
1777  // Already documented in base class
1778  virtual double getValueNumeric( int sampleIndex ) const;
1779 
1780  // Already documented in base class
1781  virtual double getAveNumeric( ) const;
1782 
1791  virtual std::string getAccumulatedAverageAsString (const AccumType & accum) const;
1792 
1793  // Already documented in base class
1794  virtual void updateFrameAverage( ScratchAverages & scratchAvgs );
1795 
1803  virtual AccumReportType getAccumulatedAverage (const AccumType & accum) const;
1804 
1811  virtual AccumReportType getMaxValue (const AccumType & accum) const;
1812 
1819  virtual AccumReportType getMinValue (const AccumType & accum) const;
1820 
1832  (const MonitorPointThreshold& threshold, double abstimeVal) const;
1833 
1834  // documented in base class
1835  virtual void evaluateTolerance (const MonitorPointThreshold& threshold);
1836 
1837 private:
1838  ABSTIME_FORMAT format_;
1839 
1840 };
1841 
1842 class MonitorPointRA: public MonitorPointDouble {
1843 public:
1848  MonitorPointRA(const std::string& name,
1849  MONITOR_POINT_TYPE monitorPointType = MONITOR);
1850 
1855  virtual ~MonitorPointRA() {};
1856  // Already documented in base class
1857  virtual std::string getAverageToString() const;
1858 };
1859 class MonitorPointDec: public MonitorPointDouble {
1860 public:
1865  MonitorPointDec(const std::string& name,
1866  MONITOR_POINT_TYPE monitorPointType = MONITOR);
1867 
1872  virtual ~MonitorPointDec() {};
1873  // Already documented in base class
1874  virtual std::string getAverageToString() const;
1875 };
1876 
1890 public:
1892  typedef ::std::string AccumReportType;
1893 
1901  MonitorPointString(const std::string& name,
1902  MONITOR_POINT_TYPE monitorPointType = MONITOR);
1903 
1904 
1910 
1916  void setValue(const std::string& str) const;
1917 
1922  std::string getValue() const;
1923 
1927  std::string getAve() const;
1928 
1929  // Already documented in base class
1930  virtual std::string getValueToString(int sampleIndex) const;
1931 
1935  std::string getValueToString() const;
1936 
1937  // Already documented in base class
1938  virtual std::string getAverageToString() const;
1939 
1947  void setWarnLowDefault (const std::string strValue);
1948 
1956  void setWarnHighDefault (const std::string strValue);
1957 
1958 
1966  void setErrorLowDefault (const std::string strValue);
1967 
1975  void setErrorHighDefault (const std::string strValue);
1976 
1991  std::string getWarnLow (const MonitorPointThreshold& threshold) const;
1992 
2007  std::string getWarnHigh (const MonitorPointThreshold& threshold) const;
2008 
2023  std::string getErrorLow (const MonitorPointThreshold& threshold) const;
2024 
2039  std::string getErrorHigh (const MonitorPointThreshold& threshold) const;
2040 
2048  virtual void resetAccumulator (AccumType & accum) const;
2049 
2059  (AccumType & accum, int index) const;
2060 
2068  virtual void accumulate (AccumType & accum) const;
2069 
2078  virtual void accumulateAverage (AccumType & accum);
2079 
2088  virtual std::string getAccumulatedAverageAsString (const AccumType & accum) const;
2089 
2097  virtual AccumReportType getAccumulatedAverage (const AccumType & accum) const;
2098 
2105  virtual AccumReportType getMaxValue (const AccumType & accum) const;
2106 
2113  virtual AccumReportType getMinValue (const AccumType & accum) const;
2114 
2115  // Already documented in base class
2116  virtual void updateFrameAverage( ScratchAverages & scratchAvgs );
2117 
2129  (const MonitorPointThreshold& threshold,
2130  std::string stringVal) const;
2131 
2132  // documented in base class
2133  virtual void evaluateTolerance (const MonitorPointThreshold& threshold);
2134 
2135 
2141  bool operator==(const MonitorComponent& component) const;
2142 
2143 };
2144 
2151 public:
2153  typedef long AccumReportType;
2154 
2159  MonitorPointSerialNo(const std::string& name,
2160  MONITOR_POINT_TYPE monitorPointType = MONITOR);
2161 
2162 
2168 
2175  void setValue(long i, int sampleIndex = 0) const;
2176 
2182  int getValue(int sampleIndex = 0) const;
2183 
2187  int getAve() const;
2188 
2193  void setNumSamples(int nSamples) const;
2194 
2195  // Already documented in base class
2196  virtual std::string getValueToString(int sampleIndex = 0) const;
2197 
2198  // Already documented in base class
2199  virtual std::string getAverageToString() const;
2200 
2208  virtual void resetAccumulator (AccumType & accum) const;
2209 
2219  (AccumType & accum, int index) const;
2220 
2228  virtual void accumulate (AccumType & accum) const;
2229 
2238  virtual void accumulateAverage (AccumType & accum);
2239 
2248  virtual std::string getAccumulatedAverageAsString (const AccumType & accum) const;
2249 
2257  virtual AccumReportType getAccumulatedAverage (const AccumType & accum) const;
2258 
2265  virtual AccumReportType getMaxValue (const AccumType & accum) const;
2266 
2273  virtual AccumReportType getMinValue (const AccumType & accum) const;
2274 
2275  // Already documented in base class
2276  virtual void updateFrameAverage( ScratchAverages & scratchAvgs );
2277 
2289  (const MonitorPointThreshold& threshold, long serialNoVal) const;
2290 
2291  // documented in base class
2292  virtual void evaluateTolerance (const MonitorPointThreshold& threshold);
2293 
2294 
2295 };
2296 
2297 
2298 } // End namespace carma::monitor
2299 } // End namespace carma
2300 
2301 
2302 inline char
2304 {
2305  return getAveChar();
2306 }
2307 
2308 
2309 inline unsigned char
2311 {
2312  return static_cast< unsigned char >( getAveChar() );
2313 }
2314 
2315 
2316 inline short
2318 {
2319  return getAveShort();
2320 }
2321 
2322 
2323 inline long
2325 {
2326  return getAveLong();
2327 }
2328 
2329 
2330 inline int
2331 carma::monitor::MonitorPointEnum::getAve( ) const
2332 {
2333  return getAveLong();
2334 }
2335 
2336 
2337 inline float
2339 {
2340  return getAveFloat();
2341 }
2342 
2343 
2344 inline double
2346 {
2347  return getAveDouble();
2348 }
2349 
2350 
2351 inline ::std::complex< float >
2353 {
2354  return getAveComplex();
2355 }
2356 
2357 
2358 inline double
2360 {
2361  return getAveDouble();
2362 }
2363 
2364 
2365 inline ::std::string
2367 {
2368  return getValue();
2369 }
2370 
2371 
2372 inline int
2374 {
2375  return getAveSerialNo();
2376 }
2377 
2378 
2379 #endif
void setValue(const std::string &str) const
Set the value.
void setWarnLowDefault(const double threshold)
Sets THRESHOLD_LOW_WARN_VALUE for this monitor point.
virtual void evaluateTolerance(const MonitorPointThreshold &threshold)
Set the validity flags for the MonitorPoint using the threshold limits stored in the input MonitorPoi...
virtual void accumulate(AccumType &accum) const
Accumulate values from current monitor point for computing averages.
virtual void evaluateTolerance(const MonitorPointThreshold &threshold)
Set the validity flags for the MonitorPoint using the threshold limits stored in the input MonitorPoi...
void setFormat(ABSTIME_FORMAT format)
Select output format type.
virtual double getValueNumeric(int sampleIndex) const
Returns sample value as a double.
virtual enum MonitorPoint::VALIDITY evaluateSampleTolerance(const MonitorPointThreshold &threshold, long longVal) const
Method to return validity for a sample using the range parameters in the MonitorPointThreshold object...
VALIDITY
Validity states of the data value.
Definition: MonitorPoint.h:132
virtual double getAveNumeric() const
Returns average sample value as a double.
void setWarnHighDefault(const float threshold)
Sets THRESHOLD_HIGH_WARN_VALUE for this monitor point.
short MonitorValueType
Enumeration of possible types for monitor point values.
double getValue(int sampleIndex=0) const
Get the value.
virtual double getValueNumeric(int sampleIndex) const
Returns sample value as a double.
virtual std::string getAccumulatedAverageAsString(const AccumType &accum) const
Create and return string representation for average accumulated in accumulator object.
void setErrorLowDefault(bool boolVal)
Sets THRESHOLD_LOW_ERROR_VALUE for this monitor point.
void setWarnHighDefault(const char threshold)
Sets THRESHOLD_HIGH_WARN_VALUE for this monitor point.
virtual void evaluateTolerance(const MonitorPointThreshold &threshold)
Set the validity flags for the MonitorPoint using the threshold limits stored in the input MonitorPoi...
virtual short getWidth() const
Get the string length to use when interpreting the value to a string.
virtual enum MonitorPoint::VALIDITY accumulateSample(AccumType &accum, int index) const
Accumulates data from one monitor point sample (sample index == index) belonging this monitor point...
void setErrorLowDefault(const std::string strValue)
Sets lower error threshold to be strValue.
virtual std::string getAverageToString() const
Abstract method that returns the average value as a string.
virtual AccumReportType getMinValue(const AccumType &accum) const
Returns minimum value from accumulated data in accumulator object.
virtual std::string getAverageToString() const
Abstract method that returns the average value as a string.
double getValue(int sampleIndex=0) const
Get the value.
virtual AccumReportType getAccumulatedAverage(const AccumType &accum) const
Compute average from accumulated values in accumulator object.
virtual void resetAccumulator(AccumType &accum) const
Reset accumulator values from for computing averages.
unsigned char getAve() const
Get the average value.
virtual AccumReportType getMinValue(const AccumType &accum) const
Returns minimum value from accumulated data in accumulator object.
void setValue(const double f, int sampleIndex=0) const
Set the value.
MonitorPointDouble(const std::string &name, MONITOR_POINT_TYPE monitorPointType=MONITOR)
Constructor.
virtual double getValueNumeric(int sampleIndex) const
Returns sample value as a double.
MonitorPointFloat(const std::string &name, MONITOR_POINT_TYPE monitorPointType=MONITOR)
Constructor.
virtual std::string getAccumulatedAverageAsString(const AccumType &accum) const
Create and return string representation for average accumulated in accumulator object.
void setErrorHighDefault(const unsigned char threshold)
Sets THRESHOLD_HIGH_ERROR_VALUE for this monitor point.
virtual AccumReportType getAccumulatedAverage(const AccumType &accum) const
Compute average from accumulated values in accumulator object.
virtual void evaluateTolerance(const MonitorPointThreshold &threshold)
Set the validity flags for the MonitorPoint using the threshold limits stored in the input MonitorPoi...
virtual enum MonitorPoint::VALIDITY evaluateSampleTolerance(const MonitorPointThreshold &threshold, float floatVal) const
Method to return validity for a sample using the range parameters in the MonitorPointThreshold object...
virtual void evaluateTolerance(const MonitorPointThreshold &threshold)
Set the validity flags for the MonitorPoint using the threshold limits stored in the input MonitorPoi...
void removeEnumErrorLowDefault(const long enumValue)
Remove enum value from default error high threshold.
MonitorPointSerialNo(const std::string &name, MONITOR_POINT_TYPE monitorPointType=MONITOR)
Constructor.
virtual AccumReportType getMaxValue(const AccumType &accum) const
Returns maximum value from accumulated data in accumulator object.
virtual void updateFrameAverage(ScratchAverages &scratchAvgs)
Abstract method that updates the average value/validity for the frame.
long getValue(int sampleIndex=0) const
Get the value.
void setErrorHighDefault(bool boolVal)
Sets THRESHOLD_HIGH_ERROR_VALUE for this monitor point.
std::complex< float > getMaxSampleValue() const
Gets the maximum sample value (measured as max norm).
virtual AccumReportType getMaxValue(const AccumType &accum) const
Returns maximum value from accumulated data in accumulator object.
getValueString() will return the real part
virtual void resetAccumulator(AccumType &accum) const
Reset accumulator values from for computing averages.
void setErrorLowDefault(const char threshold)
Sets THRESHOLD_LOW_ERROR_VALUE for this monitor point.
virtual enum MonitorPoint::VALIDITY accumulateSample(AccumType &accum, int index) const
Accumulates data from one monitor point sample (sample index == index) belonging this monitor point...
char getAve() const
Get the average value.
getValueString() will return the full complex value
void setErrorHighDefault(const std::string strValue)
Sets upper error threshold to be strValue.
virtual std::string getAccumulatedAverageAsString(const AccumType &accum) const
Create and return string representation for average accumulated in accumulator object.
virtual double getAveNumeric() const
Returns average sample value as a double.
virtual AccumReportType getMinValue(const AccumType &accum) const
Returns minimum value from accumulated data in accumulator object.
getValueString() will return the amplitude
void setWarnLowDefault(bool boolVal)
Sets THRESHOLD_LOW_WARN_VALUE for this monitor point.
void setErrorHighDefault(const float threshold)
Sets THRESHOLD_HIGH_ERROR_VALUE for this monitor point.
virtual AccumReportType getMaxValue(const AccumType &accum) const
Returns maximum value from accumulated data in accumulator object.
Long integer value monitor point (4 bytes).
getValueString() will return the imaginary part
virtual void evaluateTolerance(const MonitorPointThreshold &threshold)
Set the validity flags for the MonitorPoint using the threshold limits stored in the input MonitorPoi...
Base class for all real value monitor points (float, double, etc).
virtual void accumulate(AccumType &accum) const
Accumulate values from current monitor point for computing averages.
virtual void updateFrameAverage(ScratchAverages &scratchAvgs)
Abstract method that updates the average value/validity for the frame.
virtual void resetAccumulator(AccumType &accum) const
Reset accumulator values from for computing averages.
void addEnumErrorLowDefault(const long enumValue)
Add default error low threshold.
getValueString() will return the phase
void setWarnHighDefault(bool boolVal)
Sets THRESHOLD_HIGH_WARN_VALUE for this monitor point.
bool getErrorLow(const MonitorPointThreshold &threshold) const
Returns current THRESHOLD_LOW_ERROR_VALUE for this monitor point.
virtual AccumReportType getAccumulatedAverage(const AccumType &accum) const
Compute average from accumulated values in accumulator object.
short getValue(int sampleIndex=0) const
Get the value.
virtual enum MonitorPoint::VALIDITY evaluateSampleTolerance(const MonitorPointThreshold &threshold, double doubleVal) const
Method to return validity for a sample using the range parameters in the MonitorPointThreshold object...
ABSTIME_FORMAT getFormat() const
Get output format type.
virtual void evaluateTolerance(const MonitorPointThreshold &threshold)
Set the validity flags for the MonitorPoint using the threshold limits stored in the input MonitorPoi...
virtual std::string getValueToString(int sampleIndex=0) const
Abstract method that returns the data value as a string.
String value monitor point (up to 80 characters in length).
void setStringRepresentation(const stringValueReturnType &type)
Decide how to treat complex number returned as string.
unsigned char getValue(int sampleIndex=0) const
Get the value.
virtual double getValueNumeric(int sampleIndex) const
Returns sample value as a double.
long getAve() const
Get the average value.
std::string getWarnLow(const MonitorPointThreshold &threshold) const
Returns current THRESHOLD_LOW_WARN_VALUE for this monitor point.
virtual AccumReportType getAccumulatedAverage(const AccumType &accum) const
Compute average from accumulated values in accumulator object.
virtual void updateFrameAverage(ScratchAverages &scratchAvgs)
Abstract method that updates the average value/validity for the frame.
virtual std::string getAccumulatedAverageAsString(const AccumType &accum) const
Create and return string representation for average accumulated in accumulator object.
virtual std::string getAccumulatedAverageAsString(const AccumType &accum) const
Create and return string representation for average accumulated in accumulator object.
MonitorPointAbstime(const std::string &name, MONITOR_POINT_TYPE monitorPointType=MONITOR)
Constructor.
virtual AccumReportType getAccumulatedAverage(const AccumType &accum) const
Compute average from accumulated values in accumulator object.
virtual AccumReportType getAccumulatedAverage(const AccumType &accum) const
Compute average from accumulated values in accumulator object.
void setWarnHighDefault(const short threshold)
Sets THRESHOLD_HIGH_WARN_VALUE for this monitor point.
virtual enum MonitorPoint::VALIDITY evaluateSampleTolerance(const MonitorPointThreshold &threshold, unsigned char byteVal) const
Method to return validity for a sample using the range parameters in the MonitorPointThreshold object...
void setValue(const char c, int sampleIndex=0) const
Set the value.
virtual enum MonitorPoint::VALIDITY evaluateSampleTolerance(const MonitorPointThreshold &threshold, short shortVal) const
Method to return validity for a sample using the range parameters in the MonitorPointThreshold object...
virtual std::string getAverageToString() const
Abstract method that returns the average value as a string.
virtual std::string getAverageToString() const
Abstract method that returns the average value as a string.
double getAve() const
Get the average value.
virtual void updateFrameAverage(ScratchAverages &scratchAvgs)
Abstract method that updates the average value/validity for the frame.
void setValue(const unsigned char c, int sampleIndex=0) const
Set the value.
bool operator==(const MonitorComponent &component) const
Compares this monitor point for equality to the one passed.
virtual void accumulateAverage(AccumType &accum)
Accumulates pre-calculated average value from current monitor point for computing averages...
void removeEnumErrorHighDefault(const long enumValue)
Remove enum value from default error low threshold.
Abstract base class for any enumerated constants, like state machines.
virtual std::string getAverageToString() const
Abstract method that returns the average value as a string.
virtual void updateFrameAverage(ScratchAverages &scratchAvgs)
Abstract method that updates the average value/validity for the frame.
virtual std::string getAccumulatedAverageAsString(const AccumType &accum) const
Create and return string representation for average accumulated in accumulator object.
Serial number monitor point, stored as integer value(4 bytes).
void setErrorHighDefault(const double threshold)
Sets THRESHOLD_HIGH_ERROR_VALUE for this monitor point.
virtual double getAveNumeric() const
Returns average sample value as a double.
virtual std::string getAverageToString() const
Abstract method that returns the average value as a string.
void setErrorHighDefault(const char threshold)
Sets THRESHOLD_HIGH_ERROR_VALUE for this monitor point.
MonitorPointComplex(const std::string &name, MONITOR_POINT_TYPE monitorPointType=MONITOR)
Constructor.
virtual AccumReportType getMinValue(const AccumType &accum) const
Returns minimum value from accumulated data in accumulator object.
void setValue(const float f, int sampleIndex=0) const
Set the value.
virtual double getAveNumeric() const
Returns average sample value as a double.
void setErrorHighDefault(const double threshold)
Sets THRESHOLD_HIGH_ERROR_VALUE for this monitor point.
virtual void accumulateAverage(AccumType &accum)
Accumulates pre-calculated average value from current monitor point for computing averages...
char getValue(int sampleIndex=0) const
Get the value.
virtual std::string getAccumulatedAverageAsString(const AccumType &accum) const
Create and return string representation for average accumulated in accumulator object.
bool operator==(const MonitorComponent &component) const
Compares this monitor point for equality to the one passed.
std::string getErrorHigh(const MonitorPointThreshold &threshold) const
Returns current THRESHOLD_HIGH_ERROR_VALUE for this monitor point.
virtual double getAveNumeric() const
Returns average sample value as a double.
virtual AccumReportType getMinValue(const AccumType &accum) const
Returns minimum value from accumulated data in accumulator object.
virtual AccumReportType getAccumulatedAverage(const AccumType &accum) const
Compute average from accumulated values in accumulator object.
void setValue(const short i, int sampleIndex=0) const
Set the value.
std::string getWarnHigh(const MonitorPointThreshold &threshold) const
Returns current THRESHOLD_HIGH_WARN_VALUE for this monitor point.
virtual void accumulateAverage(AccumType &accum)
Accumulates pre-calculated average value from current monitor point for computing averages...
virtual AccumReportType getMaxValue(const AccumType &accum) const
Returns maximum value from accumulated data in accumulator object.
virtual enum MonitorPoint::VALIDITY evaluateSampleTolerance(const MonitorPointThreshold &threshold, char charVal) const
Method to return validity for a sample using the range parameters in the MonitorPointThreshold object...
bool getErrorHigh(const MonitorPointThreshold &threshold) const
Returns current THRESHOLD_HIGH_ERROR_VALUE for this monitor point.
void setWarnLowDefault(const short threshold)
Sets THRESHOLD_LOW_WARN_VALUE for this monitor point.
std::string getErrorLow(const MonitorPointThreshold &threshold) const
Returns current THRESHOLD_LOW_ERROR_VALUE for this monitor point.
std::string getValue() const
Get the value.
virtual std::string getAverageToString() const
Abstract method that returns the average value as a string.
void setErrorHighDefault(const short threshold)
Sets THRESHOLD_HIGH_ERROR_VALUE for this monitor point.
virtual AccumReportType getMinValue(const AccumType &accum) const
Returns minimum value from accumulated data in accumulator object.
void setWarnHighDefault(const unsigned char threshold)
Sets THRESHOLD_HIGH_WARN_VALUE for this monitor point.
int getNumEnumerations() const
Get the number of enumerations.
void setWarnLowDefault(const long threshold)
Sets THRESHOLD_LOW_WARN_VALUE for this monitor point.
void setErrorHighDefault(const long threshold)
Sets THRESHOLD_HIGH_ERROR_VALUE for this monitor point.
virtual std::string getValueToString(int sampleIndex=0) const
Abstract method that returns the data value as a string.
virtual std::string getAccumulatedAverageAsString(const AccumType &accum) const
Create and return string representation for average accumulated in accumulator object.
virtual AccumReportType getMinValue(const AccumType &accum) const
Returns minimum value from accumulated data in accumulator object.
std::complex< float > getAve() const
Get the average value.
virtual AccumReportType getAccumulatedAverage(const AccumType &accum) const
Compute average from accumulated values in accumulator object.
void setWarnHighDefault(const long threshold)
Sets THRESHOLD_HIGH_WARN_VALUE for this monitor point.
MonitorPointChar(const std::string &name, MONITOR_POINT_TYPE monitorPointType=MONITOR)
Constructor.
virtual std::string getAccumulatedAverageAsString(const AccumType &accum) const
Create and return string representation for average accumulated in accumulator object.
virtual void updateFrameAverage(ScratchAverages &scratchAvgs)
Abstract method that updates the average value/validity for the frame.
virtual void evaluateTolerance(const MonitorPointThreshold &threshold)
Set the validity flags for the MonitorPoint using the threshold limits stored in the input MonitorPoi...
void setWarnLowDefault(const char threshold)
Sets THRESHOLD_LOW_WARN_VALUE for this monitor point.
Character value monitor point.
MonitorPointBool(const std::string &name, MONITOR_POINT_TYPE monitorPointType=MONITOR)
Constructor.
MonitorPointInt(const std::string &name, MONITOR_POINT_TYPE monitorPointType=MONITOR)
Constructor.
virtual void updateFrameAverage(ScratchAverages &scratchAvgs)
Abstract method that updates the average value/validity for the frame.
virtual std::string getAverageToString() const
Abstract method that returns the average value as a string.
virtual AccumReportType getAccumulatedAverage(const AccumType &accum) const
Compute average from accumulated values in accumulator object.
virtual std::string getAverageToString() const
Abstract method that returns the average value as a string.
int getValue(int sampleIndex=0) const
Get the value.
void setValue(const double f, int sampleIndex=0) const
Set the value.
void setErrorLowDefault(const double threshold)
Sets THRESHOLD_LOW_ERROR_VALUE for this monitor point.
void setWarnLowDefault(const float threshold)
Sets THRESHOLD_LOW_WARN_VALUE for this monitor point.
void setWarnLowDefault(const float threshold)
Sets THRESHOLD_LOW_WARN_VALUE for this monitor point.
MonitorPointString(const std::string &name, MONITOR_POINT_TYPE monitorPointType=MONITOR)
Constructor.
virtual AccumReportType getMaxValue(const AccumType &accum) const
Returns maximum value from accumulated data in accumulator object.
void setWarnHighDefault(const double threshold)
Sets THRESHOLD_HIGH_WARN_VALUE for this monitor point.
virtual AccumReportType getMaxValue(const AccumType &accum) const
Returns maximum value from accumulated data in accumulator object.
short getPrecision() const
Get the number of digits to the right of the decimal point for interpreting the value to a string...
virtual void updateFrameAverage(ScratchAverages &scratchAvgs)
Abstract method that updates the average value/validity for the frame.
void setWarnHighDefault(const float threshold)
Sets THRESHOLD_HIGH_WARN_VALUE for this monitor point.
virtual void accumulate(AccumType &accum) const
Accumulate values from current monitor point for computing averages.
virtual void accumulate(AccumType &accum) const
Accumulate values from current monitor point for computing averages.
void setValue(const std::complex< float > &f, int sampleIndex=0) const
Set the value.
virtual std::string getValueToString(int sampleIndex=0) const
Abstract method that returns the data value as a string.
virtual AccumReportType getMinValue(const AccumType &accum) const
Returns minimum value from accumulated data in accumulator object.
virtual std::string getAverageToString() const
Abstract method that returns the average value as a string.
void addEnumErrorHighDefault(const long enumValue)
Add default error high threshold.
void addEnumWarnLowDefault(const long enumValue)
Add default warning low threshold.
virtual AccumReportType getMinValue(const AccumType &accum) const
Returns minimum value from accumulated data in accumulator object.
virtual void accumulateAverage(AccumType &accum)
Accumulates pre-calculated average value from current monitor point for computing averages...
Abstract base class for a monitor point.
Definition: MonitorPoint.h:68
short getAve() const
Get the average value.
virtual std::string getAverageToString() const
Abstract method that returns the average value as a string.
virtual void evaluateTolerance(const MonitorPointThreshold &threshold)
Set the validity flags for the MonitorPoint using the threshold limits stored in the input MonitorPoi...
void setErrorLowDefault(const unsigned char threshold)
Sets THRESHOLD_LOW_ERROR_VALUE for this monitor point.
virtual AccumReportType getAccumulatedAverage(const AccumType &accum) const
Compute average from accumulated values in accumulator object.
virtual std::string getValueToString(int sampleIndex=0) const
Abstract method that returns the data value as a string.
virtual double getValueNumeric(int sampleIndex) const
Returns sample value as a double.
virtual enum MonitorPoint::VALIDITY evaluateSampleTolerance(const MonitorPointThreshold &threshold, long serialNoVal) const
Method to return validity for a sample using the range parameters in the MonitorPointThreshold object...
virtual enum MonitorPoint::VALIDITY accumulateSample(AccumType &accum, int index) const
Accumulates data from one monitor point sample (sample index == index) belonging this monitor point...
void setWarnLowDefault(const std::string strValue)
Sets lower warning threshold to be strValue.
virtual std::string getValueToString(int sampleIndex=0) const
Abstract method that returns the data value as a string.
void removeEnumWarnHighDefault(const long enumValue)
Remove enum value from default warning high threshold.
std::string getFormattedAbstime(double mjd) const
Format an mjd according to the selected format.
virtual void evaluateTolerance(const MonitorPointThreshold &threshold)
Set the validity flags for the MonitorPoint using the threshold limits stored in the input MonitorPoi...
bool getWarnHigh(const MonitorPointThreshold &threshold) const
Returns current THRESHOLD_HIGH_WARN_VALUE for this monitor point.
virtual std::string getValueToString(int sampleIndex=0) const
Abstract method that returns the data value as a string.
bool isBitmask() const
Is this monitor point enumeration a bitmask.
virtual enum MonitorPoint::VALIDITY evaluateSampleTolerance(const MonitorPointThreshold &threshold, std::complex< float > complexVal) const
Method to return validity for a sample using the range parameters in the MonitorPointThreshold object...
virtual AccumReportType getMaxValue(const AccumType &accum) const
Returns maximum value from accumulated data in accumulator object.
void setErrorLowDefault(const short threshold)
Sets THRESHOLD_LOW_ERROR_VALUE for this monitor point.
float getValue(int sampleIndex=0) const
Get the value.
virtual enum MonitorPoint::VALIDITY accumulateSample(AccumType &accum, int index) const
Accumulates data from one monitor point sample (sample index == index) belonging this monitor point...
virtual bool getAve() const
Get the average value.
MonitorPointShort(const std::string &name, MONITOR_POINT_TYPE monitorPointType=MONITOR)
Constructor.
virtual enum MonitorPoint::VALIDITY evaluateSampleTolerance(const MonitorPointThreshold &threshold, int enumVal) const
Method to return validity for a sample using the range parameters in the MonitorPointThreshold object...
MONITOR_POINT_TYPE
Monitor point type.
Definition: MonitorPoint.h:171
Byte value (unsigned char) monitor point.
virtual enum MonitorPoint::VALIDITY evaluateSampleTolerance(const MonitorPointThreshold &threshold, double abstimeVal) const
Method to return validity for a sample using the range parameters in the MonitorPointThreshold object...
virtual std::string getAccumulatedAverageAsString(const AccumType &accum) const
Create and return string representation for average accumulated in accumulator object.
int getAve() const
Get the average value.
virtual AccumReportType getMaxValue(const AccumType &accum) const
Returns maximum value from accumulated data in accumulator object.
virtual void resetAccumulator(AccumType &accum) const
Reset accumulator values from for computing averages.
virtual void evaluateTolerance(const MonitorPointThreshold &threshold)
Set the validity flags for the MonitorPoint using the threshold limits stored in the input MonitorPoi...
virtual AccumReportType getAccumulatedAverage(const AccumType &accum) const
Compute average from accumulated values in accumulator object.
float getAve() const
Get the average value.
virtual double getAveNumeric() const
Returns average sample value as a double.
A composite interface used to build the monitor system hierarchy.
virtual std::string getValueToString(int sampleIndex=0) const
Abstract method that returns the data value as a string.
std::complex< float > getValue(int sampleIndex=0) const
Get the value.
void removeEnumWarnLowDefault(const long enumValue)
Remove enum value from default warning low threshold.
virtual void resetAccumulator(AccumType &accum) const
Reset accumulator values from for computing averages.
virtual std::string getValueToString(int sampleIndex=0) const
Abstract method that returns the data value as a string.
void setNumEnumerations(int num)
Set the number of enumerations.
void setErrorLowDefault(const float threshold)
Sets THRESHOLD_LOW_ERROR_VALUE for this monitor point.
void setErrorLowDefault(const float threshold)
Sets THRESHOLD_LOW_ERROR_VALUE for this monitor point.
virtual AccumReportType getMinValue(const AccumType &accum) const
Returns minimum value from accumulated data in accumulator object.
virtual AccumReportType getAccumulatedAverage(const AccumType &accum) const
Compute average from accumulated values in accumulator object.
void setErrorHighDefault(const float threshold)
Sets THRESHOLD_HIGH_ERROR_VALUE for this monitor point.
double getAve() const
Get the average value.
virtual enum MonitorPoint::VALIDITY evaluateSampleTolerance(const MonitorPointThreshold &threshold, std::string stringVal) const
Method to return validity for a sample using the range parameters in the MonitorPointThreshold object...
virtual void updateFrameAverage(ScratchAverages &scratchAvgs)
Abstract method that updates the average value/validity for the frame.
virtual double getAveNumeric() const
Returns average sample value as a double.
virtual std::string getValueToString(int sampleIndex=0) const
Abstract method that returns the data value as a string.
void setErrorLowDefault(const double threshold)
Sets THRESHOLD_LOW_ERROR_VALUE for this monitor point.
virtual std::string getAccumulatedAverageAsString(const AccumType &accum) const
Create and return string representation for average accumulated in accumulator object.
virtual AccumReportType getMaxValue(const AccumType &accum) const
Returns maximum value from accumulated data in accumulator object.
bool getWarnLow(const MonitorPointThreshold &threshold) const
Returns current THRESHOLD_LOW_WARN_VALUE for this monitor point.
virtual void evaluateTolerance(const MonitorPointThreshold &threshold)
Set the validity flags for the MonitorPoint using the threshold limits stored in the input MonitorPoi...
void setPrecision(short precision)
Set the number of digits to the right of the decimal point for interpreting the value to a string...
std::string getValueToString() const
Gets the full string stored for this mp.
virtual std::string convertToString(int enumValue) const =0
Convert an integer value, interpreted as an enum, into a string.
void setValue(const bool b, int sampleIndex=0) const
Set the value.
Abstract base class for all monitor points that can be represented as a number.
void setWarnHighDefault(const std::string strValue)
Sets upper warning threshold to be strValue.
virtual enum MonitorPoint::VALIDITY evaluateSampleTolerance(const MonitorPointThreshold &threshold, bool boolVal) const
Method to return validity for a sample using the range parameters in the MonitorPointThreshold object...
std::complex< float > getMinSampleValue() const
Gets the minimum sample value (measured as min norm).
virtual void accumulateAverage(AccumType &accum)
Accumulates pre-calculated average value from current monitor point for computing averages...
virtual enum MonitorPoint::VALIDITY accumulateSample(AccumType &accum, int index) const
Accumulates data from one monitor point sample (sample index == index) belonging this monitor point...
bool getValue(int sampleIndex=0) const
Get the value.
Short integer value monitor point (2 bytes).
void setWarnLowDefault(const double threshold)
Sets THRESHOLD_LOW_WARN_VALUE for this monitor point.
void setValue(long i, int sampleIndex=0) const
Set the value.
virtual void updateFrameAverage(ScratchAverages &scratchAvgs)
Abstract method that updates the average value/validity for the frame.
virtual void updateFrameAverage(ScratchAverages &scratchAvgs)
Abstract method that updates the average value/validity for the frame.
Absolute time value monitor point.
MonitorPointEnum(const std::string &name, const bool bitmask=false, MONITOR_POINT_TYPE monitorPointType=MONITOR)
Constructor.
virtual AccumReportType getMaxValue(const AccumType &accum) const
Returns maximum value from accumulated data in accumulator object.
void setWarnLowDefault(const unsigned char threshold)
Sets THRESHOLD_LOW_WARN_VALUE for this monitor point.
virtual AccumReportType getMinValue(const AccumType &accum) const
Returns minimum value from accumulated data in accumulator object.
void setValue(long i, int sampleIndex=0) const
Set the value.
virtual AccumReportType getMinValue(const AccumType &accum) const
Returns minimum value from accumulated data in accumulator object.
MonitorPointReal(const std::string &name, MonitorValueType monitorValueType, MONITOR_POINT_TYPE monitorPointType=MONITOR)
Constructor.
void setWarnHighDefault(const double threshold)
Sets THRESHOLD_HIGH_WARN_VALUE for this monitor point.
virtual double getValueNumeric(int sampleIndex) const
Returns sample value as a double.
virtual void updateFrameAverage(ScratchAverages &scratchAvgs)
Abstract method that updates the average value/validity for the frame.
void addEnumWarnHighDefault(const long enumValue)
Add default warning high threshold.
void setErrorLowDefault(const long threshold)
Sets THRESHOLD_LOW_ERROR_VALUE for this monitor point.
std::string getAve() const
Get the average value.
Abstract base class for a numeric monitor point.
virtual AccumReportType getMaxValue(const AccumType &accum) const
Returns maximum value from accumulated data in accumulator object.
void setNumSamples(int nSamples) const
Set the number of samples to one...
MonitorPointByte(const std::string &name, MONITOR_POINT_TYPE monitorPointType=MONITOR)
Constructor.
virtual double getValueNumeric(int sampleIndex) const
Returns sample value as a double.
virtual std::string getValueToString(int sampleIndex=0) const
Abstract method that returns the data value as a string.
virtual void accumulate(AccumType &accum) const
Accumulate values from current monitor point for computing averages.
virtual AccumReportType getMaxValue(const AccumType &accum) const
Returns maximum value from accumulated data in accumulator object.
virtual std::string getAccumulatedAverageAsString(const AccumType &accum) const
Create and return string representation for average accumulated in accumulator object.