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

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

class BuoyLauncherDriver;

#define BuoyLauncherLogName "buoylauncherlog"

/*
CLASS 
BuoyLauncherLog

DESCRIPTION
Logs BuoyLauncher data through the DataLogWriter interface.

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

  BuoyLauncherLog *log = new BuoyLauncherLog(this);

  [...other stuff...]

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

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

public:

  ///////////////////////////////////////////////////////////////////
  // Constructor
  BuoyLauncherLog(BuoyLauncherDriver *bld, DataLog::FileFormat format); 

  ~BuoyLauncherLog();

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 BuoyLauncher
  // object.
  BuoyLauncherDriver *_bld;

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

  CharData     *_launcherCommand;

  ShortData    *_launcherError;
  StringData   *_launcherErrorMsg;
  ShortData    *_lastLaunchOK;
  ShortData    *_buoyResponsive;
  ShortData    *_nextBuoyReady;
  ShortData    *_currentBuoyNumber;
  ShortData    *_totalNumBuoys;
  ShortData    *_numBuoysRemain;
  ShortData    *_numBuoysLaunched;
  DoubleData   *_timeSec;
  DoubleData   *_argosBytesL;
  DoubleData   *_archiveBytesL;
  DoubleData   *_picoBytesL;
  DoubleData   *_dataMemoryL;

  ShortData    *_buoyNumber;
  ShortData    *_mainBattVolts;
  ShortData    *_auxBattVolts;
  ShortData    *_tempDegC;
  DoubleData   *_timeSecB;
  DoubleData   *_argosBytesB;
  DoubleData   *_archiveBytesB;
  DoubleData   *_picoBytesB;
  DoubleData   *_dataMemoryB;

private:


};

#endif
