Class PVTimeStamp

Class Documentation

class PVTimeStamp

Methods for accessing a timeStamp structure.

A timeStamp structure has the following fields:

structure
    long secondsPastEpoch
    int nanoseconds
    int userTag
This class can be attached to a timeStamp structure field of any PVData object. The methods provide access to the fields in the attached structure, via an instance of class TimeStamp. This class should not be extended.

Public Functions

inline PVTimeStamp()

Constructor

bool attach(PVFieldPtr const &pvField)
void detach()

Detach for pvField.

bool isAttached()

Is the PVTimeStamp attached to a pvField?

Returns

(false,true) (is not,is) attached to a pvField.

void get(TimeStamp &timeStamp) const

copy the timeStamp structure values to TimeStamp

Parameters

timeStamp – An instance of class TimeStamp

Throws

If – not attached to a pvField.

bool set(TimeStamp const &timeStamp)

copy the values from TimeStamp to the timeStamp structure.

Parameters

timeStamp – An instance of class TimeStamp

Throws

If – not attached to a pvField.

Returns

(false,true) if pvField (immutable, mutable)