areaDetector  3-5-0
EPICS areaDetector framework
PVAttribute.h
Go to the documentation of this file.
1 
2 /* PVAttribute.h
3  *
4  * \author Mark Rivers
5  *
6  * \author University of Chicago
7  *
8  * \date April 30, 2009
9  *
10  */
11 #ifndef INCPVAttributeH
12 #define INCPVAttributeH
13 
14 #include <cadef.h>
15 #include <epicsMutex.h>
16 #include <epicsEvent.h>
17 
18 #include "NDArray.h"
19 
21 #define DBR_NATIVE -1
22 
25 class PVAttribute : public NDAttribute {
26 public:
27  PVAttribute(const char *pName, const char *pDescription, const char *pSource, chtype dbrType);
28  PVAttribute(PVAttribute& attribute);
29  ~PVAttribute();
30  PVAttribute* copy(NDAttribute *pAttribute);
31  virtual int updateValue();
32  /* These callbacks must be public because they are called from C */
33  void connectCallback(struct connection_handler_args cha);
34  void monitorCallback(struct event_handler_args cha);
35  int report(FILE *fp, int details);
36 
37 private:
38  chid chanId;
39  evid eventId;
40  chtype dbrType;
41  NDAttrValue callbackValue;
42  char *callbackString;
43  bool connectedOnce;
44  epicsMutexId lock;
45 };
46 
47 #endif /*INCPVAttributeH*/
~PVAttribute()
Definition: PVAttribute.cpp:92
virtual int updateValue()
Updates the current value of this attribute.
Definition: PVAttribute.cpp:180
int report(FILE *fp, int details)
Reports on the properties of the PVAttribute object; calls base class NDAttribute::report() to report...
Definition: PVAttribute.cpp:325
Union defining the values in an NDAttribute object.
Definition: NDAttribute.h:65
Attribute that gets its value from an EPICS PV.
Definition: PVAttribute.h:25
void connectCallback(struct connection_handler_args cha)
Connection callback called whenever an EPICS PV connects or disconnects.
Definition: PVAttribute.cpp:211
NDAttribute class; an attribute has a name, description, source type, source string,...
Definition: NDAttribute.h:87
PVAttribute * copy(NDAttribute *pAttribute)
Copies properties from this to pOut.
Definition: PVAttribute.cpp:99
void monitorCallback(struct event_handler_args cha)
Monitor callback called whenever an EPICS PV changes value.
Definition: PVAttribute.cpp:123
PVAttribute(const char *pName, const char *pDescription, const char *pSource, chtype dbrType)
Constructor for an EPICS PV attribute.
Definition: PVAttribute.cpp:45