/****************************************************************************/
/* Copyright (c) 2005 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : EchoSounderOutput.cc                                            */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 11/17/2005                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#include <malloc.h>
#include <time.h>
#include "EchoSounderOutput.h"
#include "Syslog.h"


EchoSounderOutput::EchoSounderOutput(Access access, Boolean init)
  : SharedData(EchoSounderOutputName, 
               sizeof(EchoSounderIF::Data),
               access, init)
{
  data.error = False;
  data.updateTime.seconds  = 0;
  data.updateTime.nanoSeconds = 0;
  data.range  = 0.;
  for( int i=0; i<500; i++ ) data.echoData[i]=0;
}


EchoSounderOutput::~EchoSounderOutput()
{
}

void EchoSounderOutput::read()
{
  SharedData::read((void *)&data);
}


void EchoSounderOutput::write()
{
  SharedData::write((void *)&data);
}



