AlarmNotifications
PANDA Slow Control Alarm Daemon
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
alarmstatusentry.h
Go to the documentation of this file.
1 
34 #ifndef ALARMSTATUSENTRY_H
35 #define ALARMSTATUSENTRY_H
36 
37 #include "oldgcccompat.h" // Compatibilty macros for GCC < 4.7
38 
39 #include <ctime>
40 #include <ostream>
41 #include <string>
42 
43 namespace AlarmNotifications
44 {
45 
52 {
53 private:
59  std::string _pvname;
65  std::string _severity;
71  std::string _status;
77  time_t _triggertime;
90 
91 public:
100  AlarmStatusEntry ( const std::string& pvname, const std::string& severity, const std::string& status ) noexcept;
114  bool operator== ( const AlarmStatusEntry& other ) noexcept;
121  AlarmStatusEntry ( const AlarmStatusEntry& other ) noexcept;
128  AlarmStatusEntry ( AlarmStatusEntry&& other ) noexcept;
136  AlarmStatusEntry& operator= ( const AlarmStatusEntry& other ) noexcept;
144  AlarmStatusEntry& operator= ( AlarmStatusEntry&& other ) noexcept;
151  const std::string& getPVName() const noexcept;
158  const std::string& getSeverity() const noexcept;
166  void setSeverity ( const std::string& severity ) noexcept;
173  const std::string& getStatus() const noexcept;
181  void setStatus ( const std::string& status ) noexcept;
188  time_t getTriggerTime() const noexcept;
196  void setTriggerTime ( const time_t triggertime ) noexcept;
204  void update ( const AlarmStatusEntry& newdata ) noexcept;
211  bool getDesktopNotificationSent() const noexcept;
219  void setDesktopNotificationSent ( const bool desktopNotificationSent ) noexcept;
226  bool getEmailNotificationSent() const noexcept;
234  void setEmailNotificationSent ( const bool emailNotificationSent ) noexcept;
235 };
236 
245 std::ostream& operator<< ( std::ostream& os, const AlarmNotifications::AlarmStatusEntry& ase );
246 
247 }
248 
249 #endif // ALARMSTATUSENTRY_H