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

  DESCRIPTION: Binary wrapper for paroscientific server

  AUTHOR: Aaron Marsh

  $Id: _parosciServer.cc,v 1.2 2000/05/12 15:30:45 oreilly Exp $
  *-----------------------------------------------------------------------*/

#include "ParosciServer.h"
#include "Syslog.h"
#include "System.cc"
#include "SerialParameters.h"

int main( int argc, char **argv )
{
  ParosciServer *parosciServer;

  // Set task priority
  if (System::setTaskPriority(CriticalServerPriority) == -1)
    return 1;

  try {
    SerialParameters serialParams(&argc, argv);
    parosciServer = new ParosciServer("ParosciServer", &serialParams);
    parosciServer->run();
  }
  catch( SharedObject::Error e ) {
    Syslog::write("parosciServer -- Caught exception: %s\n", e.msg );
  }
  catch( ... ) {
    Syslog::write("parsosciServer -- Caught exception!\n");
  }

  delete parosciServer;

  return 0;
}
