/****************************************************************************/
/* Copyright (c) 2005 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : _echoSounderServer.cc                                           */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 11/28/2005                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
/*-----------------------------------------------------------------------*
  PROGRAM: echoSounderServer

  DESCRIPTION: Binary wrapper for EchoSounder Server

  AUTHOR: Rob McEwen; Rich Henthorn

  *-----------------------------------------------------------------------*/

#include "EchoSounderServer.h"
#include "Syslog.h"
#include "System.h"
#include "SerialParameters.h"

int main( int argc, char **argv )
{
  // Set task priority
  if (System::setTaskPriority(CriticalServerPriority) == -1)
    return 1;

  try 
  {
    SerialParameters serialParams(&argc, argv);
    EchoSounderServer *server = new EchoSounderServer(&serialParams);
    server->run();
  }
  catch( Exception e ) {
    Syslog::write("echoSounderServer -- Caught exception: %s\n", e.msg );
  }
  catch( ... ) {
    Syslog::write("echoSounderServer -- Caught exception!\n");
  }

  return 0;
}
