13 #define epicsExportSharedSymbols 26 namespace epics {
namespace pvCopy{
29 static std::string name(
"timestamp");
31 PVTimestampPlugin::PVTimestampPlugin()
35 PVTimestampPlugin::~PVTimestampPlugin()
39 void PVTimestampPlugin::create()
41 static bool firstTime =
true;
45 PVPluginRegistry::registerPlugin(name,pvPlugin);
50 const std::string & requestValue,
54 return PVTimestampFilter::create(requestValue,master);
57 PVTimestampFilter::~PVTimestampFilter()
63 const std::string & requestValue,
70 if(requestValue.compare(
"current")==0) {
72 }
else if(requestValue.compare(
"copy")==0){
82 PVTimestampFilter::PVTimestampFilter(
bool current,
bool copy,
PVFieldPtr const & master)
93 timeStamp.getCurrent();
95 if(!pvTimeStamp.attach(pvCopy))
return false;
97 if(!pvTimeStamp.attach(master))
return false;
99 pvTimeStamp.set(timeStamp);
100 bitSet->set(pvCopy->getFieldOffset());
105 if(!pvTimeStamp.attach(master))
return false;
106 pvTimeStamp.get(timeStamp);
107 if(!pvTimeStamp.attach(pvCopy))
return false;
108 pvTimeStamp.set(timeStamp);
109 bitSet->set(pvCopy->getFieldOffset());
111 if(!pvTimeStamp.attach(pvCopy))
return false;
112 pvTimeStamp.get(timeStamp);
113 if(!pvTimeStamp.attach(master))
return false;
114 pvTimeStamp.set(timeStamp);
121 string PVTimestampFilter::getName()
A plugin for a filter that sets a timeStamp to the current time.
std::tr1::shared_ptr< PVFilter > PVFilterPtr
std::tr1::shared_ptr< PVCopy > PVCopyPtr
shared_ptr< T > static_pointer_cast(shared_ptr< U > const &r) BOOST_NOEXCEPT
TODO only here because of the Lockable.
void copy(PVValueArray< T > &pvFrom, size_t fromOffset, size_t fromStride, PVValueArray< T > &pvTo, size_t toOffset, size_t toStride, size_t count)
Copy a subarray from one scalar array to another.
A filter that sets a timeStamp to/from the current field or pvCopy.
Methods for accessing a timeStamp structure.
std::tr1::shared_ptr< PVTimestampPlugin > PVTimestampPluginPtr
std::tr1::shared_ptr< PVField > PVFieldPtr
std::tr1::shared_ptr< Convert > ConvertPtr
std::tr1::shared_ptr< PVTimestampFilter > PVTimestampFilterPtr
std::tr1::shared_ptr< BitSet > BitSetPtr
bool attach(PVFieldPtr const &pvField)