This is Unofficial EPICS BASE Doxygen Site
scalarAlarmSupport.h
Go to the documentation of this file.
1 
10 #ifndef SCALARALARMSUPPORT_H
11 #define SCALARALARMSUPPORT_H
12 
13 
14 #include <pv/pvDatabase.h>
15 #include <pv/pvSupport.h>
16 #include <pv/alarm.h>
17 #include <pv/pvAlarm.h>
18 #include <pv/pvStructureCopy.h>
19 
20 #include <shareLib.h>
21 
22 namespace epics { namespace pvDatabase {
23 
25 typedef std::tr1::shared_ptr<ScalarAlarmSupport> ScalarAlarmSupportPtr;
26 
32  PVSupport
33 {
34 public:
39  virtual ~ScalarAlarmSupport();
48  virtual bool init(
49  epics::pvData::PVFieldPtr const & pvValue,
50  epics::pvData::PVStructurePtr const & pvAlarm,
51  epics::pvData::PVFieldPtr const & pvSupport);
58  virtual bool process();
63  virtual void reset();
70  static ScalarAlarmSupportPtr create(PVRecordPtr const & pvRecord);
76  static epics::pvData::StructureConstPtr scalarAlarmField();
77 private:
78 
79  ScalarAlarmSupport(PVRecordPtr const & pvRecord);
80  enum {
81  range_Lolo = 0,
82  range_Low,
83  range_Normal,
84  range_High,
85  range_Hihi,
86  range_Invalid,
87  range_Undefined
88  } AlarmRange;
89  void setAlarm(
90  epics::pvData::PVStructurePtr const & pvAlarm,
91  int alarmRange);
92  PVRecordPtr pvRecord;
93  int prevAlarmRange;
96  epics::pvData::PVStructurePtr pvScalarAlarm;
98  epics::pvData::PVDoublePtr pvLowAlarmLimit;
99  epics::pvData::PVDoublePtr pvLowWarningLimit;
100  epics::pvData::PVDoublePtr pvHighWarningLimit;
101  epics::pvData::PVDoublePtr pvHighAlarmLimit;
102  epics::pvData::PVDoublePtr pvHysteresis;
103  double requestedValue;
104  double currentValue;
105  bool isHystersis;
106 };
107 
108 }}
109 
110 #endif /* SCALARALARMSUPPORT_H */
std::tr1::shared_ptr< PVBoolean > PVBooleanPtr
Definition: pvData.h:504
TODO only here because of the Lockable.
Definition: ntaggregate.cpp:16
std::tr1::shared_ptr< const Structure > StructureConstPtr
Definition: pvIntrospect.h:162
Mark external symbols and entry points for shared libraries.
#define POINTER_DEFINITIONS(clazz)
Definition: sharedPtr.h:198
Base interface for a PVSupport.
Definition: pvSupport.h:32
#define epicsShareClass
Definition: shareLib.h:206
std::tr1::shared_ptr< PVScalar > PVScalarPtr
Definition: pvData.h:77
std::tr1::shared_ptr< PVRecord > PVRecordPtr
Definition: pvDatabase.h:21
std::tr1::shared_ptr< PVStructure > PVStructurePtr
Definition: pvData.h:87
std::tr1::shared_ptr< ScalarAlarmSupport > ScalarAlarmSupportPtr
std::tr1::shared_ptr< PVField > PVFieldPtr
Definition: pvData.h:66
Base interface for a ScalarAlarmSupport.
std::tr1::shared_ptr< PVDouble > PVDoublePtr
Definition: pvData.h:514