/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : _adaptiveSamplerServer.cc                                     */
/* Author   : rsm                                                           */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 21 March 2007                                                 */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
/*
  $Id: _adaptiveSamplerServer.cc,v 1.4 2010/03/11 17:07:03 hthomas Exp $
  *-----------------------------------------------------------------------*/

#include "AdaptiveSamplerServer.h"
#include "Syslog.h"
#include "System.cc"

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

  char *nothing = "";

  if( argc < 2 ) argv[1] = nothing;

  try {
    adaptiveSamplerServer = 
       new AdaptiveSamplerServer("adaptiveSamplerDriver", argv[1] );
    adaptiveSamplerServer->run();
  }
  catch( SharedObject::Error e ) {
    Syslog::write("adaptiveSamplerServer -- Caught exception: %s\n", e.msg );
  }
  catch( ... ) {
    Syslog::write("adaptiveSamplerServer -- Caught exception!\n");
  }

  delete adaptiveSamplerServer;

  return 0;
}
