/************************************************************************/
/* Copyright 2015-2016 MBARI                                            */
/************************************************************************/
/* Summary  : Include file fo Oasis5 Debug routines                     */
/* Filename : o5debug.h                                                 */
/* Author   : Robert Herlien (rah)                                      */
/* Project  : Oasis5                                                    */
/* Revision: 1.0                                                        */
/* Created  : 02/11/2016 from mvdebug.h (FOCE)                          */
/*                                                                          */
/* 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:                                                */
/* 11feb2016 rah - created from mvdebug.h FOCE project                  */
/************************************************************************/

#ifndef O5DEBUG_H
#define O5DEBUG_H

#include <GenericTypeDefs.h>


/********************************/
/*  Typedefs and Defines        */
/********************************/

#define NumberOf(arr)   (sizeof(arr) / sizeof(arr[0]))

typedef INT16   Errno;
typedef INT16   Bool;

#ifndef OK
#define OK 0
#define SUCCESS 0
#endif
#ifndef ERROR
#define ERROR (-1)
#endif

/* Return codes from function execution         */
#define CONTINUE 0
#define EXIT    (-2)


/********************************/
/*   Function Declarations      */
/********************************/

void	debugMenu(int port);
int	setDebugLevel(int port, unsigned int level);
unsigned int getDebugLevel(void);
int	dbgPrint(const char *format, ...);

#endif 
