![]() |
AlarmNotifications
PANDA Slow Control Alarm Daemon
|
Entry in the AlarmServerConnector statusmap. More...
#include <alarmstatusentry.h>
Public Member Functions | |
AlarmStatusEntry (const std::string &pvname, const std::string &severity, const std::string &status) noexcept | |
Constructor. More... | |
~AlarmStatusEntry () noexcept | |
Destructor. More... | |
bool | operator== (const AlarmStatusEntry &other) noexcept |
Equality operator. More... | |
AlarmStatusEntry (const AlarmStatusEntry &other) noexcept | |
Copy constructor. More... | |
AlarmStatusEntry (AlarmStatusEntry &&other) noexcept | |
Move constructor (C++11) More... | |
AlarmStatusEntry & | operator= (const AlarmStatusEntry &other) noexcept |
Copy assignment. More... | |
AlarmStatusEntry & | operator= (AlarmStatusEntry &&other) noexcept |
Move assignment (C++11) More... | |
const std::string & | getPVName () const noexcept |
Query PV name. More... | |
const std::string & | getSeverity () const noexcept |
Query the severity. More... | |
void | setSeverity (const std::string &severity) noexcept |
Change the severity. More... | |
const std::string & | getStatus () const noexcept |
Query the status. More... | |
void | setStatus (const std::string &status) noexcept |
Change the status. More... | |
time_t | getTriggerTime () const noexcept |
Query the trigger time. More... | |
void | setTriggerTime (const time_t triggertime) noexcept |
Change the trigger time_t. More... | |
void | update (const AlarmStatusEntry &newdata) noexcept |
Update severity and status data. More... | |
bool | getDesktopNotificationSent () const noexcept |
Query desktop notification flag. More... | |
void | setDesktopNotificationSent (const bool desktopNotificationSent) noexcept |
Change desktop notification flag. More... | |
bool | getEmailNotificationSent () const noexcept |
Query e-mail notification flag. More... | |
void | setEmailNotificationSent (const bool emailNotificationSent) noexcept |
Change e-mail notification flag. More... | |
Private Attributes | |
std::string | _pvname |
Name of the PV. More... | |
std::string | _severity |
The severity of the alarm. More... | |
std::string | _status |
The alarm status of the PV. More... | |
time_t | _triggertime |
Time the alarm message was received. More... | |
bool | _desktopNotificationSent |
Flag for sent desktop notification. More... | |
bool | _emailNotificationSent |
Flag for sent e-mail notification. More... | |
Entry in the AlarmServerConnector statusmap.
This class is a container for the information regarding the alarm status of a single PV. The class AlarmServerConnector manages a map of these entries. This class does not operate on or manage this information, it is a pure data container,
Definition at line 51 of file alarmstatusentry.h.
|
noexcept |
Constructor.
Writes the arguments to the internal storage and takes a timestamp. The notification flags are initialized as false.
pvname | Name of the PV triggering the alarm |
severity | The Alarm Server severity string |
status | The Alarm Server status string |
Definition at line 38 of file alarmstatusentry.cpp.
|
noexcept |
|
noexcept |
Copy constructor.
Creates a non-destructive copy of another status object.
other | Another instance of AlarmStatusEntry |
Definition at line 55 of file alarmstatusentry.cpp.
|
noexcept |
Move constructor (C++11)
Creates a destructive copy of another status object. Accessing the other object afterwards may result in undefined behaviour.
other | Another instance of AlarmStatusEntry |
Definition at line 67 of file alarmstatusentry.cpp.
|
noexcept |
Query desktop notification flag.
Flag to show if a desktop notification has already been sent out to avoid double messaging.
Definition at line 156 of file alarmstatusentry.cpp.
|
noexcept |
Query e-mail notification flag.
Flag to show if an e-mail notification has already been sent out to avoid double messaging.
Definition at line 166 of file alarmstatusentry.cpp.
|
noexcept |
Query PV name.
The name of the PV that triggerd the alarm.
Definition at line 112 of file alarmstatusentry.cpp.
|
noexcept |
Query the severity.
The severity differs from the severity notation in EPICS because the CSS Alarm Server adds the functionality to acknowledge an alarm, a concept that does not exist in pure EPICS. An acknowledged alarm severity has "_ACK" added to the normal severity description.
Definition at line 117 of file alarmstatusentry.cpp.
|
noexcept |
Query the status.
The status of the PV within the CSS Alarm Server. This status can differ from the status within EPICS as the Alarm Server has the ability to latch alarms.
Definition at line 127 of file alarmstatusentry.cpp.
|
noexcept |
Query the trigger time.
The timestamp saved in the constructor. The timestamp is used to calculate if the alarm is due to send out a notification, e.g. via e-mail.
Definition at line 137 of file alarmstatusentry.cpp.
|
noexcept |
Copy assignment.
Overwrites the data of this instance with data copied from the other instance.
other | Another instance of AlarmStatusEntry |
Definition at line 79 of file alarmstatusentry.cpp.
|
noexcept |
Move assignment (C++11)
Overwrites the data of this instance with data moved from the other object. Accessing the other object afterwards may result in undefined behaviour.
other | Another instance of AlarmStatusEntry |
Definition at line 93 of file alarmstatusentry.cpp.
|
noexcept |
Equality operator.
Checks if all parameters within two instances are equal,
other | Another instance of AlarmStatusEntry |
Definition at line 107 of file alarmstatusentry.cpp.
|
noexcept |
Change desktop notification flag.
Flag to show if a desktop notification has already been sent out to avoid double messaging.
desktopNotificationSent | Set to true of notification has been sent |
Definition at line 161 of file alarmstatusentry.cpp.
|
noexcept |
Change e-mail notification flag.
Flag to show if an e-mail notification has already been sent out to avoid double messaging.
emailNotificationSent | Set to true of notification has been sent |
Definition at line 171 of file alarmstatusentry.cpp.
|
noexcept |
Change the severity.
The severity differs from the severity notation in EPICS because the CSS Alarm Server adds the functionality to acknowledge an alarm, a concept that does not exist in pure EPICS. An acknowledged alarm severity has "_ACK" added to the normal severity description.
severity | The new severity string |
Definition at line 122 of file alarmstatusentry.cpp.
|
noexcept |
Change the status.
The status of the PV within the CSS Alarm Server. This status can differ from the status within EPICS as the Alarm Server has the ability to latch alarms.
status | The new status string |
Definition at line 132 of file alarmstatusentry.cpp.
|
noexcept |
Change the trigger time_t.
Changes the timestamp of the message reception. Should only be used when there is a really good reason for.
triggertime | POSIX time value |
Definition at line 142 of file alarmstatusentry.cpp.
|
noexcept |
Update severity and status data.
The severity and status values are copied from the other instance of AlarmStatusEntry, all other values are left untouched.
newdata | Another instance of AlarmStatusEntry |
Definition at line 147 of file alarmstatusentry.cpp.
|
private |
Flag for sent desktop notification.
Indicator to show if a desktop notification has already been sent out to avoid double messaging.
Definition at line 83 of file alarmstatusentry.h.
|
private |
Flag for sent e-mail notification.
Indicator to show id an e-mail has already been sent out to avoid double messaging.
Definition at line 89 of file alarmstatusentry.h.
|
private |
Name of the PV.
The name of the PV that triggered the alarm. The pseudo-protocol prefix "epics://" used within the CSS Alarm Server is removed by CMSClient
Definition at line 59 of file alarmstatusentry.h.
|
private |
The severity of the alarm.
This severity differs from the severity notation in EPICS because the CSS Alarm Server adds the functionality to acknowledge an alarm, a concept that does not exist in pure EPICS. An acknowledged alarm severity has "_ACK" added to the normal severity description.
Definition at line 65 of file alarmstatusentry.h.
|
private |
The alarm status of the PV.
The status of the PV within the CSS Alarm Server. This status can differ from the status within EPICS as the Alarm Server has the ability to latch alarms.
Definition at line 71 of file alarmstatusentry.h.
|
private |
Time the alarm message was received.
The constructor records the time when the entry is created. The timestamp is used to calculate if the alarm is due to send out a notification, e.g. via e-mail.
Definition at line 77 of file alarmstatusentry.h.