SparkFun Iridium 9604  v1.0.0
Library for the Iridium 9604 Hybrid LTE-M Cellular + Iridium Satellite (SBD) + GNSS IoT module
Loading...
Searching...
No Matches
SparkFun_Iridium_9604::SfeDebugPrint Class Reference

Debug printing: replaces the SARA-R5 library _debugPort prints. A base class of DevIridium9604 and the URC / NMEA classes. More...

#include <sfe_debug.h>

Inheritance diagram for SparkFun_Iridium_9604::SfeDebugPrint:

Public Member Functions

void debugPrint (const char *message, bool important=false)
 Print a debug message (no trailing newline), if debugging is enabled. More...
 
void debugPrint (int value, bool important=false)
 Print a signed debug value in decimal, if debugging is enabled. More...
 
void debugPrint (int value, int printBase, bool important=false)
 Print a signed debug value in a given base (e.g. HEX, DEC), if debugging is enabled. More...
 
void debugPrint (unsigned int value, bool important=false)
 Print an unsigned debug value in decimal, if debugging is enabled. More...
 
void debugPrint (unsigned int value, int printBase, bool important=false)
 Print an unsigned debug value in a given base (e.g. HEX, DEC), if debugging is enabled. More...
 
void debugPrint (long value, bool important=false)
 Print a signed (long) debug value in decimal, if debugging is enabled. More...
 
void debugPrint (long value, int printBase, bool important=false)
 Print a signed (long) debug value in a given base, if debugging is enabled. More...
 
void debugPrint (unsigned long value, bool important=false)
 Print an unsigned (long) debug value in decimal, if debugging is enabled. More...
 
void debugPrint (unsigned long value, int printBase, bool important=false)
 Print an unsigned (long) debug value in a given base, if debugging is enabled. More...
 
void debugPrintDouble (double value, int decimalPlaces, bool important=false)
 Print a floating point debug value with the given number of decimal places, if debugging is enabled. More...
 
void debugPrintln (const char *message, bool important=false)
 Print a debug message followed by a newline, if debugging is enabled. More...
 
void debugPrintln (int value, bool important=false)
 Print a signed debug value in decimal followed by a newline, if debugging is enabled. More...
 
void debugPrintln (int value, int printBase, bool important=false)
 Print a signed debug value in a given base followed by a newline, if debugging is enabled. More...
 
void debugPrintln (unsigned int value, bool important=false)
 Print an unsigned debug value in decimal followed by a newline, if debugging is enabled. More...
 
void debugPrintln (unsigned int value, int printBase, bool important=false)
 Print an unsigned debug value in a given base followed by a newline, if debugging is enabled. More...
 
void debugPrintln (long value, bool important=false)
 Print a signed (long) debug value in decimal followed by a newline, if debugging is enabled. More...
 
void debugPrintln (long value, int printBase, bool important=false)
 Print a signed (long) debug value in a given base followed by a newline, if debugging is enabled. More...
 
void debugPrintln (unsigned long value, bool important=false)
 Print an unsigned (long) debug value in decimal followed by a newline, if debugging is enabled. More...
 
void debugPrintln (unsigned long value, int printBase, bool important=false)
 Print an unsigned (long) debug value in a given base followed by a newline, if debugging is enabled. More...
 
void debugPrintln (void)
 Print a blank debug line, if debugging is enabled and not in limited-debug mode. More...
 
void debugWrite (char c, bool important=false)
 Write a single raw character to the debug port, if debugging is enabled. More...
 
void atDebugPrint (const char *message)
 Echo raw AT traffic to the AT debug port, if AT debugging is enabled (enableAtDebugging). More...
 
void atDebugWrite (const char *buffer, size_t length)
 Echo raw AT traffic (binary-safe) to the AT debug port, if AT debugging is enabled. More...
 
void atDebugWrite (char c)
 Echo one raw AT character to the AT debug port, if AT debugging is enabled. More...
 
bool debugEnabled (void) const
 true if debug messages are enabled. More...
 
bool atDebugEnabled (void) const
 true if AT-traffic debug messages are enabled. More...
 
void copyDebugStateFrom (const SfeDebugPrint &other)
 Copy debug state (output streams and enabled flags) from another SfeDebugPrint. More...
 

Protected Attributes

SfePrint _debugSerial
 The stream to send debug messages to if enabled. More...
 
bool _printDebug = false
 Flag to print the debug messages. More...
 
bool _printLimitedDebug = false
 Flag to print limited (important only) debug messages. More...
 
SfePrint _debugAtSerial
 The stream to echo the AT traffic to if enabled. More...
 
bool _printAtDebug = false
 Flag to echo the AT traffic. More...
 

Detailed Description

Debug printing: replaces the SARA-R5 library _debugPort prints. A base class of DevIridium9604 and the URC / NMEA classes.

Member Function Documentation

◆ atDebugEnabled()

bool SparkFun_Iridium_9604::SfeDebugPrint::atDebugEnabled ( void  ) const
inline

true if AT-traffic debug messages are enabled.

◆ atDebugPrint()

void SparkFun_Iridium_9604::SfeDebugPrint::atDebugPrint ( const char *  message)

Echo raw AT traffic to the AT debug port, if AT debugging is enabled (enableAtDebugging).

◆ atDebugWrite() [1/2]

void SparkFun_Iridium_9604::SfeDebugPrint::atDebugWrite ( char  c)

Echo one raw AT character to the AT debug port, if AT debugging is enabled.

◆ atDebugWrite() [2/2]

void SparkFun_Iridium_9604::SfeDebugPrint::atDebugWrite ( const char *  buffer,
size_t  length 
)

Echo raw AT traffic (binary-safe) to the AT debug port, if AT debugging is enabled.

◆ copyDebugStateFrom()

void SparkFun_Iridium_9604::SfeDebugPrint::copyDebugStateFrom ( const SfeDebugPrint &  other)
inline

Copy debug state (output streams and enabled flags) from another SfeDebugPrint.

Lets DevIridium9604::enableDebugging()/disableDebugging() push its own state onto its separately-inherited member objects (nmeaMessages, urcHandlers) right after updating it.

Parameters
otherThe SfeDebugPrint object whose debug state to copy.

◆ debugEnabled()

bool SparkFun_Iridium_9604::SfeDebugPrint::debugEnabled ( void  ) const
inline

true if debug messages are enabled.

◆ debugPrint() [1/9]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrint ( const char *  message,
bool  important = false 
)

Print a debug message (no trailing newline), if debugging is enabled.

◆ debugPrint() [2/9]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrint ( int  value,
bool  important = false 
)

Print a signed debug value in decimal, if debugging is enabled.

◆ debugPrint() [3/9]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrint ( int  value,
int  printBase,
bool  important = false 
)

Print a signed debug value in a given base (e.g. HEX, DEC), if debugging is enabled.

◆ debugPrint() [4/9]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrint ( long  value,
bool  important = false 
)

Print a signed (long) debug value in decimal, if debugging is enabled.

◆ debugPrint() [5/9]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrint ( long  value,
int  printBase,
bool  important = false 
)

Print a signed (long) debug value in a given base, if debugging is enabled.

◆ debugPrint() [6/9]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrint ( unsigned int  value,
bool  important = false 
)

Print an unsigned debug value in decimal, if debugging is enabled.

◆ debugPrint() [7/9]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrint ( unsigned int  value,
int  printBase,
bool  important = false 
)

Print an unsigned debug value in a given base (e.g. HEX, DEC), if debugging is enabled.

◆ debugPrint() [8/9]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrint ( unsigned long  value,
bool  important = false 
)

Print an unsigned (long) debug value in decimal, if debugging is enabled.

◆ debugPrint() [9/9]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrint ( unsigned long  value,
int  printBase,
bool  important = false 
)

Print an unsigned (long) debug value in a given base, if debugging is enabled.

◆ debugPrintDouble()

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrintDouble ( double  value,
int  decimalPlaces,
bool  important = false 
)

Print a floating point debug value with the given number of decimal places, if debugging is enabled.

◆ debugPrintln() [1/10]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrintln ( const char *  message,
bool  important = false 
)

Print a debug message followed by a newline, if debugging is enabled.

◆ debugPrintln() [2/10]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrintln ( int  value,
bool  important = false 
)

Print a signed debug value in decimal followed by a newline, if debugging is enabled.

◆ debugPrintln() [3/10]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrintln ( int  value,
int  printBase,
bool  important = false 
)

Print a signed debug value in a given base followed by a newline, if debugging is enabled.

◆ debugPrintln() [4/10]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrintln ( long  value,
bool  important = false 
)

Print a signed (long) debug value in decimal followed by a newline, if debugging is enabled.

◆ debugPrintln() [5/10]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrintln ( long  value,
int  printBase,
bool  important = false 
)

Print a signed (long) debug value in a given base followed by a newline, if debugging is enabled.

◆ debugPrintln() [6/10]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrintln ( unsigned int  value,
bool  important = false 
)

Print an unsigned debug value in decimal followed by a newline, if debugging is enabled.

◆ debugPrintln() [7/10]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrintln ( unsigned int  value,
int  printBase,
bool  important = false 
)

Print an unsigned debug value in a given base followed by a newline, if debugging is enabled.

◆ debugPrintln() [8/10]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrintln ( unsigned long  value,
bool  important = false 
)

Print an unsigned (long) debug value in decimal followed by a newline, if debugging is enabled.

◆ debugPrintln() [9/10]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrintln ( unsigned long  value,
int  printBase,
bool  important = false 
)

Print an unsigned (long) debug value in a given base followed by a newline, if debugging is enabled.

◆ debugPrintln() [10/10]

void SparkFun_Iridium_9604::SfeDebugPrint::debugPrintln ( void  )

Print a blank debug line, if debugging is enabled and not in limited-debug mode.

◆ debugWrite()

void SparkFun_Iridium_9604::SfeDebugPrint::debugWrite ( char  c,
bool  important = false 
)

Write a single raw character to the debug port, if debugging is enabled.

Member Data Documentation

◆ _debugAtSerial

SfePrint SparkFun_Iridium_9604::SfeDebugPrint::_debugAtSerial
protected

The stream to echo the AT traffic to if enabled.

◆ _debugSerial

SfePrint SparkFun_Iridium_9604::SfeDebugPrint::_debugSerial
protected

The stream to send debug messages to if enabled.

◆ _printAtDebug

bool SparkFun_Iridium_9604::SfeDebugPrint::_printAtDebug = false
protected

Flag to echo the AT traffic.

◆ _printDebug

bool SparkFun_Iridium_9604::SfeDebugPrint::_printDebug = false
protected

Flag to print the debug messages.

◆ _printLimitedDebug

bool SparkFun_Iridium_9604::SfeDebugPrint::_printLimitedDebug = false
protected

Flag to print limited (important only) debug messages.


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