Convenience Class for NTUnion.
More...
#include "ntunion.h"
Convenience Class for NTUnion.
- Author
- dgh
Definition at line 126 of file ntunion.h.
epics::nt::NTUnion::~NTUnion |
( |
| ) |
|
|
inline |
Attaches a PVAlarm to the wrapped PVStructure. Does nothing if no alarm field.
- Parameters
-
pvAlarm | the 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 173 of file ntunion.cpp.
177 return pvAlarm.
attach(al);
bool attach(PVFieldPtr const &pvField)
epics::pvData::PVStructurePtr getAlarm() const
std::tr1::shared_ptr< PVStructure > PVStructurePtr
Attaches a PVTimeStamp to the wrapped PVStructure. Does nothing if no timeStamp field.
- Parameters
-
pvTimeStamp | the 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 164 of file ntunion.cpp.
168 return pvTimeStamp.
attach(ts);
std::tr1::shared_ptr< PVStructure > PVStructurePtr
epics::pvData::PVStructurePtr getTimeStamp() const
bool attach(PVFieldPtr const &pvField)
Creates an NTUnion builder instance.
- Returns
- builder instance.
Definition at line 159 of file ntunion.cpp.
std::tr1::shared_ptr< detail::NTUnionBuilder > NTUnionBuilderPtr
Returns the alarm field.
- Returns
- the alarm field or null if no alarm field.
Definition at line 197 of file ntunion.cpp.
199 return pvNTUnion->getSubField<
PVStructure>(
"alarm");
Data interface for a structure,.
PVStringPtr epics::nt::NTUnion::getDescriptor |
( |
| ) |
const |
Returns the descriptor field.
- Returns
- the descriptor field or null if no descriptor field.
Definition at line 187 of file ntunion.cpp.
189 return pvNTUnion->getSubField<
PVString>(
"descriptor");
PVString is special case, since it implements SerializableArray.
Returns the PVStructure wrapped by this instance.
- Returns
- the PVStructure wrapped by this instance.
Definition at line 182 of file ntunion.cpp.
Returns the timeStamp field.
- Returns
- the timStamp field or null if no timeStamp field.
Definition at line 192 of file ntunion.cpp.
194 return pvNTUnion->getSubField<
PVStructure>(
"timeStamp");
Data interface for a structure,.
Returns the value field.
- Returns
- the value field.
Definition at line 202 of file ntunion.cpp.
Returns whether the specified Structure reports to be a compatible NTUnion.
Checks if the specified Structure reports compatibility with this version of NTUnion 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
-
structure | the Structure to test |
- Returns
- (false,true) if the specified Structure (is not, is) a compatible NTUnion
Definition at line 121 of file ntunion.cpp.
static const std::string URI
static bool is_a(const std::string &u1, const std::string &u2)
Returns whether the specified PVStructure reports to be a compatible NTUnion.
Checks if the specified PVStructure reports compatibility with this version of NTUnion 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
-
pvStructure | the PVStructure to test |
- Returns
- (false,true) if the specified PVStructure (is not, is) a compatible NTUnion
Definition at line 126 of file ntunion.cpp.
128 return is_a(pvStructure->getStructure());
static bool is_a(epics::pvData::StructureConstPtr const &structure)
Returns whether the specified Structure is compatible with NTUnion.
Checks if the specified Structure is compatible with this version of NTUnion through the introspection interface.
- Parameters
-
structure | the Structure to test |
- Returns
- (false,true) if the specified Structure (is not, is) a compatible NTUnion
Definition at line 131 of file ntunion.cpp.
141 .maybeHas<
Scalar>(
"descriptor")
142 .maybeHas<&NTField::isAlarm, Structure>(
"alarm")
This class implements introspection object for Scalar.
This class implements introspection object for a structure.
bool isTimeStamp(epics::pvData::FieldConstPtr const &field)
Returns whether the specified PVStructure is compatible with NTUnion.
Checks if the specified PVStructure is compatible with this version of NTUnion through the introspection interface
- Parameters
-
pvStructure | the PVStructure to test |
- Returns
- (false,true) if the specified PVStructure (is not, is) a compatible NTUnion
Definition at line 147 of file ntunion.cpp.
149 if(!pvStructure)
return false;
static bool isCompatible(epics::pvData::StructureConstPtr const &structure)
bool epics::nt::NTUnion::isValid |
( |
| ) |
|
Returns whether the wrapped PVStructure is a valid NTUnion.
Unlike isCompatible(), isValid() may perform checks on the value data as well as the introspection data.
- Returns
- (false,true) if wrapped PVStructure (is not, is) a valid NTUnion
Definition at line 154 of file ntunion.cpp.
epics::nt::NTUnion::POINTER_DEFINITIONS |
( |
NTUnion |
| ) |
|
Creates an NTUnion wrapping the specified PVStructure if the latter is compatible.
Checks the supplied PVStructure is compatible with NTUnion and if so returns an NTUnion which wraps it. This method will return null if the structure is is not compatible or is null.
- Parameters
-
pvStructure | the PVStructure to be wrapped |
- Returns
- NTUnion instance wrapping pvStructure on success, null otherwise
Definition at line 110 of file ntunion.cpp.
static shared_pointer wrapUnsafe(epics::pvData::PVStructurePtr const &pvStructure)
static bool isCompatible(epics::pvData::StructureConstPtr const &structure)
Creates an NTUnion wrapping the specified PVStructure, regardless of the latter's compatibility.
No checks are made as to whether the specified PVStructure is compatible with NTUnion or is non-null.
- Parameters
-
pvStructure | the PVStructure to be wrapped |
- Returns
- NTUnion instance wrapping pvStructure
Definition at line 116 of file ntunion.cpp.
118 return shared_pointer(
new NTUnion(pvStructure));
const std::string epics::nt::NTUnion::URI |
|
static |
The documentation for this class was generated from the following files: