12 #define epicsExportSharedSymbols 21 namespace epics {
namespace pvData {
23 string PVTimeStamp::noTimeStamp(
"No timeStamp structure found");
24 string PVTimeStamp::notAttached(
"Not attached to a timeStamp structure");
28 if(pvField->getField()->getType()!=
structure)
return false;
35 pvNano = pvStructure->getSubField<
PVInt>(
"nanoseconds");
36 pvUserTag = pvStructure->getSubField<
PVInt>(
"userTag");
40 && pvUserTag)
return true;
43 pvStructure = pvStructure->getParent();
44 if(pvStructure==
NULL)
break;
57 if(pvSecs.get()==
NULL)
return false;
63 if(pvSecs.get()==
NULL) {
64 throw std::logic_error(notAttached);
66 timeStamp.
put(pvSecs->get(),pvNano->get());
72 if(pvSecs.get()==
NULL) {
73 throw std::logic_error(notAttached);
75 if(pvSecs->isImmutable() || pvNano->isImmutable())
return false;
78 bool returnValue =
false;
shared_ptr< T > static_pointer_cast(shared_ptr< U > const &r) BOOST_NOEXCEPT
TODO only here because of the Lockable.
void get(TimeStamp &timeStamp) const
std::tr1::shared_ptr< PVLong > PVLongPtr
int32 getNanoseconds() const
void put(int64 secondsPastEpoch, int32 nanoseconds=0)
Data interface for a structure,.
std::tr1::shared_ptr< PVStructure > PVStructurePtr
Class that holds the data for each possible scalar type.
std::tr1::shared_ptr< PVField > PVFieldPtr
void setUserTag(int32 userTag)
int64 getSecondsPastEpoch() const
bool attach(PVFieldPtr const &pvField)
Methods for manipulating timeStamp.
bool set(TimeStamp const &timeStamp)