6 #ifndef NTSCALARARRAY_H 7 #define NTSCALARARRAY_H 9 #ifdef epicsExportSharedSymbols 10 # define ntscalarArrayEpicsExportSharedSymbols 11 # undef epicsExportSharedSymbols 14 #include <pv/pvDisplay.h> 15 #include <pv/pvControl.h> 17 #ifdef ntscalarArrayEpicsExportSharedSymbols 18 # define epicsExportSharedSymbols 19 # undef ntscalarArrayEpicsExportSharedSymbols 27 namespace epics {
namespace nt {
42 public std::tr1::enable_shared_from_this<NTScalarArrayBuilder>
52 shared_pointer value(epics::pvData::ScalarType elementType);
60 shared_pointer arrayValue(epics::pvData::ScalarType elementType);
66 shared_pointer addDescriptor();
72 shared_pointer addAlarm();
78 shared_pointer addTimeStamp();
84 shared_pointer addDisplay();
90 shared_pointer addControl();
97 epics::pvData::StructureConstPtr createStructure();
104 epics::pvData::PVStructurePtr createPVStructure();
111 NTScalarArrayPtr create();
119 shared_pointer add(std::string
const & name, epics::pvData::FieldConstPtr
const & field);
127 epics::pvData::ScalarType valueType;
136 epics::pvData::StringArray extraFieldNames;
137 epics::pvData::FieldConstPtrArray extraFields;
139 friend class ::epics::nt::NTScalarArray;
158 static const std::string
URI;
171 static shared_pointer wrap(epics::pvData::PVStructurePtr
const & pvStructure);
182 static shared_pointer wrapUnsafe(epics::pvData::PVStructurePtr
const & pvStructure);
195 static bool is_a(epics::pvData::StructureConstPtr
const & structure);
208 static bool is_a(epics::pvData::PVStructurePtr
const & pvStructure);
219 static bool isCompatible(
220 epics::pvData::StructureConstPtr
const &structure);
231 static bool isCompatible(
232 epics::pvData::PVStructurePtr
const &pvStructure);
248 static NTScalarArrayBuilderPtr createBuilder();
261 bool attachTimeStamp(epics::pvData::PVTimeStamp &pvTimeStamp)
const;
269 bool attachAlarm(epics::pvData::PVAlarm &pvAlarm)
const;
277 bool attachDisplay(epics::pvData::PVDisplay &pvDisplay)
const;
285 bool attachControl(epics::pvData::PVControl &pvControl)
const;
291 epics::pvData::PVStructurePtr getPVStructure()
const;
297 epics::pvData::PVStringPtr getDescriptor()
const;
303 epics::pvData::PVStructurePtr getTimeStamp()
const;
309 epics::pvData::PVStructurePtr getAlarm()
const;
315 epics::pvData::PVStructurePtr getDisplay()
const;
321 epics::pvData::PVStructurePtr getControl()
const;
327 epics::pvData::PVFieldPtr getValue()
const;
335 template<
typename PVT>
338 return std::tr1::dynamic_pointer_cast<PVT>(pvValue);
342 NTScalarArray(epics::pvData::PVStructurePtr
const & pvStructure);
343 epics::pvData::PVStructurePtr pvNTScalarArray;
344 epics::pvData::PVFieldPtr pvValue;
std::tr1::shared_ptr< NTScalarArray > NTScalarArrayPtr
std::tr1::shared_ptr< detail::NTScalarArrayBuilder > NTScalarArrayBuilderPtr
static const std::string URI
std::tr1::shared_ptr< PVT > getValue() const
Convenience Class for NTScalarArray.
Interface for in-line creating of NTScalarArray.