This is Unofficial EPICS BASE Doxygen Site
pvTimeStamp.h
Go to the documentation of this file.
1 /* pvTimeStamp.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  */
9 #ifndef PVTIMESTAMP_H
10 #define PVTIMESTAMP_H
11 
12 #include <string>
13 #include <stdexcept>
14 
15 #include <pv/pvType.h>
16 #include <pv/pvData.h>
17 #include <pv/timeStamp.h>
18 
19 #include <shareLib.h>
20 
21 namespace epics { namespace pvData {
22 
39 public:
45  //default constructors and destructor are OK
46  //This class should not be extended
47 
48  //returns (false,true) if pvField(is not, is) a valid timeStamp structure
49  /*
50  * Attach to a field of a PVData object.
51  * @param pvField The pvField.
52  * @return (false,true) if the pvField (is not, is) an timeStamp structure.
53  */
54  bool attach(PVFieldPtr const & pvField);
58  void detach();
63  bool isAttached();
64  // following throw logic_error if not attached to PVField
65  // set returns false if field is immutable
71  void get(TimeStamp & timeStamp) const;
78  bool set(TimeStamp const & timeStamp);
79 private:
80  static std::string noTimeStamp;
81  static std::string notAttached;
82  PVLongPtr pvSecs;
83  PVIntPtr pvUserTag;
84  PVIntPtr pvNano;
85 };
86 
87 }}
88 #endif /* PVTIMESTAMP_H */
std::tr1::shared_ptr< PVInt > PVIntPtr
Definition: pvData.h:507
TODO only here because of the Lockable.
Definition: ntaggregate.cpp:16
Mark external symbols and entry points for shared libraries.
std::tr1::shared_ptr< PVLong > PVLongPtr
Definition: pvData.h:508
Methods for accessing a timeStamp structure.
Definition: pvTimeStamp.h:38
#define epicsShareClass
Definition: shareLib.h:206
std::tr1::shared_ptr< PVField > PVFieldPtr
Definition: pvData.h:66
Methods for manipulating timeStamp.
Definition: timeStamp.h:43