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

/*-----------------------------------------------------------------------*
  CLASS: KvhCompassDriver

  DESCRIPTION: Driver for the Kvh compass

  $Id: KvhCompassDriver.h,v 1.6 2000/02/25 19:56:04 oreilly Exp $
  *-----------------------------------------------------------------------*/

#include "StreamSerialDriver.h"
#include "SerialDevice.h"
#include "KvhDriver.h"
#include "KvhCompassOutput.h"
#include "KvhCompassLog.h"

class KvhDriver;

class KvhCompassDriver : public KvhDriver
{
  friend class KvhCompassLog;

public:

  KvhCompassDriver(SerialDevice *device,
		   int updateRate);

  ~KvhCompassDriver();


  ////////////////////////////////////////////////////////////////////
  // Initialize device
  virtual DeviceIF::Status initialize();

  ////////////////////////////////////////////////////////////////////
  // Process device data
  virtual DeviceIF::Status processRecord(unsigned char *record, 
					 int nRecordBytes);

protected:
     
  int setAutocal(Boolean mode);

  KvhCompassLog *_log;
  KvhCompassOutput *_output;
};


#endif


