00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00026
#ifndef ACSTIME_DEVIO_TIME_H
00027
#define ACSTIME_DEVIO_TIME_H
00028
00029
#ifndef __cplusplus
00030
#error This is a C++ include file and cannot be used from plain C
00031
#endif
00032
00033
#include <baciDevIO.h>
00034
#include "acstimeTimeUtil.h"
00037
00052 class DevIOTime :
public DevIO<ACS::Time>
00053 {
00054
public:
00058 DevIOTime() {}
00059
00063 virtual ~DevIOTime() {}
00064
00071
virtual bool
00072 initializeValue() {
return true;}
00073
00084
virtual ACS::Time
00085 read(ACS::Time ×tamp)
00086 {
00087 timestamp =
getTimeStamp();
00088
00089 acstime::Epoch retValue =
TimeUtil::ace2epoch(ACE_OS::gettimeofday());
00090
return (ACS::Time)retValue.value;
00091 }
00092
00101
virtual void
00102 write(
const ACS::Time &value, ACS::Time ×tamp)
00103 {
00104 ACE_UNUSED_ARG(value);
00105 timestamp =
getTimeStamp();
00106 }
00107 };
00108
#endif
00109