Convenience Class for NTHistogram.
More...
#include "nthistogram.h"
Convenience Class for NTHistogram.
- Author
- dgh
Definition at line 128 of file nthistogram.h.
epics::nt::NTHistogram::~NTHistogram |
( |
| ) |
|
|
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 181 of file nthistogram.cpp.
185 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 172 of file nthistogram.cpp.
176 return pvTimeStamp.
attach(ts);
std::tr1::shared_ptr< PVStructure > PVStructurePtr
epics::pvData::PVStructurePtr getTimeStamp() const
bool attach(PVFieldPtr const &pvField)
Creates an NTHistogram builder instance.
- Returns
- builder instance.
Definition at line 167 of file nthistogram.cpp.
std::tr1::shared_ptr< detail::NTHistogramBuilder > NTHistogramBuilderPtr
Returns the alarm field.
- Returns
- the alarm field or null if no such field.
Definition at line 205 of file nthistogram.cpp.
207 return pvNTHistogram->getSubField<
PVStructure>(
"alarm");
Data interface for a structure,.
PVStringPtr epics::nt::NTHistogram::getDescriptor |
( |
| ) |
const |
Returns the descriptor field.
- Returns
- the descriptor field or null if no such field.
Definition at line 195 of file nthistogram.cpp.
197 return pvNTHistogram->getSubField<
PVString>(
"descriptor");
PVString is special case, since it implements SerializableArray.
Get the PVStructure wrapped by this instance.
- Returns
- the PVStructure wrapped by this instance.
Definition at line 190 of file nthistogram.cpp.
192 return pvNTHistogram;
Returns the ranges field.
- Returns
- the ranges field.
Definition at line 210 of file nthistogram.cpp.
template class for all extensions of PVArray.
Returns the timeStamp field.
- Returns
- the timStamp field or null if no such field.
Definition at line 200 of file nthistogram.cpp.
202 return pvNTHistogram->getSubField<
PVStructure>(
"timeStamp");
Data interface for a structure,.
Returns the value field.
- Returns
- the value field.
Definition at line 215 of file nthistogram.cpp.
template<typename PVT >
std::tr1::shared_ptr<PVT> epics::nt::NTHistogram::getValue |
( |
| ) |
const |
|
inline |
Returns the value field of a specified type (e.g. PVIntArray).
- Template Parameters
-
PVT | the expected type of the value field which should be be PVShortArray, PVIntArray pr PVLongArray. |
- Returns
- the value field or null if it is not of the expected type.
Definition at line 290 of file nthistogram.h.
shared_ptr< T > dynamic_pointer_cast(shared_ptr< U > const &r) BOOST_NOEXCEPT
Returns whether the specified Structure reports to be a compatible NTHistogram.
Checks whether the specified Structure reports compatibility with this version of NTHistogram 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 NTHistogram
Definition at line 128 of file nthistogram.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 NTHistogram.
Checks whether the specified PVStructure reports compatibility with this version of NTHistogram 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 NTHistogram
Definition at line 133 of file nthistogram.cpp.
135 return is_a(pvStructure->getStructure());
static bool is_a(epics::pvData::StructureConstPtr const &structure)
Returns whether the specified Structure is compatible with NTHistogram.
Checks whether the specified Structure is compatible with this version of NTHistogram through the introspection interface.
- Parameters
-
structure | the Structure to test |
- Returns
- (false,true) if the specified Structure (is not, is) a compatible NTHistogram
Definition at line 138 of file nthistogram.cpp.
147 .has<ScalarArray>(
"ranges")
149 .maybeHas<Scalar>(
"descriptor")
151 .maybeHas<&NTField::isTimeStamp, Structure>(
"timeStamp")
This class implements introspection object for a structure.
bool isAlarm(epics::pvData::FieldConstPtr const &field)
This class implements introspection object for scalar array.
Returns whether the specified PVStructure is compatible with NTHistogram.
Checks whether the specified PVStructure is compatible with this version of NTHistogram through the introspection interface.
- Parameters
-
pvStructure | the PVStructure to test |
- Returns
- (false,true) if the specified PVStructure (is not, is) a compatible NTHistogram
Definition at line 155 of file nthistogram.cpp.
157 if(!pvStructure.get())
return false;
static bool isCompatible(epics::pvData::StructureConstPtr const &structure)
bool epics::nt::NTHistogram::isValid |
( |
| ) |
|
Returns whether the wrapped structure is valid with respect to this version of NTHistogram.
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 NTHistogram
Definition at line 162 of file nthistogram.cpp.
epics::pvData::PVScalarArrayPtr getValue() const
epics::pvData::PVDoubleArrayPtr getRanges() const
epics::nt::NTHistogram::POINTER_DEFINITIONS |
( |
NTHistogram |
| ) |
|
Creates an NTHistogram wrapping the specified PVStructure if the latter is compatible.
Checks the supplied PVStructure is compatible with NTHistogram and if so returns an NTHistogram 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
- NTHistogram instance wrapping pvStructure on success, null otherwise
Definition at line 117 of file nthistogram.cpp.
static bool isCompatible(epics::pvData::StructureConstPtr const &structure)
static shared_pointer wrapUnsafe(epics::pvData::PVStructurePtr const &pvStructure)
Creates an NTHistogram wrapping the specified PVStructure, regardless of the latter's compatibility.
No checks are made as to whether the specified PVStructure is compatible with NTHistogram or is non-null.
- Parameters
-
pvStructure | the PVStructure to be wrapped. |
- Returns
- NTHistogram instance wrapping pvStructure.
Definition at line 123 of file nthistogram.cpp.
125 return shared_pointer(
new NTHistogram(pvStructure));
const std::string epics::nt::NTHistogram::URI |
|
static |
The documentation for this class was generated from the following files: