Add getName() and getTags() functions to NTAttribute
This commit is contained in:
@@ -188,11 +188,22 @@ PVStructurePtr NTAttribute::getAlarm() const
|
||||
return pvNTAttribute->getSubField<PVStructure>("alarm");
|
||||
}
|
||||
|
||||
|
||||
PVStringPtr NTAttribute::getName() const
|
||||
{
|
||||
return pvNTAttribute->getSubField<PVString>("name");
|
||||
}
|
||||
|
||||
PVUnionPtr NTAttribute::getValue() const
|
||||
{
|
||||
return pvValue;
|
||||
}
|
||||
|
||||
PVStringArrayPtr NTAttribute::getTags() const
|
||||
{
|
||||
return pvNTAttribute->getSubField<PVStringArray>("tags");
|
||||
}
|
||||
|
||||
NTAttribute::NTAttribute(PVStructurePtr const & pvStructure) :
|
||||
pvNTAttribute(pvStructure), pvValue(pvNTAttribute->getSubField<PVUnion>("value"))
|
||||
{
|
||||
|
||||
@@ -210,12 +210,24 @@ public:
|
||||
*/
|
||||
epics::pvData::PVStructurePtr getAlarm() const;
|
||||
|
||||
/**
|
||||
* Get the name field.
|
||||
* @return The PVString for the name.
|
||||
*/
|
||||
epics::pvData::PVStringPtr getName() const;
|
||||
|
||||
/**
|
||||
* Get the value field.
|
||||
* @return The PVUnion for the values.
|
||||
*/
|
||||
epics::pvData::PVUnionPtr getValue() const;
|
||||
|
||||
/**
|
||||
* Get the tags field.
|
||||
* @return The PVStringArray for the tags, which may be null.
|
||||
*/
|
||||
epics::pvData::PVStringArrayPtr getTags() const;
|
||||
|
||||
private:
|
||||
NTAttribute(epics::pvData::PVStructurePtr const & pvStructure);
|
||||
epics::pvData::PVStructurePtr pvNTAttribute;
|
||||
|
||||
Reference in New Issue
Block a user