/****************************************************************************/
/* Copyright (c) 2014 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : KiProLog.h                                                */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 12/07/2014                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#ifndef _KiProLog_H
#define _KiProLog_H

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

class KiPro;

#define KiProLogName "KiProLog"

/*
CLASS
KiProLog

DESCRIPTION
Logs KiPro data through the DataLogWriter interface.

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

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

  [...other stuff...]

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

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

public:

  ///////////////////////////////////////////////////////////////////
  // Constructor
  // [input] fileFormat: Specifies either DataLog::AsciiFormat or
  //         DataLog::BinaryFormat.
  //Log(KiPro *mb, DataLog::FileFormat fileFormat);
  KiProLog(KiPro *k, DataLog::FileFormat fileFormat,
       const char* postfix = "");

  ~KiProLog();

protected:

  ///////////////////////////////////////////////////////////////////
  // Set values in record array elements. This virtual method is called
  // by DataLogWriter::write()
  virtual void setFields();

  void init(void);

  ///////////////////////////////////////////////////////////////////
  // setFields() accesses the data to be logged from this KiPro
  // object.
  KiPro *_kipro;


private:

  // KiPro state
  //
  IntegerData *_mode;
  DoubleData  *_timecode;
  IntegerData *_recording;
  IntegerData *_available_media;

};

#endif
