/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : _isusServer.cc                                                */
/* Author   : Frederic Py                                                   */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 11/01/2007                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/

#include "IsusServer.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;

  SerialDevice *dev = 0;
  IsusServer *isusServer = 0;

  try {
    SerialParameters params(&argc, argv);
    isusServer = new IsusServer(IsusIFServerName, &params, NULL);
    isusServer->run();
  }
  catch( SharedObject::Error e ) {
    Syslog::write("IsusServer -- Caught exception: %s\n", e.msg );
  }
  catch( Exception e ) {
    Syslog::write("IsusServer -- Caught exception: %s\n", e.msg );
  }
  catch( ... ) {
    Syslog::write("IsusServer -- Caught exception!\n");
  }

  delete isusServer;
  delete dev;
  
  return 0;
}
