AlarmNotifications::final Class Reference

Entry in the AlarmServerConnector statusmap. More...

#include <alarmstatusentry.h>

Collaboration diagram for AlarmNotifications::final:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AlarmStatusEntry (const std::string &pvname, const std::string &severity, const std::string &status) noexcept
 Constructor.
 ~AlarmStatusEntry () noexcept
 Destructor.
bool operator== (const AlarmStatusEntry &other) noexcept
 Equality operator.
 AlarmStatusEntry (const AlarmStatusEntry &other) noexcept
 Copy constructor.
 AlarmStatusEntry (AlarmStatusEntry &&other) noexcept
 Move constructor (C++11).
AlarmStatusEntry & operator= (const AlarmStatusEntry &other) noexcept
 Copy assignment.
AlarmStatusEntry & operator= (AlarmStatusEntry &&other) noexcept
 Move assignment (C++11).
const std::string & getPVName () const noexcept
 Query PV name.
const std::string & getSeverity () const noexcept
 Query the severity.
void setSeverity (const std::string &severity) noexcept
 Change the severity.
const std::string & getStatus () const noexcept
 Query the status.
void setStatus (const std::string &status) noexcept
 Change the status.
time_t getTriggerTime () const noexcept
 Query the trigger time.
void setTriggerTime (const time_t triggertime) noexcept
 Change the trigger time_t.
void update (const AlarmStatusEntry &newdata) noexcept
 Update severity and status data.
bool getDesktopNotificationSent () const noexcept
 Query desktop notification flag.
void setDesktopNotificationSent (const bool desktopNotificationSent) noexcept
 Change desktop notification flag.
bool getEmailNotificationSent () const noexcept
 Query e-mail notification flag.
void setEmailNotificationSent (const bool emailNotificationSent) noexcept
 Change e-mail notification flag.

Private Attributes

std::string _pvname
 Name of the PV.
std::string _severity
 The severity of the alarm.
std::string _status
 The alarm status of the PV.
time_t _triggertime
 Time the alarm message was received.
bool _desktopNotificationSent
 Flag for sent desktop notification.
bool _emailNotificationSent
 Flag for sent e-mail notification.

Detailed Description

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.


Constructor & Destructor Documentation

AlarmNotifications::final::~AlarmStatusEntry (  ) 

Destructor.

Has nothing to do...


Member Function Documentation

AlarmNotifications::final::AlarmStatusEntry ( AlarmStatusEntry &&  other  ) 

Move constructor (C++11).

Creates a destructive copy of another status object. Accessing the other object afterwards may result in undefined behaviour.

Parameters:
other Another instance of AlarmStatusEntry
AlarmNotifications::final::AlarmStatusEntry ( const AlarmStatusEntry &  other  ) 

Copy constructor.

Creates a non-destructive copy of another status object.

Parameters:
other Another instance of AlarmStatusEntry
AlarmNotifications::final::AlarmStatusEntry ( const std::string &  pvname,
const std::string &  severity,
const std::string &  status 
)

Constructor.

Writes the arguments to the internal storage and takes a timestamp. The notification flags are initialized as false.

Parameters:
pvname Name of the PV triggering the alarm
severity The Alarm Server severity string
status The Alarm Server status string
bool AlarmNotifications::final::getDesktopNotificationSent (  )  const

Query desktop notification flag.

Flag to show if a desktop notification has already been sent out to avoid double messaging.

Returns:
True if desktop notification has already been sent.
bool AlarmNotifications::final::getEmailNotificationSent (  )  const

Query e-mail notification flag.

Flag to show if an e-mail notification has already been sent out to avoid double messaging.

Returns:
True if e-mail notification has already been sent.
const std::string& AlarmNotifications::final::getPVName (  )  const

Query PV name.

The name of the PV that triggerd the alarm.

Returns:
Read-only reference to standard string
const std::string& AlarmNotifications::final::getSeverity (  )  const

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.

Returns:
Read-only reference to standard string
const std::string& AlarmNotifications::final::getStatus (  )  const

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.

Returns:
Read-only reference to standard string
time_t AlarmNotifications::final::getTriggerTime (  )  const

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.

Returns:
POSIX time value
AlarmStatusEntry& AlarmNotifications::final::operator= ( AlarmStatusEntry &&  other  ) 

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.

Parameters:
other Another instance of AlarmStatusEntry
Returns:
Reference to this instance
AlarmStatusEntry& AlarmNotifications::final::operator= ( const AlarmStatusEntry &  other  ) 

Copy assignment.

Overwrites the data of this instance with data copied from the other instance.

Parameters:
other Another instance of AlarmStatusEntry
Returns:
Reference to this instance
bool AlarmNotifications::final::operator== ( const AlarmStatusEntry &  other  ) 

Equality operator.

Checks if all parameters within two instances are equal,

Parameters:
other Another instance of AlarmStatusEntry
Returns:
Boolean to indicate equality
void AlarmNotifications::final::setDesktopNotificationSent ( const bool  desktopNotificationSent  ) 

Change desktop notification flag.

Flag to show if a desktop notification has already been sent out to avoid double messaging.

Parameters:
desktopNotificationSent Set to true of notification has been sent
Returns:
Nothing
void AlarmNotifications::final::setEmailNotificationSent ( const bool  emailNotificationSent  ) 

Change e-mail notification flag.

Flag to show if an e-mail notification has already been sent out to avoid double messaging.

Parameters:
emailNotificationSent Set to true of notification has been sent
Returns:
Nothing
void AlarmNotifications::final::setSeverity ( const std::string &  severity  ) 

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.

Parameters:
severity The new severity string
Returns:
Nothing
void AlarmNotifications::final::setStatus ( const std::string &  status  ) 

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.

Parameters:
status The new status string
Returns:
Nothing
void AlarmNotifications::final::setTriggerTime ( const time_t  triggertime  ) 

Change the trigger time_t.

Changes the timestamp of the message reception. Should only be used when there is a really good reason for.

Parameters:
triggertime POSIX time value
Returns:
Nothing
void AlarmNotifications::final::update ( const AlarmStatusEntry &  newdata  ) 

Update severity and status data.

The severity and status values are copied from the other instance of AlarmStatusEntry, all other values are left untouched.

Parameters:
newdata Another instance of AlarmStatusEntry
Returns:
Nothing

Member Data Documentation

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.

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.

std::string AlarmNotifications::final::_pvname [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.

std::string AlarmNotifications::final::_severity [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.

std::string AlarmNotifications::final::_status [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.

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 2 Dec 2014 for AlarmNotifications by  doxygen 1.6.1