/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : _terrainAidServer.cc                                     */
/* Author   : rsm                                                           */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 21 March 2007                                                 */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
/*
  $Id: _terrainAidServer.cc,v 1.3.2.2 2015/05/22 19:58:20 henthorn Exp $
  *-----------------------------------------------------------------------*/


#include "TerrainAidServer.h"
#include "Syslog.h"
#include "System.h"

int main( int argc, char **argv )
{
   Boolean test = False;
   Boolean sim  = False;
   for (int i = 1; i < argc; i++) 
   {
      if( !strcmp(argv[i], "-test") ) test = True;
      if( !strcmp(argv[i], "-sim") )  sim = True;
   }

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

  try {
    terrainAidServer = 
       new TerrainAidServer("terrainAidDriver", test, sim);
    terrainAidServer->run();
  }
  catch( SharedObject::Error e ) {
    Syslog::write("terrainAidServer -- Caught exception: %s\n", e.msg );
  }
  catch( ... ) {
    Syslog::write("terrainAidServer -- Caught exception!\n");
  }

  delete terrainAidServer;

  return 0;
}
