This is Unofficial EPICS BASE Doxygen Site
ntcontinuum.h
Go to the documentation of this file.
1 /* ntcontinuum.h */
2 /*
3  * Copyright information and license terms for this software can be
4  * found in the file LICENSE that is included with the distribution
5  */
6 #ifndef NTCONTINUUM_H
7 #define NTCONTINUUM_H
8 
9 #ifdef epicsExportSharedSymbols
10 # define ntcontinuumEpicsExportSharedSymbols
11 # undef epicsExportSharedSymbols
12 #endif
13 
14 #ifdef ntcontinuumEpicsExportSharedSymbols
15 # define epicsExportSharedSymbols
16 # undef ntcontinuumEpicsExportSharedSymbols
17 #endif
18 
19 #include <pv/ntfield.h>
20 
21 #include <shareLib.h>
22 
23 
24 namespace epics { namespace nt {
25 
27 typedef std::tr1::shared_ptr<NTContinuum> NTContinuumPtr;
28 
29 namespace detail {
30 
39  public std::tr1::enable_shared_from_this<NTContinuumBuilder>
40  {
41  public:
43 
48  shared_pointer addDescriptor();
49 
54  shared_pointer addAlarm();
55 
60  shared_pointer addTimeStamp();
61 
67  epics::pvData::StructureConstPtr createStructure();
68 
74  epics::pvData::PVStructurePtr createPVStructure();
75 
81  NTContinuumPtr create();
82 
89  shared_pointer add(std::string const & name, epics::pvData::FieldConstPtr const & field);
90 
91  private:
93 
94  void reset();
95 
96  bool descriptor;
97  bool alarm;
98  bool timeStamp;
99 
100  // NOTE: this preserves order, however it does not handle duplicates
101  epics::pvData::StringArray extraFieldNames;
103 
104  friend class ::epics::nt::NTContinuum;
105  };
106 
107 }
108 
109 typedef std::tr1::shared_ptr<detail::NTContinuumBuilder> NTContinuumBuilderPtr;
110 
111 
112 
119 {
120 public:
122 
123  static const std::string URI;
124 
136  static shared_pointer wrap(epics::pvData::PVStructurePtr const & pvStructure);
137 
147  static shared_pointer wrapUnsafe(epics::pvData::PVStructurePtr const & pvStructure);
148 
160  static bool is_a(epics::pvData::StructureConstPtr const & structure);
161 
173  static bool is_a(epics::pvData::PVStructurePtr const & pvStructure);
174 
184  static bool isCompatible(
186 
196  static bool isCompatible(
197  epics::pvData::PVStructurePtr const &pvStructure);
198 
208  bool isValid();
209 
214  static NTContinuumBuilderPtr createBuilder();
215 
220 
227  bool attachTimeStamp(epics::pvData::PVTimeStamp &pvTimeStamp) const;
228 
235  bool attachAlarm(epics::pvData::PVAlarm &pvAlarm) const;
236 
241  epics::pvData::PVStructurePtr getPVStructure() const;
242 
247  epics::pvData::PVStringPtr getDescriptor() const;
248 
253  epics::pvData::PVStructurePtr getTimeStamp() const;
254 
259  epics::pvData::PVStructurePtr getAlarm() const;
260 
265  epics::pvData::PVDoubleArrayPtr getBase() const;
266 
271  epics::pvData::PVDoubleArrayPtr getValue() const;
272 
277  epics::pvData::PVStringArrayPtr getUnits() const;
278 
279 private:
280  NTContinuum(epics::pvData::PVStructurePtr const & pvStructure);
281  epics::pvData::PVStructurePtr pvNTContinuum;
283 
285 };
286 
287 }}
288 #endif /* NTCONTINUUM_H */
std::tr1::shared_ptr< detail::NTContinuumBuilder > NTContinuumBuilderPtr
Definition: ntcontinuum.h:109
Convenience Class for NTContinuum.
Definition: ntcontinuum.h:118
Interface for in-line creating of NTContinuum.
Definition: ntcontinuum.h:38
static const std::string URI
Definition: ntcontinuum.h:123
TODO only here because of the Lockable.
Definition: ntaggregate.cpp:16
std::tr1::shared_ptr< const Structure > StructureConstPtr
Definition: pvIntrospect.h:162
std::tr1::shared_ptr< NTContinuum > NTContinuumPtr
Definition: ntcontinuum.h:26
Mark external symbols and entry points for shared libraries.
std::tr1::shared_ptr< PVStringArray > PVStringArrayPtr
Definition: pvData.h:1464
#define POINTER_DEFINITIONS(clazz)
Definition: sharedPtr.h:198
Methods for accessing a timeStamp structure.
Definition: pvTimeStamp.h:38
#define epicsShareClass
Definition: shareLib.h:206
Methods for accessing an alarm structure.
Definition: pvAlarm.h:37
std::vector< FieldConstPtr > FieldConstPtrArray
Definition: pvIntrospect.h:146
std::tr1::shared_ptr< const Field > FieldConstPtr
Definition: pvIntrospect.h:137
std::tr1::shared_ptr< PVStructure > PVStructurePtr
Definition: pvData.h:87
std::tr1::shared_ptr< PVString > PVStringPtr
Definition: pvData.h:540
std::vector< std::string > StringArray
Definition: pvType.h:110
std::tr1::shared_ptr< PVDoubleArray > PVDoubleArrayPtr
Definition: pvData.h:1461