#ifndef __SSDEBUG_HH
#define __SSDEBUG_HH

/************************************************************************

When running the test program, we want to be able to spit out messages
targeted to which code we are interested in debugging.  This function
handles that based on a debug mask and a global variable which tells
us if we're running from the tester or not.

************************************************************************/
#include "Syslog.h"
#define DBG_GEN 0x1          // General debugging messages, not very verbose
#define DBG_LOAD 0x2         // Specific to initialization and config loading
#define DBG_LOAD_TABLES 0x4  // VERY verbose debug of table loading and data file reading.
#define DBG_ATTACH 0x8       // Specific to attachments and data manager
#define DBG_CMD 0x10         // Command IO messages
#define DBG_LOG 0x20         // Data logging
#define DBG_CALL 0x40        // General callback and updates
#define DBG_CLEAN 0x80       // Spit out messages in destructors
#define DBG_DATA 0x100       // Print values (and times) of new data we pick up from sensors.
// Hardcod debug mask since we really know at compile time.  Maybe want this whole thing to
// be decided at compile time?
#ifdef SSDBG
#define DEBUG_MASK (DBG_GEN | DBG_LOAD | DBG_CLEAN)
//#define DEBUG_MASK ~DBG_LOAD_TABLES
#else
#define DEBUG_MASK 0
#endif

#define ssdbg(a) if(a & DEBUG_MASK)Syslog::write

#endif // __SSDEBUG_HH
