12 #ifdef epicsExportSharedSymbols 13 # define nttableEpicsExportSharedSymbols 14 # undef epicsExportSharedSymbols 17 #include <pv/pvDisplay.h> 18 #include <pv/pvControl.h> 20 #ifdef nttableEpicsExportSharedSymbols 21 # define epicsExportSharedSymbols 22 # undef nttableEpicsExportSharedSymbols 29 namespace epics {
namespace nt {
32 typedef std::tr1::shared_ptr<NTTable>
NTTablePtr;
44 public std::tr1::enable_shared_from_this<NTTableBuilder>
55 shared_pointer addColumn(std::string
const & name, epics::pvData::ScalarType elementType);
61 shared_pointer addDescriptor();
67 shared_pointer addAlarm();
73 shared_pointer addTimeStamp();
80 epics::pvData::StructureConstPtr createStructure();
88 epics::pvData::PVStructurePtr createPVStructure();
105 shared_pointer add(std::string
const & name, epics::pvData::FieldConstPtr
const & field);
112 std::vector<std::string> columnNames;
113 std::vector<epics::pvData::ScalarType> types;
120 epics::pvData::StringArray extraFieldNames;
121 epics::pvData::FieldConstPtrArray extraFields;
123 friend class ::epics::nt::NTTable;
142 static const std::string
URI;
155 static shared_pointer wrap(epics::pvData::PVStructurePtr
const & pvStructure);
166 static shared_pointer wrapUnsafe(epics::pvData::PVStructurePtr
const & pvStructure);
179 static bool is_a(epics::pvData::StructureConstPtr
const & structure);
192 static bool is_a(epics::pvData::PVStructurePtr
const & pvStructure);
203 static bool isCompatible(
204 epics::pvData::StructureConstPtr
const &structure);
215 static bool isCompatible(
216 epics::pvData::PVStructurePtr
const &pvStructure);
232 static NTTableBuilderPtr createBuilder();
245 bool attachTimeStamp(epics::pvData::PVTimeStamp &pvTimeStamp)
const;
253 bool attachAlarm(epics::pvData::PVAlarm &pvAlarm)
const;
259 epics::pvData::PVStructurePtr getPVStructure()
const;
265 epics::pvData::PVStringPtr getDescriptor()
const;
271 epics::pvData::PVStructurePtr getTimeStamp()
const;
277 epics::pvData::PVStructurePtr getAlarm()
const;
283 epics::pvData::PVStringArrayPtr getLabels()
const;
290 epics::pvData::StringArray
const & getColumnNames()
const;
297 epics::pvData::PVFieldPtr getColumn(std::string
const & columnName)
const;
308 template<
typename PVT>
309 std::tr1::shared_ptr<PVT>
getColumn(std::string
const & columnName)
const 311 epics::pvData::PVFieldPtr pvField = getColumn(columnName);
313 return std::tr1::dynamic_pointer_cast<PVT>(pvField);
315 return std::tr1::shared_ptr<PVT>();
319 NTTable(epics::pvData::PVStructurePtr
const & pvStructure);
320 epics::pvData::PVStructurePtr pvNTTable;
321 epics::pvData::PVStructurePtr pvValue;
std::tr1::shared_ptr< PVT > getColumn(std::string const &columnName) const
std::tr1::shared_ptr< detail::NTTableBuilder > NTTableBuilderPtr
static const std::string URI
std::tr1::shared_ptr< NTTable > NTTablePtr
Interface for in-line creating of NTTable.
Convenience Class for NTTable.