9 #ifdef epicsExportSharedSymbols 10 # define ntscalarEpicsExportSharedSymbols 11 # undef epicsExportSharedSymbols 14 #include <pv/pvDisplay.h> 15 #include <pv/pvControl.h> 17 #ifdef ntscalarEpicsExportSharedSymbols 18 # define epicsExportSharedSymbols 19 # undef ntscalarEpicsExportSharedSymbols 26 namespace epics {
namespace nt {
41 public std::tr1::enable_shared_from_this<NTScalarBuilder>
51 shared_pointer value(epics::pvData::ScalarType scalarType);
57 shared_pointer addDescriptor();
63 shared_pointer addAlarm();
69 shared_pointer addTimeStamp();
75 shared_pointer addDisplay();
81 shared_pointer addControl();
88 epics::pvData::StructureConstPtr createStructure();
95 epics::pvData::PVStructurePtr createPVStructure();
102 NTScalarPtr create();
110 shared_pointer add(std::string
const & name, epics::pvData::FieldConstPtr
const & field);
118 epics::pvData::ScalarType valueType;
127 epics::pvData::StringArray extraFieldNames;
128 epics::pvData::FieldConstPtrArray extraFields;
130 friend class ::epics::nt::NTScalar;
149 static const std::string
URI;
162 static shared_pointer wrap(epics::pvData::PVStructurePtr
const & pvStructure);
173 static shared_pointer wrapUnsafe(epics::pvData::PVStructurePtr
const & pvStructure);
186 static bool is_a(epics::pvData::StructureConstPtr
const & structure);
199 static bool is_a(epics::pvData::PVStructurePtr
const & pvStructure);
210 static bool isCompatible(
211 epics::pvData::StructureConstPtr
const &structure);
222 static bool isCompatible(
223 epics::pvData::PVStructurePtr
const &pvStructure);
240 static NTScalarBuilderPtr createBuilder();
253 bool attachTimeStamp(epics::pvData::PVTimeStamp &pvTimeStamp)
const;
261 bool attachAlarm(epics::pvData::PVAlarm &pvAlarm)
const;
269 bool attachDisplay(epics::pvData::PVDisplay &pvDisplay)
const;
277 bool attachControl(epics::pvData::PVControl &pvControl)
const;
283 epics::pvData::PVStructurePtr getPVStructure()
const;
289 epics::pvData::PVStringPtr getDescriptor()
const;
295 epics::pvData::PVStructurePtr getTimeStamp()
const;
301 epics::pvData::PVStructurePtr getAlarm()
const;
307 epics::pvData::PVStructurePtr getDisplay()
const;
313 epics::pvData::PVStructurePtr getControl()
const;
319 epics::pvData::PVFieldPtr getValue()
const;
327 template<
typename PVT>
330 return std::tr1::dynamic_pointer_cast<PVT>(pvValue);
334 NTScalar(epics::pvData::PVStructurePtr
const & pvStructure);
335 epics::pvData::PVStructurePtr pvNTScalar;
336 epics::pvData::PVFieldPtr pvValue;
Convenience Class for NTScalar.
Interface for in-line creating of NTScalar.
std::tr1::shared_ptr< detail::NTScalarBuilder > NTScalarBuilderPtr
static const std::string URI
std::tr1::shared_ptr< PVT > getValue() const
std::tr1::shared_ptr< NTScalar > NTScalarPtr