This is Unofficial EPICS BASE Doxygen Site
epics::pvData::Alarm Class Reference

Methods for manipulating alarm. More...

#include "alarm.h"

Public Member Functions

 Alarm ()
 
std::string getMessage () const
 
void setMessage (std::string const &value)
 
AlarmSeverity getSeverity () const
 
void setSeverity (AlarmSeverity value)
 
AlarmStatus getStatus () const
 
void setStatus (AlarmStatus value)
 

Detailed Description

Methods for manipulating alarm.

An alarm structure has the following fields:

int severity
int status
string message

This is a class that holds values corresponding to the fields in an alarm structure. It is meant to be used together with pvAlarm which allows values to be copied between an alarm structure and this class. This class should not be extended.

Definition at line 105 of file alarm.h.

Constructor & Destructor Documentation

epics::pvData::Alarm::Alarm ( )
inline

Constructor

Definition at line 110 of file alarm.h.

110 : severity(0),status(0), message(std::string("")) {}
pvd::Status status

Member Function Documentation

std::string epics::pvData::Alarm::getMessage ( ) const
inline

get the current message.

Returns
The message.

Definition at line 116 of file alarm.h.

116 {return message;}
AlarmSeverity epics::pvData::Alarm::getSeverity ( ) const

get the current severity.

Returns
The severity.

Definition at line 58 of file alarm.cpp.

59 {
60  switch(severity) {
61  case 0: return noAlarm;
62  case 1: return minorAlarm;
63  case 2: return majorAlarm;
64  case 3: return invalidAlarm;
65  case 4: return undefinedAlarm;
66  }
67  throw std::logic_error(string("should never get here"));
68 }
AlarmStatus epics::pvData::Alarm::getStatus ( ) const

get the current status.

Returns
The status.

Definition at line 109 of file alarm.cpp.

110 {
111  switch(status) {
112  case 0: return noStatus;
113  case 1: return deviceStatus;
114  case 2: return driverStatus;
115  case 3: return recordStatus;
116  case 4: return dbStatus;
117  case 5: return confStatus;
118  case 6: return undefinedStatus;
119  case 7: return clientStatus;
120  }
121  throw std::logic_error(string("should never get here"));
122 }
pvd::Status status
void epics::pvData::Alarm::setMessage ( std::string const &  value)
inline

set the current message.

Parameters
valueThe new message value.

Definition at line 121 of file alarm.h.

121 {message = value;}
Definition: link.h:174
void epics::pvData::Alarm::setSeverity ( AlarmSeverity  value)
inline

set the current severity.

Parameters
valueThe new severity.
Exceptions
ifseverity value is out of range.

Definition at line 132 of file alarm.h.

132 {severity = value;}
Definition: link.h:174
void epics::pvData::Alarm::setStatus ( AlarmStatus  value)
inline

set the current status.

Parameters
valueThe new status.
Exceptions
ifstatus value is out of range.

Definition at line 143 of file alarm.h.

143 { status = value;}
Definition: link.h:174
pvd::Status status

The documentation for this class was generated from the following files: