41 _severity ( severity ),
43 _triggertime ( std::time (
nullptr ) ),
44 _desktopNotificationSent (
false ),
45 _emailNotificationSent (
false )
57 _pvname ( other._pvname ),
58 _severity ( other._severity ),
59 _status ( other._status ),
60 _triggertime ( other._triggertime ),
61 _desktopNotificationSent ( other._desktopNotificationSent ),
62 _emailNotificationSent ( other._emailNotificationSent )
69 _pvname (
std::move ( other._pvname ) ),
70 _severity (
std::move ( other._severity ) ),
71 _status (
std::move ( other._status ) ),
72 _triggertime ( other._triggertime ),
73 _desktopNotificationSent ( other._desktopNotificationSent ),
74 _emailNotificationSent ( other._emailNotificationSent )
83 _pvname = other._pvname;
84 _severity = other._severity;
85 _status = other._status;
86 _triggertime = other._triggertime;
87 _desktopNotificationSent = other._desktopNotificationSent;
88 _emailNotificationSent = other._emailNotificationSent;
97 _pvname = std::move ( other._pvname );
98 _severity = std::move ( other._severity );
99 _status = std::move ( other._status );
109 return ( _pvname == other._pvname ) && ( _severity == other._severity ) && ( _status == other._status ) && ( _triggertime == other._triggertime ) && ( _desktopNotificationSent == other._desktopNotificationSent ) && ( _emailNotificationSent == other._emailNotificationSent );
124 _severity = severity;
144 _triggertime = triggertime;
149 if ( _triggertime < newdata._triggertime )
151 _severity = newdata._severity;
152 _status = newdata._status;
163 _desktopNotificationSent = desktopNotificationSent;
173 _emailNotificationSent = emailNotificationSent;
const std::string & getPVName() const noexcept
Query PV name.
std::string _status
The alarm status of the PV.
~AlarmStatusEntry() noexcept
Destructor.
void setSeverity(const std::string &severity) noexcept
Change the severity.
void setDesktopNotificationSent(const bool desktopNotificationSent) noexcept
Change desktop notification flag.
std::ostream & operator<<(std::ostream &os, const AlarmNotifications::AlarmStatusEntry &ase)
Stream output operator for AlarmStatusEntry.
std::string _severity
The severity of the alarm.
Alarm entry for the AlarmServerConnector.
Entry in the AlarmServerConnector statusmap.
time_t _triggertime
Time the alarm message was received.
bool getEmailNotificationSent() const noexcept
Query e-mail notification flag.
bool _emailNotificationSent
Flag for sent e-mail notification.
Namespace for Alarm Notifications application.
AlarmStatusEntry & operator=(const AlarmStatusEntry &other) noexcept
Copy assignment.
void setStatus(const std::string &status) noexcept
Change the status.
bool operator==(const AlarmStatusEntry &other) noexcept
Equality operator.
#define noexcept
Allow using the noexcept keyword with GCC < 4.6.
std::string _pvname
Name of the PV.
time_t getTriggerTime() const noexcept
Query the trigger time.
const std::string & getSeverity() const noexcept
Query the severity.
void setTriggerTime(const time_t triggertime) noexcept
Change the trigger time_t.
AlarmStatusEntry(const std::string &pvname, const std::string &severity, const std::string &status) noexcept
Constructor.
void setEmailNotificationSent(const bool emailNotificationSent) noexcept
Change e-mail notification flag.
bool getDesktopNotificationSent() const noexcept
Query desktop notification flag.
bool _desktopNotificationSent
Flag for sent desktop notification.
void update(const AlarmStatusEntry &newdata) noexcept
Update severity and status data.
const std::string & getStatus() const noexcept
Query the status.