/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : CtdLog.h                                                      */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#ifndef _CTDLOG_H
#define _CTDLOG_H

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

class Ctd;

#define CtdLogName "ctdlog"

/*
CLASS 
CtdLog

DESCRIPTION
Logs CTD data through the DataLogWriter interface.

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

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

  [...other stuff...]

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

</pre>
AUTHOR
John O'Rieffel
*/
class CtdLog : 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.
  CtdLog(Ctd *ctd, DataLog::FileFormat fileFormat); 

  ~CtdLog();

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.
  Ctd *_ctd;


private:

  DoubleData *_cond;
  DoubleData *_temp;
  DoubleData *_cfreq;
  DoubleData *_tfreq;
  
//  CharData *_valid;

};

#endif
