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

#ifndef _KvhCompassOutput_H
#define _KvhCompassOutput_H

#include <time.h>
#include "SharedData.h"

#define KvhCompassOutputName "KvhCompassOutput_ShmemName"

/*
CLASS 
KvhCompassOutput

DESCRIPTION
Output of KvhCompassDriver

AUTHOR
Tom O'Reilly
*/
class KvhCompassOutput : public SharedData {

public:

  struct Data {

    // Indicates that device is initialized and ready
    Boolean deviceReady;

    double heading;
    double headingRate;
    timespec updateTime;
  };

  KvhCompassOutput(Access access = NoAccess, Boolean init = False);

  ~KvhCompassOutput();


  ////////////////////////////////////////////////////////////////////
  // Read from shared memory to this object's Data::data element
  void read();

  ////////////////////////////////////////////////////////////////////
  // Write from this object's Data::data element to shared memory
  void write();

  Data data;

};

#endif
