normativeTypesCPP
Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
epics::nt::NTNDArrayAttribute Class Reference

Convenience Class for NTNDArrayAttribute. More...

#include <ntndarrayAttribute.h>

Public Member Functions

 POINTER_DEFINITIONS (NTNDArrayAttribute)
 
bool isValid ()
 
 ~NTNDArrayAttribute ()
 
bool attachTimeStamp (epics::pvData::PVTimeStamp &pvTimeStamp) const
 
bool attachAlarm (epics::pvData::PVAlarm &pvAlarm) const
 
epics::pvData::PVStructurePtr getPVStructure () const
 
epics::pvData::PVStringPtr getDescriptor () const
 
epics::pvData::PVStructurePtr getTimeStamp () const
 
epics::pvData::PVStructurePtr getAlarm () const
 
epics::pvData::PVStringPtr getName () const
 
epics::pvData::PVUnionPtr getValue () const
 
epics::pvData::PVStringArrayPtr getTags () const
 
epics::pvData::PVIntPtr getSourceType () const
 
epics::pvData::PVStringPtr getSource () const
 

Static Public Member Functions

static shared_pointer wrap (epics::pvData::PVStructurePtr const &pvStructure)
 
static shared_pointer wrapUnsafe (epics::pvData::PVStructurePtr const &pvStructure)
 
static bool is_a (epics::pvData::StructureConstPtr const &structure)
 
static bool is_a (epics::pvData::PVStructurePtr const &pvStructure)
 
static bool isCompatible (epics::pvData::StructureConstPtr const &structure)
 
static bool isCompatible (epics::pvData::PVStructurePtr const &pvStructure)
 
static NTNDArrayAttributeBuilderPtr createBuilder ()
 

Static Public Attributes

static const std::string URI
 

Friends

class detail::NTNDArrayAttributeBuilder
 
class NTNDArray
 

Detailed Description

Convenience Class for NTNDArrayAttribute.

Author
dgh

Definition at line 125 of file ntndarrayAttribute.h.

Constructor & Destructor Documentation

◆ ~NTNDArrayAttribute()

epics::nt::NTNDArrayAttribute::~NTNDArrayAttribute ( )
inline

Destructor.

Definition at line 232 of file ntndarrayAttribute.h.

Member Function Documentation

◆ attachAlarm()

bool epics::nt::NTNDArrayAttribute::attachAlarm ( epics::pvData::PVAlarm &  pvAlarm) const

Attaches a PVAlarm to the wrapped PVStructure. Does nothing if no alarm field.

Parameters
pvAlarmthe PVAlarm that will be attached.
Returns
true if the operation was successfull (i.e. this instance has an alarm field), otherwise false.

Definition at line 184 of file ntndarrayAttribute.cpp.

◆ attachTimeStamp()

bool epics::nt::NTNDArrayAttribute::attachTimeStamp ( epics::pvData::PVTimeStamp &  pvTimeStamp) const

Attaches a PVTimeStamp to the wrapped PVStructure. Does nothing if no timeStamp field.

Parameters
pvTimeStampthe PVTimeStamp that will be attached.
Returns
true if the operation was successfull (i.e. this instance has a timeStamp field), otherwise false.

Definition at line 175 of file ntndarrayAttribute.cpp.

◆ createBuilder()

NTNDArrayAttributeBuilderPtr epics::nt::NTNDArrayAttribute::createBuilder ( )
static

Creates an NTNDArrayAttribute builder instance.

Returns
builder instance.

Definition at line 170 of file ntndarrayAttribute.cpp.

◆ getAlarm()

PVStructurePtr epics::nt::NTNDArrayAttribute::getAlarm ( ) const

Returns the alarm field.

Returns
the alarm field or null if no alarm field.

Definition at line 208 of file ntndarrayAttribute.cpp.

◆ getDescriptor()

PVStringPtr epics::nt::NTNDArrayAttribute::getDescriptor ( ) const

Returns the descriptor field.

Returns
the descriptor field.

Definition at line 198 of file ntndarrayAttribute.cpp.

◆ getName()

PVStringPtr epics::nt::NTNDArrayAttribute::getName ( ) const

Returns the name field.

Returns
the name field.

Definition at line 214 of file ntndarrayAttribute.cpp.

◆ getPVStructure()

PVStructurePtr epics::nt::NTNDArrayAttribute::getPVStructure ( ) const

Returns the PVStructure wrapped by this instance.

Returns
the PVStructure wrapped by this instance.

Definition at line 193 of file ntndarrayAttribute.cpp.

◆ getSource()

PVStringPtr epics::nt::NTNDArrayAttribute::getSource ( ) const

Returns the source field.

Returns
the source field.

Definition at line 234 of file ntndarrayAttribute.cpp.

◆ getSourceType()

PVIntPtr epics::nt::NTNDArrayAttribute::getSourceType ( ) const

Returns the sourceType field.

Returns
the sourceType field.

Definition at line 229 of file ntndarrayAttribute.cpp.

◆ getTags()

PVStringArrayPtr epics::nt::NTNDArrayAttribute::getTags ( ) const

Returns the tags field.

Returns
the tags field or null if no such field.

Definition at line 224 of file ntndarrayAttribute.cpp.

◆ getTimeStamp()

PVStructurePtr epics::nt::NTNDArrayAttribute::getTimeStamp ( ) const

Returns the timeStamp field.

Returns
the timStamp field or null if no such field.

Definition at line 203 of file ntndarrayAttribute.cpp.

◆ getValue()

PVUnionPtr epics::nt::NTNDArrayAttribute::getValue ( ) const

Returns the value field.

Returns
the value field.

Definition at line 219 of file ntndarrayAttribute.cpp.

◆ is_a() [1/2]

static bool epics::nt::NTNDArrayAttribute::is_a ( epics::pvData::StructureConstPtr const &  structure)
static

Returns whether the specified Structure reports to be a compatible NTAttribute.

Checks if the specified Structure reports compatibility with this version of NTAttribute through its type ID, including checking version numbers. The return value does not depend on whether the structure is actually compatible in terms of its introspection type.

Parameters
structurethe Structure to test
Returns
(false,true) if the specified Structure (is not, is) a compatible NTAttribute

◆ is_a() [2/2]

static bool epics::nt::NTNDArrayAttribute::is_a ( epics::pvData::PVStructurePtr const &  pvStructure)
static

Returns whether the specified PVStructure reports to be a compatible NTAttribute.

Checks if the specified PVStructure reports compatibility with this version of NTAttribute through its type ID, including checking version numbers. The return value does not depend on whether the structure is actually compatible in terms of its introspection type.

Parameters
pvStructurethe PVStructure to test
Returns
(false,true) if the specified PVStructure (is not, is) a compatible NTAttribute

◆ isCompatible() [1/2]

static bool epics::nt::NTNDArrayAttribute::isCompatible ( epics::pvData::StructureConstPtr const &  structure)
static

Returns whether the specified Structure is compatible with NTAttribute extended as required by NTNDArray.

Checks if the specified Structure is compatible with this version of NTAttribute extended as required by this version of NTNDArray through the introspection interface.

Parameters
structurethe Structure to test
Returns
(false,true) if the specified Structure (is not, is) a compatible NTAttribute

◆ isCompatible() [2/2]

static bool epics::nt::NTNDArrayAttribute::isCompatible ( epics::pvData::PVStructurePtr const &  pvStructure)
static

Returns whether the specified PVStructure is compatible with NTAttribute extended as required by NTNDArray.

Checks if the specified PVStructure is compatible with this version of NTAttribute extended as required by this version of NTNDArray through the introspection interface.

Parameters
pvStructurethe PVStructure to test
Returns
(false,true) if the specified PVStructure (is not, is) a compatible NTAttribute

◆ isValid()

bool epics::nt::NTNDArrayAttribute::isValid ( )

Returns whether the wrapped PVStructure is valid with respect to this version of NTAttribute extended as per this version of NTNDArray.

Unlike isCompatible(), isValid() may perform checks on the value data as well as the introspection data.

Returns
(false,true) if the wrapped PVStructure (is not, is) a valid NTNDArrayAttribute

Definition at line 165 of file ntndarrayAttribute.cpp.

◆ POINTER_DEFINITIONS()

epics::nt::NTNDArrayAttribute::POINTER_DEFINITIONS ( NTNDArrayAttribute  )

◆ wrap()

NTNDArrayAttribute::shared_pointer epics::nt::NTNDArrayAttribute::wrap ( epics::pvData::PVStructurePtr const &  pvStructure)
static

Creates an NTNDArrayAttribute wrapping the specified PVStructure if the latter is compatible.

Checks the supplied PVStructure is compatible with NTAttribute extended as required by NTNDArray and if so returns an NTNDArrayAttribute which wraps it. This method will return null if the structure is is not compatible or is null.

Parameters
pvStructurethe PVStructure to be wrapped
Returns
NTAttribute instance wrapping pvStructure on success, null otherwise

Definition at line 116 of file ntndarrayAttribute.cpp.

◆ wrapUnsafe()

NTNDArrayAttribute::shared_pointer epics::nt::NTNDArrayAttribute::wrapUnsafe ( epics::pvData::PVStructurePtr const &  pvStructure)
static

Creates an NTNDArrayAttribute wrapping the specified PVStructure, regardless of the latter's compatibility.

No checks are made as to whether the specified PVStructure is compatible with NTAttribute extended as required by NTNDArray or is non-null.

Parameters
pvStructurethe PVStructure to be wrapped
Returns
NTAttribute instance wrapping pvStructure

Definition at line 122 of file ntndarrayAttribute.cpp.

References epics::nt::Result::has(), epics::nt::Result::is(), and epics::nt::Result::maybeHas().

Friends And Related Function Documentation

◆ detail::NTNDArrayAttributeBuilder

friend class detail::NTNDArrayAttributeBuilder
friend

Definition at line 311 of file ntndarrayAttribute.h.

◆ NTNDArray

friend class NTNDArray
friend

Definition at line 312 of file ntndarrayAttribute.h.

Member Data Documentation

◆ URI

const std::string epics::nt::NTNDArrayAttribute::URI
static

Definition at line 130 of file ntndarrayAttribute.h.


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