pvDatabaseCPP  4.5.2
pvTimestampPlugin.h
Go to the documentation of this file.
1 /* pvTimeStampPlugin.h */
2 /*
3  * The License for this software can be found in the file LICENSE that is included with the distribution.
4  */
5 
6 #ifndef PVTIMESTAMPPLUGIN_H
7 #define PVTIMESTAMPPLUGIN_H
8 
9 #include <string>
10 #include <map>
11 #include <pv/lock.h>
12 #include <pv/pvData.h>
13 #include <pv/pvPlugin.h>
14 #include <pv/pvTimeStamp.h>
15 
16 #include <shareLib.h>
17 
18 namespace epics { namespace pvCopy{
19 
20 class PVTimestampPlugin;
22 
23 typedef std::tr1::shared_ptr<PVTimestampPlugin> PVTimestampPluginPtr;
24 typedef std::tr1::shared_ptr<PVTimestampFilter> PVTimestampFilterPtr;
25 
26 
33 class epicsShareClass PVTimestampPlugin : public PVPlugin
34 {
35 private:
37 public:
38  POINTER_DEFINITIONS(PVTimestampPlugin);
39  virtual ~PVTimestampPlugin();
43  static void create();
52  virtual PVFilterPtr create(
53  const std::string & requestValue,
54  const PVCopyPtr & pvCopy,
55  const epics::pvData::PVFieldPtr & master);
56 };
57 
61 class epicsShareClass PVTimestampFilter : public PVFilter
62 {
63 private:
64  epics::pvData::PVTimeStamp pvTimeStamp;
65  epics::pvData::TimeStamp timeStamp;
66  bool current;
67  bool copy;
68  epics::pvData::PVFieldPtr master;
69 
70 
71  PVTimestampFilter(bool current,bool copy,epics::pvData::PVFieldPtr const & pvField);
72 public:
73  POINTER_DEFINITIONS(PVTimestampFilter);
74  virtual ~PVTimestampFilter();
82  static PVTimestampFilterPtr create(const std::string & requestValue,const epics::pvData::PVFieldPtr & master);
91  bool filter(const epics::pvData::PVFieldPtr & pvCopy,const epics::pvData::BitSetPtr & bitSet,bool toCopy);
96  std::string getName();
97 };
98 
99 }}
100 #endif /* PVTIMESTAMPPLUGIN_H */
A plugin for a filter that sets a timeStamp to the current time.
std::tr1::shared_ptr< PVFilter > PVFilterPtr
Definition: pvPlugin.h:29
std::tr1::shared_ptr< PVCopy > PVCopyPtr
Definition: pvPlugin.h:25
A filter that sets a timeStamp to/from the current field or pvCopy.
A filter plugin that attaches to a field of a PVStrcture.
Definition: pvPlugin.h:44
std::tr1::shared_ptr< PVTimestampPlugin > PVTimestampPluginPtr
std::tr1::shared_ptr< PVTimestampFilter > PVTimestampFilterPtr
A Filter that is called when a copy PVStructure is being updated.
Definition: pvPlugin.h:68