/****************************************************************************/
/* Copyright (c) 2012 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : DeltaTLog.h                                              */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 09/17/2012                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#ifndef _DeltaTLog_H
#define _DeltaTLog_H

#include "DataLogWriter.h"
#include "FloatData.h"
#include "IntegerData.h"
#include "ShortData.h"
#include "Idt83pParser.h"

#define DeltaTLogName "idt"

/*
CLASS
DeltaTLog

DESCRIPTION
Logs DeltaT data through the DataLogWriter interface.

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

  DeltaTLog *log = new DeltaTLog(this, DataLog::AsciiFormat);

  [...other stuff...]

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

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

public:

  ///////////////////////////////////////////////////////////////////
  // Constructor
  DeltaTLog(uint16_t maxbeams, DataLog::FileFormat fileFormat=BinaryFormat);

  ~DeltaTLog();

  virtual void setFields(Idt83pData* data);

protected:

  void init(void);

private:

  uint16_t     _maxbeams;
  FloatData   *_dt_altitude;
  IntegerData *_nbeams;
  FloatData   *_beam_ranges[IDT_MAX_BEAMS];
  IntegerData *_intensities[IDT_MAX_BEAMS];
  DoubleData  *_interrogation_time;
  FloatData   *_ping_number;
  FloatData   *_data_latency;    // millisconds
  FloatData   *_repetition_rate; // millisconds

};

#endif
