NDAttribute class; an attribute has a name, description, source type, source string, data type, and value.
More...
#include <NDAttribute.h>
NDAttribute class; an attribute has a name, description, source type, source string, data type, and value.
◆ NDAttribute() [1/2]
NDAttribute::NDAttribute |
( |
const char * |
pName, |
|
|
const char * |
pDescription, |
|
|
NDAttrSource_t |
sourceType, |
|
|
const char * |
pSource, |
|
|
NDAttrDataType_t |
dataType, |
|
|
void * |
pValue |
|
) |
| |
NDAttribute constructor.
- Parameters
-
[in] | pName | The name of the attribute to be created. |
[in] | sourceType | The source type of the attribute (NDAttrSource_t). |
[in] | pSource | The source string for the attribute. |
[in] | pDescription | The description of the attribute. |
[in] | dataType | The data type of the attribute (NDAttrDataType_t). |
[in] | pValue | A pointer to the value for this attribute. |
◆ NDAttribute() [2/2]
NDAttribute copy constructor.
- Parameters
-
[in] | attribute | The attribute to copy from |
◆ ~NDAttribute()
NDAttribute::~NDAttribute |
( |
| ) |
|
|
virtual |
◆ attrSourceString()
◆ copy()
Copies properties from this to pOut.
- Parameters
-
[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 |
- Returns
- Returns a pointer to the copy
Reimplemented in PVAttribute, paramAttribute, and functAttribute.
◆ getDataType()
Returns the data type of this attribute.
◆ getDescription()
const char * NDAttribute::getDescription |
( |
| ) |
|
|
virtual |
Returns the description of this attribute.
◆ getName()
const char * NDAttribute::getName |
( |
| ) |
|
|
virtual |
Returns the name of this attribute.
◆ getSource()
const char * NDAttribute::getSource |
( |
| ) |
|
|
virtual |
Returns the source string of this attribute.
◆ getSourceInfo()
const char * NDAttribute::getSourceInfo |
( |
NDAttrSource_t * |
pSourceType | ) |
|
|
virtual |
Returns the source information of this attribute.
- Parameters
-
[out] | pSourceType | Source type (NDAttrSource_t) of this attribute. |
- Returns
- The source type string of this attribute
◆ getValue() [1/2]
int NDAttribute::getValue |
( |
NDAttrDataType_t |
dataType, |
|
|
void * |
pValue, |
|
|
size_t |
dataSize = 0 |
|
) |
| |
|
virtual |
Returns the value of this attribute.
- Parameters
-
[in] | dataType | Data type for the value. |
[out] | pValue | Pointer to location to return the value. |
[in] | dataSize | Size of the input data location; only used when dataType is NDAttrString. |
Does data type conversions between numeric data types
◆ getValue() [2/2]
int NDAttribute::getValue |
( |
std::string & |
value | ) |
|
|
virtual |
Returns the value of an NDAttrString attribute as an std::string.
- Parameters
-
[out] | value | Location to return the value. |
Does data type conversions between numeric data types
◆ getValueInfo()
Returns the data type and size of this attribute.
- Parameters
-
[out] | pDataType | Pointer to location to return the data type. |
[out] | pSize | Pointer to location to return the data size; this is the data type size for all data types except NDAttrString, in which case it is the length of the string including 0 terminator. |
◆ report()
int NDAttribute::report |
( |
FILE * |
fp, |
|
|
int |
details |
|
) |
| |
|
virtual |
Reports on the properties of the attribute.
- Parameters
-
[in] | fp | File pointer for the report output. |
[in] | details | Level of report details desired; currently does nothing |
Reimplemented in PVAttribute, paramAttribute, and functAttribute.
◆ setDataType()
Sets the data type of this attribute.
This can only be called once.
◆ setValue() [1/2]
int NDAttribute::setValue |
( |
const std::string & |
value | ) |
|
|
virtual |
Sets the value for this attribute.
- Parameters
-
[in] | value | value of this attribute. |
◆ setValue() [2/2]
int NDAttribute::setValue |
( |
const void * |
pValue | ) |
|
|
virtual |
Sets the value for this attribute.
- Parameters
-
[in] | pValue | Pointer to the value. |
◆ updateValue()
int NDAttribute::updateValue |
( |
| ) |
|
|
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 in PVAttribute, paramAttribute, and functAttribute.
◆ NDArray
◆ NDAttributeList
The documentation for this class was generated from the following files:
- /home/runner/work/areaDetector/areaDetector/ADCore/ADApp/ADSrc/NDAttribute.h
- /home/runner/work/areaDetector/areaDetector/ADCore/ADApp/ADSrc/NDAttribute.cpp