/****************************************************************************/
/* Copyright (c) 2005 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : SonardyneOutput.h                                             */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 11/17/2005                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/

#ifndef _SonardyneOutput_H
#define _SonardyneOutput_H

#include "TimeP.h"
#include "SharedData.h"

#define SonardyneOutputName "SonardyneOutput_ShmemName"

/*
CLASS 
SonardyneOutput

DESCRIPTION
Output of Sonardyne USBL transceiver driver

AUTHOR
Rich Henthorn
*/
class SonardyneOutput : public SharedData {

public:

  struct Data {

    Boolean deviceReady;

    TimeIF::TimeSpec updateTime;
    float range;    // Range to target
    float x;
    float y;
    float z;
    short tat;      // Turnaround time between request and receipt of data
    UsblIF::UsblDataStatus status;   // status of data - see UsblIF.idl for values
    
  };

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

  ~SonardyneOutput();


  ////////////////////////////////////////////////////////////////////
  // 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
