areaDetector  3-5-0
EPICS areaDetector framework
Public Member Functions | List of all members
functAttribute Class Reference

Attribute that gets its value from a user-defined function The updateValue() method for this class retrieves the current value from the function. More...

#include <functAttribute.h>

Inheritance diagram for functAttribute:
NDAttribute

Public Member Functions

 functAttribute (const char *pName, const char *pDescription, const char *pSource, const char *pParam)
 Constructor for function attribute. More...
 
 functAttribute (functAttribute &attribute)
 Copy constructor for function attribute. More...
 
 ~functAttribute ()
 Destructor for driver/plugin attribute. More...
 
functAttributecopy (NDAttribute *pAttribute)
 Copies properties from this to pOut. More...
 
virtual int updateValue ()
 Updates the current value of this attribute; sets the attribute value to the return value of the specified function. More...
 
int report (FILE *fp, int details)
 Reports on the properties of the functAttribute 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)
 

Detailed Description

Attribute that gets its value from a user-defined function The updateValue() method for this class retrieves the current value from the function.

Constructor & Destructor Documentation

◆ functAttribute() [1/2]

functAttribute::functAttribute ( const char *  pName,
const char *  pDescription,
const char *  pSource,
const char *  pParam 
)

Constructor for function attribute.

Parameters
[in]pNameThe name of the attribute to be created; case-insensitive.
[in]pDescriptionThe description of the attribute.
[in]pSourceThe symbol name for the function to be called to get the value of the parameter.
[in]pParamA string that will be passed to the function, typically to specify what/how to get the value.

◆ functAttribute() [2/2]

functAttribute::functAttribute ( functAttribute attribute)

Copy constructor for function attribute.

Parameters
[in]attributeThe functAttribute to copy from.

◆ ~functAttribute()

functAttribute::~functAttribute ( )

Destructor for driver/plugin attribute.

Member Function Documentation

◆ copy()

functAttribute * functAttribute::copy ( NDAttribute pOut)
virtual

Copies properties from this to pOut.

Parameters
[in]pOutA 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
Returns
Returns a pointer to the copy

Reimplemented from NDAttribute.

◆ report()

int functAttribute::report ( FILE *  fp,
int  details 
)
virtual

Reports on the properties of the functAttribute object; calls base class NDAttribute::report() to report on the parameter value.

Parameters
[in]fpFile pointer for the report output.
[in]detailsLevel of report details desired; currently does nothing in this derived class.

Reimplemented from NDAttribute.

◆ updateValue()

int functAttribute::updateValue ( )
virtual

Updates the current value of this attribute; sets the attribute value to the return value of the specified function.

Reimplemented from NDAttribute.


The documentation for this class was generated from the following files: