This is Unofficial EPICS BASE Doxygen Site
pvAlarm.h
Go to the documentation of this file.
1 /* pvAlarm.h */
2 /*
3  * Copyright information and license terms for this software can be
4  * found in the file LICENSE that is included with the distribution
5  */
9 #ifndef PVALARM_H
10 #define PVALARM_H
11 
12 #include <string>
13 
14 #include <pv/pvType.h>
15 #include <pv/alarm.h>
16 #include <pv/pvData.h>
17 
18 #include <shareLib.h>
19 
20 namespace epics { namespace pvData {
21 
38 public:
43  PVAlarm() {}
44  //default constructors and destructor are OK
45  //returns (false,true) if pvField(is not, is) a valid alarm structure
46  //An automatic detach is issued if already attached.
47  /*
48  * Attach to a field of a PVData object.
49  * @param pvField The pvField.
50  * @return (false,true) if the pvField (is not, is) an alarm structure.
51  */
52  /*
53  * Attach to a field of a PVData object.
54  * @param pvField The pvField.
55  * @return (false,true) if the pvField (is not, is) an alarm structure.
56  */
57  bool attach(PVFieldPtr const & pvField);
61  void detach();
66  bool isAttached();
67  // each of the following throws logic_error is not attached to PVField
68  // set returns false if field is immutable
74  void get(Alarm & alarm) const;
81  bool set(Alarm const & alarm);
82 private:
83  PVIntPtr pvSeverity;
84  PVIntPtr pvStatus;
85  PVStringPtr pvMessage;
86  static std::string noAlarmFound;
87  static std::string notAttached;
88 };
89 
90 }}
91 #endif /* PVALARM_H */
std::tr1::shared_ptr< PVInt > PVIntPtr
Definition: pvData.h:507
Methods for manipulating alarm.
Definition: alarm.h:105
TODO only here because of the Lockable.
Definition: ntaggregate.cpp:16
Mark external symbols and entry points for shared libraries.
#define epicsShareClass
Definition: shareLib.h:206
Methods for accessing an alarm structure.
Definition: pvAlarm.h:37
std::tr1::shared_ptr< PVString > PVStringPtr
Definition: pvData.h:540
std::tr1::shared_ptr< PVField > PVFieldPtr
Definition: pvData.h:66