/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : dropWeight.cc                                                 */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#include "TerrainAidDriver.h"
#include "Syslog.h"
#include "System.h"
const short waitForInterfaces=60;

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


  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;
   }

  printf("_terrainAidDriver.cc test = %d, sim = %d\n", test, sim);

  try 
  {
    // TerrainAid *terrainAid = new TerrainAid( test, sim );
    TerrainAidTask *terrainAid = new TerrainAidTask( test, sim );
    Syslog::write("terrainAidDriver:: - wait %d seconds for the other "
		  "interfaces to start....", waitForInterfaces);
    sleep(waitForInterfaces);
    terrainAid->run();
  }
  catch (Exception e) 
  {
    Syslog::write("terrainAidDriver:: - caught Exception: %s\n", e.msg);
  }
  catch (...) 
  {
    Syslog::write("terrainAidDriver:: - caught exception!\n");
  }

  return 0;
}
