/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : KvhBaseDriver.h                                               */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
/*-----------------------------------------------------------------------*
  CLASS: KvhBaseDriver

  DESCRIPTION: Base driver for the Kvh compass

  $Id: KvhBaseDriver.h,v 1.4 2000/02/08 00:00:55 pean Exp $
  *-----------------------------------------------------------------------*/

#ifndef _KVH_BASE_DRIVER_H
#define _KVH_BASE_DRIVER_H

#include "PeriodicTask.h"
#include "SerialDevice.h"
#include "KvhOutput.h"

#define KvhTimeout 4000

class KvhDriver;

class KvhBaseDriver
{
     friend class KvhDriver;

public:
     KvhBaseDriver( SerialDevice *newCompassDev, KvhOutput::Data *newData );

     ~KvhBaseDriver();

protected:

     int _kvhUpdateRate;

     SerialDevice  *_device;
     KvhOutput::Data *_outputData;
     
     int startData(void);
     int stopData(void);
     int setKvhDefaultMsgType(void);
     int setKvhFifoLongTermAvg(int sampleSize);

     int setConfirmKvhUpdateRate(int newRate );

private:
     int setKvhUpdateRate(int rate);
     int getKvhUpdateRate(int *rate);

};


#endif


