/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : octans.cc                                                   */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
/*-----------------------------------------------------------------------*
  CLASS: octans

  DESCRIPTION: Main file for octans driver

  AUTHOR: Hans Thomas

  $Id: _octans.cc,v 1.4 2001/07/19 06:02:25 hthomas Exp $
 *-----------------------------------------------------------------------*/
#include <sys/sched.h>
#include <errno.h>
#include "Octans.h"
#include "Syslog.h"
#include "StreamDriverTask.h"
#include "SerialParameters.h"

int main(int argc, char **argv)
{
     Boolean debug = True;
     Octans *octans = 0;
     SerialDevice *device = 0;
     StreamDriverTask *driverTask = 0;

     // Set task priority
     if (System::setTaskPriority(NonCriticalDriverPriority) == -1)
	  return 1;

     try {
       SerialParameters params(&argc, argv);
       device = new SerialDevice(&params);
       octans = new Octans( device, Octans::ptvf);
       driverTask = new StreamDriverTask("octans", octans);
       driverTask->run();
     }
     catch(Exception e) {
       Syslog::write("Octans - caught Exception: %s\n", e.msg);
     }
     catch(...) {
       Syslog::write("Octans - Exception caught\n");
     }

     delete octans;
     delete device;

     return 0;
}

