/****************************************************************************/
/* Copyright (c) 2007 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : AtsLog.h                                                      */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 06/08/2007                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#ifndef _SONARDYNELOG_H
#define _SONARDYNELOG_H

#include "DataLogWriter.h"
#include "DataLog.h"
#include "DoubleData.h"
#include "ShortData.h"
#include "TimeTag.h"

class AtsDriver;

#define AtsLogName "ats"

/*
CLASS 
AtsLog

DESCRIPTION
Logs Ats time difference data through the DataLogWriter interface.

To use this class, instantiate an instance within a AtsDriver object
and periodically invoke the write() method:
<pre>

  AtsLog *log = new AtsLog(this);

  [...other stuff...]

  // Log the data
  log->write();

</pre>
AUTHOR
Rich Henthorn
*/
class AtsLog : public DataLogWriter {

public:

  ///////////////////////////////////////////////////////////////////
  // Constructor
  AtsLog(AtsDriver *driver, DataLog::FileFormat format); 

  ~AtsLog();

protected:

  ///////////////////////////////////////////////////////////////////
  // Initialization process here instead of inside constructor.
  void init();

  ///////////////////////////////////////////////////////////////////
  // Set values in record array elements. This virtual method is called
  // by DataLogWriter::write()
  virtual void setFields();

  ///////////////////////////////////////////////////////////////////
  // setFields() accesses the data to be logged from this AtsDriver
  // object.
  AtsDriver *_driver;

  ///////////////////////////////////////////////////////////////////
  // Data to log

  DoubleData  *_atsDelta;
  DoubleData  *_atsDrift;


private:


};

#endif
