areaDetector  3-5-0
EPICS areaDetector framework
functAttribute.h
Go to the documentation of this file.
1 
2 /* functAttribute.h
3  *
4  * \author Mark Rivers
5  *
6  * \author University of Chicago
7  *
8  * \date October 12, 2013
9  *
10  */
11 #ifndef INCfunctAttributeH
12 #define INCfunctAttributeH
13 
14 #include "NDArray.h"
15 
16 typedef int (*NDAttributeFunction)(const char *functParam, void **functionPvt, class functAttribute *pAttribute);
17 
21 class functAttribute : public NDAttribute {
22 public:
23  functAttribute(const char *pName, const char *pDescription, const char *pSource, const char *pParam);
24  functAttribute(functAttribute& attribute);
26  functAttribute* copy(NDAttribute *pAttribute);
27  virtual int updateValue();
28  int report(FILE *fp, int details);
29 
30 private:
31  char *functParam;
32  NDAttributeFunction pFunction;
33  void *functionPvt;
34 };
35 
36 #endif /*INCfunctAttributeH*/
functAttribute(const char *pName, const char *pDescription, const char *pSource, const char *pParam)
Constructor for function attribute.
Definition: functAttribute.cpp:42
Attribute that gets its value from a user-defined function The updateValue() method for this class re...
Definition: functAttribute.h:21
virtual int updateValue()
Updates the current value of this attribute; sets the attribute value to the return value of the spec...
Definition: functAttribute.cpp:109
int report(FILE *fp, int details)
Reports on the properties of the functAttribute object; calls base class NDAttribute::report() to rep...
Definition: functAttribute.cpp:125
~functAttribute()
Destructor for driver/plugin attribute.
Definition: functAttribute.cpp:87
NDAttribute class; an attribute has a name, description, source type, source string,...
Definition: NDAttribute.h:87
int(* NDAttributeFunction)(const char *functParam, void **functionPvt, class functAttribute *pAttribute)
Definition: functAttribute.h:16
functAttribute * copy(NDAttribute *pAttribute)
Copies properties from this to pOut.
Definition: functAttribute.cpp:92