Files
pvData/pvDataApp/property/pvTimeStamp.h
Marty Kraimer fdf2342157 minor changes
2010-12-20 06:30:48 -05:00

37 lines
1017 B
C++

/* pvTimeStamp.h */
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* EPICS pvDataCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include <string>
#include <stdexcept>
#include "pvType.h"
#include "timeStamp.h"
#include "pvData.h"
#ifndef PVTIMESTAMP_H
#define PVTIMESTAMP_H
namespace epics { namespace pvData {
class PVTimeStamp {
public:
PVTimeStamp() : pvSecs(0),pvNano(0) {}
//default constructors and destructor are OK
//This class should not be extended
//returns (false,true) if pvField(isNot, is valid timeStamp structure
bool attach(PVField *pvField);
void detach();
bool isAttached();
// following throw logic_error is not attached to PVField
// a set returns false if field is immutable
void get(TimeStamp &) const;
bool set(TimeStamp const & timeStamp);
private:
PVLong* pvSecs;
PVInt* pvNano;
};
}}
#endif /* PVTIMESTAMP_H */