/****************************************************************************/
/* Copyright (c) 2003 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : FastCatLog.h                                                  */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 09/16/2003                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#ifndef _FASTCATLOG_H
#define _FASTCATLOG_H

#include "DataLogWriter.h"
#include "DoubleData.h"

class FastCat;

#define FastCatLogName "fastcatlog"

/*
CLASS 
FastCatLog

DESCRIPTION
Logs FastCat CTD data through the DataLogWriter interface.

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

  FastCatLog *log = new FastCatLog(this);

  [...other stuff...]

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

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

public:

  ///////////////////////////////////////////////////////////////////
  // Constructor
  // [input] navigation: CTD object. The setFields() method
  //         accesses this object as the source of the logged data.
  // [input] fileFormat: Specifies either DataLog::AsciiFormat or 
  //         DataLog::BinaryFormat.
  FastCatLog(FastCat *fastcat, DataLog::FileFormat fileFormat); 

  ~FastCatLog();

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 CTD 
  // object.
  FastCat *_fastcat;


private:

  DoubleData *_cond;           // calculated conductivity
  DoubleData *_temp;           // calculated temperature
  DoubleData *_pressure;       // calculated pressure
  DoubleData *_salinity;       // calculated salinity
  DoubleData *_cfreq;          // raw conductivity frequency
  DoubleData *_tcounts;        // raw temperature A/D counts
  DoubleData *_pcounts;        // raw pressure A/D counts
  DoubleData *_pvolts;         // raw press temp comp voltage reading
  DoubleData *_sound_velocity; // calculated sound velocity

};

#endif
