CARMA C++
RrdCollectorPing.h
Go to the documentation of this file.
1 // $Id: RrdCollectorPing.h,v 1.2 2011/07/19 20:53:21 eml Exp $
2 
3 #ifndef SZA_UTIL_RRDCOLLECTORRRDPING_H
4 #define SZA_UTIL_RRDCOLLECTORRRDPING_H
5 
16 #include "carma/szautil/Time.h"
17 
18 namespace sza {
19  namespace util {
20 
21  class RrdCollectorPing : public RrdCollector {
22  public:
23 
27  RrdCollectorPing(std::string host,
28  std::string rrdName,
29  unsigned timeoutIntervalInSeconds=0);
30 
31  RrdCollectorPing(std::string host,
32  std::string rrdName,
33  SystemStatusSubsystemMutex* ms,
36  carma::monitor::MonitorPointEnum& mpDeviceStatus,
38  unsigned timeoutIntervalInSeconds=0);
42  virtual ~RrdCollectorPing();
43 
44  protected:
45 
47  carma::monitor::MonitorPointAbstime* mpPingSampleTime_;
48  carma::monitor::MonitorPointEnum* mpDeviceStatus_;
50 
51  Time pingTime_;
52  TimeVal pingSampleTime_;
53 
54  Time maxPingTime_;
55 
56  // Assemble the command string to be issued
57 
58  virtual std::string getCommandString();
59 
60  // Define what it means to parse the return message
61 
62  virtual void processDeviceStatus();
63 
64  // Write monitor points once data have been processed
65 
66  void writeMonitorPoints();
67 
68  }; // End class RrdCollectorPing
69 
70  } // End namespace util
71 } // End namespace sza
72 
73 
74 
75 #endif // End #ifndef SZA_UTIL_RRDCOLLECTORRRDPING_H
Abstract base class for any enumerated constants, like state machines.
Tagged: Tue Nov 2 15:47:23 PDT 2010.
Absolute time value monitor point.