areaDetector
3-14
EPICS areaDetector framework
|
Attribute that gets its value from an EPICS PV. More...
#include <PVAttribute.h>
Public Member Functions | |
PVAttribute (const char *pName, const char *pDescription, const char *pSource, chtype dbrType) | |
Constructor for an EPICS PV attribute. More... | |
PVAttribute (PVAttribute &attribute) | |
Copy constructor for an EPICS PV attribute. More... | |
~PVAttribute () | |
PVAttribute * | copy (NDAttribute *pAttribute) |
Copies properties from this to pOut. More... | |
virtual int | updateValue () |
Updates the current value of this attribute. More... | |
void | connectCallback (struct connection_handler_args cha) |
Connection callback called whenever an EPICS PV connects or disconnects. More... | |
void | monitorCallback (struct event_handler_args cha) |
Monitor callback called whenever an EPICS PV changes value. More... | |
int | report (FILE *fp, int details) |
Reports on the properties of the PVAttribute object; calls base class NDAttribute::report() to report on the parameter value. More... | |
Public Member Functions inherited from NDAttribute | |
NDAttribute (const char *pName, const char *pDescription, NDAttrSource_t sourceType, const char *pSource, NDAttrDataType_t dataType, void *pValue) | |
NDAttribute constructor. More... | |
NDAttribute (NDAttribute &attribute) | |
NDAttribute copy constructor. More... | |
virtual | ~NDAttribute () |
NDAttribute destructor. More... | |
virtual const char * | getName () |
Returns the name of this attribute. More... | |
virtual const char * | getDescription () |
Returns the description of this attribute. More... | |
virtual const char * | getSource () |
Returns the source string of this attribute. More... | |
virtual const char * | getSourceInfo (NDAttrSource_t *pSourceType) |
Returns the source information of this attribute. More... | |
virtual NDAttrDataType_t | getDataType () |
Returns the data type of this attribute. More... | |
virtual int | getValueInfo (NDAttrDataType_t *pDataType, size_t *pDataSize) |
Returns the data type and size of this attribute. More... | |
virtual int | getValue (NDAttrDataType_t dataType, void *pValue, size_t dataSize=0) |
Returns the value of this attribute. More... | |
virtual int | getValue (std::string &value) |
Returns the value of an NDAttrString attribute as an std::string. More... | |
virtual int | setDataType (NDAttrDataType_t dataType) |
Sets the data type of this attribute. More... | |
virtual int | setValue (const void *pValue) |
Sets the value for this attribute. More... | |
virtual int | setValue (const std::string &) |
Sets the value for this attribute. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from NDAttribute | |
static const char * | attrSourceString (NDAttrSource_t type) |
Attribute that gets its value from an EPICS PV.
PVAttribute::PVAttribute | ( | const char * | pName, |
const char * | pDescription, | ||
const char * | pSource, | ||
chtype | dbrType | ||
) |
Constructor for an EPICS PV attribute.
[in] | pName | The name of the attribute to be created; case-insensitive. |
[in] | pDescription | The description of the attribute. |
[in] | pSource | The name of the EPICS PV to be used to obtain the attribute value. |
[in] | dbrType | The EPICS DBR_XXX type to be used (DBR_STRING, DBR_DOUBLE, etc). In addition to the normal DBR types a special type, DBR_NATIVE, may be used, which means to use the native data type returned by Channel Access for this PV. |
PVAttribute::PVAttribute | ( | PVAttribute & | attribute | ) |
Copy constructor for an EPICS PV attribute.
[in] | attribute | The PVAttribute to copy from. NOTE: The copy is not "functional", i.e. it does not update when the PV changes, the value is frozen. |
PVAttribute::~PVAttribute | ( | ) |
void PVAttribute::connectCallback | ( | struct connection_handler_args | cha | ) |
Connection callback called whenever an EPICS PV connects or disconnects.
If it is a connection event it calls ca_add_masked_array_event to request callbacks whenever the value changes.
[in] | cha | Connection handler argument structure passed by channel access. |
|
virtual |
Copies properties from this to pOut.
[in] | pOut | A pointer to the output attribute If NULL the output attribute will be created using the copy constructor Only the value is copied, all other fields are assumed to already be the same in pOut |
Reimplemented from NDAttribute.
void PVAttribute::monitorCallback | ( | struct event_handler_args | eha | ) |
Monitor callback called whenever an EPICS PV changes value.
Calls NDAttribute::setValue to store the new value.
[in] | eha | Event handler argument structure passed by channel access. |
|
virtual |
Reports on the properties of the PVAttribute object; calls base class NDAttribute::report() to report on the parameter value.
[in] | fp | File pointer for the report output. |
[in] | details | Level of report details desired; currently does nothing in this derived class. |
Reimplemented from NDAttribute.
|
virtual |
Updates the current value of this attribute.
The base class does nothing, but derived classes may fetch the current value of the attribute, for example from an EPICS PV or driver parameter library.
Reimplemented from NDAttribute.