/****************************************************************************/
/* Copyright 2003-2012 MBARI						    */
/****************************************************************************/
/* Summary  : Definitions for Acoustic Modem for BEDS on Persistor CF2	    */
/* Filename : modem.h                                                       */
/* Author   : Robert Herlien (rah)					    */
/* Project  : BEDS (Benthic Event Detection System)			    */	
/* Revision : 1.0							    */
/* Created  : 12/07/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:						    */
/* 07dec2012 rah - created						    */
/****************************************************************************/

#ifndef INCmodemh
#define INCmodemh	1

#include <beds.h>		/* Defines DEBUG_MODEM			*/

#define modemIsOn()	PIOTestAssertSet(TPU4)


/****************************************/
/* Function Declarations		*/
/****************************************/

Void	modemInit(Void);
MBool	isModemPort(Void);
MBool	modemConnectCheck();
Void	modemOn(Void);
Void	modemOff(Void);
Void	checkModemBatt(Void);
Void	modemiFlush(Void);
MBool	auxPortInCheck();
char	*ModemCmd(CmdInfoPtr cip);
char	*ModemConnectCmd(CmdInfoPtr cip);
char	*ModemDisconnectCmd(CmdInfoPtr cip);
char	*ModemOfflineCmd(CmdInfoPtr cip);
MBool	modemCommandMode(void);
void	modemOnlineMode(void);
int	getSReg(int reg);
int	getRemoteSReg(int modem, int reg);
void	setRemoteSReg(int modem, int reg, int val);
char	*SRegCmd(CmdInfoPtr cip);

#endif	/* INCmodemh */
