/****************************************************************************/
/* Copyright (c) 2001 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : Ips4Log.h                                                      */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 04/04/2000                                                    *1
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#ifndef _IPS4LOG_H
#define _IPS4LOG_H

#include "DataLogWriter.h"
#include "DataLog.h"
#include "IntegerData.h"
#include "DoubleData.h"
#include "ShortData.h"
#include "StringData.h"
#include "AngleData.h"
#include "TimeTag.h"

class Ips4;

#define Ips4LogName "ipslog"

/*
CLASS 
Ips4Log

DESCRIPTION
Logs IPS data through the DataLogWriter interface.

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

  Ips4Log *log = new Ips4Log(this);

  [...other stuff...]

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

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

public:

  ///////////////////////////////////////////////////////////////////
  // Constructor
  Ips4Log(Ips4 *ips, DataLog::FileFormat format); 

  ~Ips4Log();

protected:

  ///////////////////////////////////////////////////////////////////
  // 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 Ips4
  // object.
  Ips4 *_ips;

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

  DoubleData  *_ipsPressure;
  DoubleData  *_ipsTemperature;
  DoubleData  *_ipsTiltX;
  DoubleData  *_ipsTiltY;
  DoubleData  *_ipsTravelTime;
  DoubleData  *_ipsRange;
  ShortData  *_ipsAmplitude;
  DoubleData  *_ipsPersistence;
  DoubleData  *_ipsDraft;
  ShortData   *_ipsPressureAge;
  ShortData   *_ipsFlag;
  ShortData   *_ipsYear;
  ShortData   *_ipsMonth;
  ShortData   *_ipsDay;
  ShortData   *_ipsHour;
  ShortData   *_ipsMin;
  ShortData   *_ipsSec;
  StringData  *_ipsRecord;

private:


};

#endif
