/*-----------------------------------------------------------------------*
  PROGRAM: bluefinBattServer

  DESCRIPTION: Binary wrapper for Bluefin Battery Server

  AUTHOR: Henthorn

  *-----------------------------------------------------------------------*/

#include "SimulatedBluefinBatt.h"
#include "Syslog.h"
#include "SerialParameters.h"
#include "Exception.h"
#include "System.h"

int main( int argc, char **argv )
{
  SimulatedBluefinBatt *server = 0;

  if (System::setTaskPriority(SimulatorPriority) == -1) return 1;

  try {
    int nb = 3;
    server = new SimulatedBluefinBatt(BLUEFINBATTERYSERVER, nb, argc-1, argv+1);
    server->run();
  }
  catch( SharedObject::Error e ) {
    Syslog::write("simBluefinBatt -- Caught exception: %s\n", e.msg );
  }
  catch( ... ) {
    Syslog::write("simBluefinBatt -- Caught exception!\n");
  }

  delete server;
  return 0;
}
