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

#include "PSA916Input.h"
#include "PSA916Output.h"
#include "StreamSerialDriver.h"
#include "PSA916Log.h"

/*
CLASS 
PSA916

DESCRIPTION
DataSonics PSA916 Device Driver Interface

AUTHOR
John Rieffel

*/

class PSA916 : public StreamSerialDriver {

  friend class PSA916Log;
public:
  
  /////////////////////////////////////////////////////////
  // Constructor, not used...
  PSA916();

  /////////////////////////////////////////////////////////
  // overloaded Constructor
  PSA916(SerialDevice *interface);

  ///////////////////////////////////////////////////////
  //destructor
  virtual  ~PSA916();


protected:

  PSA916Log *_log;
  
  float _range;
  timespec _readtime;
  Boolean _valid;

  PSA916Input *_input;
  PSA916Output *_output;
  SerialDevice *_device;
  
  //////////////////////////////////////////////////////////////// 
  // initialization function
  virtual DeviceIF::Status initialize();

  ////////////////////////////////////////////////////////////////////
  // Process a record
  virtual DeviceIF::Status processRecord(unsigned char *record, 
					 int nRecordBytes);

};

#endif
