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

#ifndef _PSA916Output_H
#define _PSA916Output_H

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

#define PSA916OutputName "PSA916Output_ShmemName"

/*
CLASS 
PSA916Output

DESCRIPTION
Output of PSA916 driver

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

public:

  struct Data {

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

    timespec updateTime;
    float range;

    // Indicates that echo was received
    Boolean echoReceived;
  };

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

  ~PSA916Output();


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