/****************************************************************************/
/* Copyright 1991 - 2003 MBARI											*/
/****************************************************************************/
/* $Header: /home/cvs/oasis4/src/controller/system/drvTbl.h,v 1.3 2015/01/22 18:31:49 bobh Exp $					   */
/* Summary	: Default Driver Table for OASIS3 Mooring Controller			*/
/* Filename : drvTbl.h														*/
/* Author	: Robert Herlien (rah)											*/
/* Project	: OASIS Mooring													*/
/* $Revision: 1.3 $															*/
/* Created	: 01/30/2003												*/
/************************************************************************/
/* Modification History:												*/
/* 30jan2003 rah - created from OASIS drvr.h							*/
/************************************************************************/

#ifndef INCdrvTblh
#define INCdrvTblh		  1

#include <oasis.h>
#include <serial.h>
#include <drvr.h>
#include <userif.h>
#include <log.h>
#include <sensors.h>

#define NUM_DRVRS		(sizeof(drv_default)/sizeof(DrvDesc))

/********************************/
/*		External Data			*/
/********************************/

Extern DrvDesc	usrDrvDesc;					/* User I/F driver				*/
Extern DrvDesc	freewaveDrvDesc;			/* Freewave Radio driver		*/
Extern DrvDesc	teledesignDrvDesc;			/* Teledesign Radio driver		*/
Extern DrvDesc	viperDrvDesc;				/* Viper Radio driver			*/
Extern DrvDesc	analogDrvDesc;				/* Analog driver				*/
Extern DrvDesc	oasisDrvDesc;				/* Oasis can parameters driver	*/
Extern DrvDesc	onoffDrvDesc;				/* OnOff driver					*/
Extern DrvDesc	pswitchDrvDesc;				/* Power switch driver			*/
Extern DrvDesc	logDrvDesc;					/* Test logger driver			*/
Extern DrvDesc	logbinDrvDesc;				/* Binary logger driver			*/
Extern DrvDesc	fileLogDrvDesc;				/* File logger driver			*/
Extern DrvDesc	envDrvDesc;					/* Environmental driver			*/
Extern DrvDesc	optrodeDrvDesc;				/* Optode driver				*/
Extern DrvDesc	ctdDrvDesc;					/* CTD driver					*/
Extern DrvDesc	microcatDrvDesc;			/* Microcat CTD driver			*/
Extern DrvDesc	ctdSimDrvDesc;				/* Driver for CTD simulator		*/
  

/************************************************************************/
/* drvDescs Table - This is the table that points to ALL of the possible*/
/*		drivers that can be included via the OASIS.CFG file.  The driver*/
/*		descriptors themselves are defined in each driver module; hence	*/
/*		those descriptors have to be defined as Extern, above.			*/
/*		Those DrvDesc's indicate the default parameters (serial port,	*/
/*		baud rate, flags, etc), but these are used ONLY if the			*/
/*		system configurator doesn't	override them in the config file.	*/
/*		In most cases, s/he will want to override these defaults.		*/
/************************************************************************/
/* In order to add support for a new driver, simply add a pointer for 	*/
/* the DrvDesc for that driver into this table.							*/
/*																		*/
/* Note that most instruments are declared with NO_SERIAL.  We don't	*/
/* We don't know in advance what ports will be assigned.  The			*/
/* system configurator MUST declare the serial port & power bits for	*/
/* these instruments in OASIS.CFG										*/
/************************************************************************/

const DrvDesc *drvDescs[] = 
	{ &usrDrvDesc, 						/* User I/F driver				*/
	  &freewaveDrvDesc,					/* Freewave Radio driver		*/
	  &teledesignDrvDesc,				/* Teledesign Radio driver		*/
	  &viperDrvDesc,					/* Viper Radio driver			*/
	  &analogDrvDesc,					/* Analog driver				*/
	  &oasisDrvDesc,					/* Oasis can parameters driver	*/
	  &onoffDrvDesc,					/* OnOff driver					*/
	  &pswitchDrvDesc,					/* Power switch driver			*/
	  &logDrvDesc,						/* Test logger driver			*/
	  &logbinDrvDesc,					/* Binary logger driver			*/
	  &fileLogDrvDesc,					/* File logger driver			*/
	  &envDrvDesc,						/* Environmental driver			*/
	  &optrodeDrvDesc,					/* Optode driver				*/
	  &ctdDrvDesc,						/* CTD driver					*/
	  &microcatDrvDesc,					/* Microcat CTD driver			*/
	  &ctdSimDrvDesc					/* Driver for CTD simulator		*/
	};


/************************************************************************/
/* drv_default Table - This is the table of drivers that get built if	*/
/*		OASIS.CFG doesn't exist, is corrupt, or doesn't have any drivers*/
/*		in it.	In other words, this is what the system will use as a	*/
/*		last resort.													*/
/************************************************************************/

const DrvDesc *drv_default[] = 
	{ &usrDrvDesc, 						/* User I/F driver				*/
	  &oasisDrvDesc						/* Oasis can parameters driver	*/
	};


#if 0			/* From OASIS4 - used for porting drivers	*/
const DrvDesc drvDescs[] = 
{
  { "GF", gf_drv, nullWakeFunc,
	1800, NO_SERIAL, 9600, MODE_N81NF, 0, LOG_BIN, 0, 3, 5, 0, 0},

  { "emeter", emeter_drv, nullWakeFunc,
	600, NO_SERIAL, 9600, MODE_N81NF, 2, LOG_ASCII, 0, 15, 1, 3, 0},

  { "isfet_pH", pH_drv, nullWakeFunc,
	600, NO_SERIAL, 9600, MODE_N81NF, 0, LOG_ASCII, 0, 5, 2, 40, 0},

};
#endif

#endif /* INCdrvrh */

