/****************************************************************************/
/* Copyright 2003-2012 MBARI						    */
/****************************************************************************/
/* Summary  : Definitions for Watch Cycle for BEDS on Persistor CF2	    */
/* Filename : watch.h                                                       */
/* Author   : Robert Herlien (rah)					    */
/* Project  : BEDS (Benthic Event Detection System)			    */	
/* Revision : 1.0							    */
/* Created  : 10/15/2012						    */
/*									    */
/* MBARI provides this documentation and code "as is", with no warranty,    */
/* express or implied, of its quality or consistency. It is provided without*/
/* support and without obligation on the part of the Monterey Bay Aquarium  */
/* Research Institute to assist in its use, correction, modification, or    */
/* enhancement. This information should not be published or distributed to  */
/* third parties without specific written permission from MBARI.            */
/*									    */
/****************************************************************************/
/* Modification History:						    */
/* 15oct2012 rah - created						    */
/****************************************************************************/

#ifndef INCwatchh
#define INCwatchh	1

typedef enum
    { OffState=0, Warmup, OnState, WaitOff } DeviceState;

/* Who's using the sensors power	*/
#define SENSORS_SAMPLING	1
#define MODEM_SAMPLING		2
#define SENSOR_USERS_ALL	3


/****************************************/
/* Function Declarations		*/
/****************************************/

Errno	watchInit(void);
MBool	getDeploymentMode(void);
void	setDeploymentMode(MBool onoff);
MBool	newSecond(Void);
Void	watchCycle(Void);
Void	sensorsOn(Nat16 who);
Void	sensorsOff(Nat16 who);
Errno	writeSysRec(Void *ppb);
Void    forceModemCycle(void);

#endif	/* INCwatchh */
