SoDaRadio-5.0.3-master:8901fb5
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SoDa::Debug Class Reference

A simple base class to provide debug messaging from any derived class. More...

#include <Debug.hxx>

Inheritance diagram for SoDa::Debug:
SoDa::SoDaThread SoDa::USRPTuner SoDa::BaseBandRX SoDa::BaseBandTX SoDa::CWTX SoDa::GPSmon SoDa::TestServer SoDa::UI SoDa::USRPCtrl SoDa::USRPRX SoDa::USRPTX SoDaTest::MultiMBox_Test_Thread SoDaTest::ThN SoDa::IntNTuner SoDa::SimpleTuner

Public Member Functions

 Debug (std::string _unit_name=std::string("UNKNOWN"))
 
 Debug (const char *_unit_name_cstr)
 
 Debug (unsigned int _debug_level, std::string _unit_name=std::string("UNKNOWN"))
 
 Debug (unsigned int _debug_level, const char *_unit_name_cstr)
 
void debugMsg (const std::string &msg, unsigned int threshold=1)
 
void debugMsg (const boost::format &fmt, unsigned int threshold=1)
 
void debugMsg (const char *msg, unsigned int threshold=1)
 
void setDebugLevel (unsigned int v)
 
unsigned int getDebugLevel ()
 

Static Public Member Functions

static void setDefaultLevel (unsigned int v)
 
static unsigned int getDefaultLevel ()
 
static void setGlobalLevel (unsigned int v)
 
static unsigned int getGlobalLevel ()
 

Static Public Attributes

static boost::mutex debug_msg_mutex
 

Protected Member Functions

std::string curDateTime ()
 

Protected Attributes

std::string unit_name
 the name of the unit reporting status More...
 
unsigned int debug_level
 the debug level (threshold) for messages More...
 

Static Protected Attributes

static unsigned int default_debug_level = 0
 
static unsigned int global_debug_level = 0
 

Detailed Description

A simple base class to provide debug messaging from any derived class.

Definition at line 42 of file Debug.hxx.

Constructor & Destructor Documentation

◆ Debug() [1/4]

SoDa::Debug::Debug ( std::string  _unit_name = std::string("UNKNOWN"))
inline

Definition at line 44 of file Debug.hxx.

References debug_level, default_debug_level, and unit_name.

◆ Debug() [2/4]

SoDa::Debug::Debug ( const char *  _unit_name_cstr)
inline

Definition at line 49 of file Debug.hxx.

References debug_level, default_debug_level, and unit_name.

◆ Debug() [3/4]

SoDa::Debug::Debug ( unsigned int  _debug_level,
std::string  _unit_name = std::string("UNKNOWN") 
)
inline

Definition at line 54 of file Debug.hxx.

References debug_level, and unit_name.

◆ Debug() [4/4]

SoDa::Debug::Debug ( unsigned int  _debug_level,
const char *  _unit_name_cstr 
)
inline

Definition at line 59 of file Debug.hxx.

References debug_level, and unit_name.

Member Function Documentation

◆ curDateTime()

std::string SoDa::Debug::curDateTime ( )
inlineprotected

Definition at line 92 of file Debug.hxx.

Referenced by debugMsg().

◆ debugMsg() [1/3]

void SoDa::Debug::debugMsg ( const std::string &  msg,
unsigned int  threshold = 1 
)
inline

◆ debugMsg() [2/3]

void SoDa::Debug::debugMsg ( const boost::format &  fmt,
unsigned int  threshold = 1 
)
inline

Definition at line 71 of file Debug.hxx.

References debugMsg().

◆ debugMsg() [3/3]

void SoDa::Debug::debugMsg ( const char *  msg,
unsigned int  threshold = 1 
)
inline

Definition at line 75 of file Debug.hxx.

References debugMsg().

◆ getDebugLevel()

unsigned int SoDa::Debug::getDebugLevel ( )
inline

Definition at line 80 of file Debug.hxx.

References debug_level.

◆ getDefaultLevel()

static unsigned int SoDa::Debug::getDefaultLevel ( )
inlinestatic

Definition at line 83 of file Debug.hxx.

References default_debug_level.

◆ getGlobalLevel()

static unsigned int SoDa::Debug::getGlobalLevel ( )
inlinestatic

Definition at line 86 of file Debug.hxx.

References global_debug_level.

◆ setDebugLevel()

void SoDa::Debug::setDebugLevel ( unsigned int  v)
inline

Definition at line 79 of file Debug.hxx.

References debug_level.

◆ setDefaultLevel()

static void SoDa::Debug::setDefaultLevel ( unsigned int  v)
inlinestatic

Definition at line 82 of file Debug.hxx.

References default_debug_level.

Referenced by doWork().

◆ setGlobalLevel()

static void SoDa::Debug::setGlobalLevel ( unsigned int  v)
inlinestatic

Definition at line 85 of file Debug.hxx.

References global_debug_level.

Member Data Documentation

◆ debug_level

unsigned int SoDa::Debug::debug_level
protected

the debug level (threshold) for messages

Definition at line 99 of file Debug.hxx.

Referenced by Debug(), debugMsg(), getDebugLevel(), and setDebugLevel().

◆ debug_msg_mutex

boost::mutex SoDa::Debug::debug_msg_mutex
static

Definition at line 88 of file Debug.hxx.

Referenced by debugMsg().

◆ default_debug_level

unsigned int SoDa::Debug::default_debug_level = 0
staticprotected

Definition at line 101 of file Debug.hxx.

Referenced by Debug(), getDefaultLevel(), and setDefaultLevel().

◆ global_debug_level

unsigned int SoDa::Debug::global_debug_level = 0
staticprotected

Definition at line 102 of file Debug.hxx.

Referenced by debugMsg(), getGlobalLevel(), and setGlobalLevel().

◆ unit_name

std::string SoDa::Debug::unit_name
protected

the name of the unit reporting status

Definition at line 98 of file Debug.hxx.

Referenced by Debug(), and debugMsg().


The documentation for this class was generated from the following files: