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

  DESCRIPTION: Binary wrapper for Sonardyne Server

  AUTHOR: Rich Henthorn

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

#include "SonardyneServer.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);
    SonardyneServer *server = new SonardyneServer(&serialParams);
    server->run();
  }
  catch( Exception e ) {
    Syslog::write("sonardyneServer -- Caught exception: %s\n", e.msg );
  }
  catch( ... ) {
    Syslog::write("sonardyneServer -- Caught exception!\n");
  }

  return 0;
}
