• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

acstimeDevIOTime.h

Go to the documentation of this file.
00001 #ifndef ACSTIME_DEVIO_TIME_H
00002 #define ACSTIME_DEVIO_TIME_H
00003 /*******************************************************************************
00004 * ALMA - Atacama Large Millimiter Array
00005 * Copyright (c) European Southern Observatory, 2011
00006 *
00007 * This library is free software; you can redistribute it and/or
00008 * modify it under the terms of the GNU Lesser General Public
00009 * License as published by the Free Software Foundation; either
00010 * version 2.1 of the License, or (at your option) any later version.
00011 *
00012 * This library is distributed in the hope that it will be useful,
00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 * Lesser General Public License for more details.
00016 *
00017 * You should have received a copy of the GNU Lesser General Public
00018 * License along with this library; if not, write to the Free Software
00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00020 *
00021 * "@(#) $Id: acstimeDevIOTime.h,v 1.14 2011/10/28 15:12:04 hsommer Exp $"
00022 */
00023 #ifndef __cplusplus
00024 #error This is a C++ include file and cannot be used from plain C
00025 #endif
00026 
00027 #include <baciDevIO.h>
00028 #include "acstimeTimeUtil.h"
00031 
00046 class DevIOTime : public DevIO<ACS::Time>
00047 {
00048   public:
00052     DevIOTime() {}
00053     
00057     virtual ~DevIOTime() {}
00058     
00065     virtual bool 
00066     initializeValue() {return true;}
00067     
00078     virtual ACS::Time 
00079     read(ACS::Time &timestamp)
00080         {
00081             timestamp = getTimeStamp();
00082             
00083             acstime::Epoch retValue = TimeUtil::ace2epoch(ACE_OS::gettimeofday());
00084             return (ACS::Time)retValue.value;
00085         }
00086     
00095     virtual void 
00096     write(const ACS::Time &value, ACS::Time &timestamp)
00097         {
00098             ACE_UNUSED_ARG(value);
00099             timestamp = getTimeStamp();
00100         }
00101 };
00102 #endif
00103 

Generated on Thu Jan 12 2012 23:13:50 for ACS-10.0 C++ API by  doxygen 1.7.0