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

#ifndef _EchoSounderOutput_H
#define _EchoSounderOutput_H

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

#define EchoSounderOutputName "EchoSounderOutput_ShmemName"

/*
CLASS 
EchoSounderOutput

DESCRIPTION
Output of EchoSounder

AUTHOR
Rob McEwen; Rich Henthorn
*/
class EchoSounderOutput : public SharedData {

public:

#if 0
  struct Data {
	double maxRange; // max range read in from .cfg
	double xzAngle;  // read in from .cfg
	char header[4];
	char headID;
	char serialStatus;
	char rangeCfrm;
	Boolean error;
	TimeIF::TimeSpec updateTime;
	double range;    // Range to target
	//char echoData[EchoSounderIF::EchoArraySize];  //Compiler won't let me????
	char echoData[500];
	short nBytes;
	short nBytesRead;
	double freq;
  };
#endif

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

  ~EchoSounderOutput();


  ////////////////////////////////////////////////////////////////////
  // 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();

  EchoSounderIF::Data data;

};

#endif
