FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
|
Class recording I2C debug and status notifications for later output. More...
#include <fastarduino/i2c_debug.h>
Public Member Functions | |
I2CDebugStatusRecorder (i2c::status::STATUS trace=i2c::status::STATUS::TRACE_ALL, DEBUG debug=DEBUG::DEBUG_ALL) | |
Create an I2CDebugStatusRecorder that can record I2C notifications determined by debug list. More... | |
void | reset () |
Clear all recorded notifications. More... | |
template<typename OSTREAM > | |
void | trace (OSTREAM &out, bool hex_status=true) |
Output all recorded I2C notifications to out then clear all records. More... | |
Public Member Functions inherited from i2c::status::I2CStatusRecorder< SIZE_STATUS > | |
I2CStatusRecorder (STATUS trace=STATUS::TRACE_ALL) | |
Create an I2CStatusRecorder that can record I2C status notifications determined by trace . More... | |
void | reset () |
Clear all recorded notifications. More... | |
void | trace (OSTREAM &out, bool hex_status=true) |
Output all recorded I2C status notifications to out then clear all records. More... | |
Public Member Functions inherited from i2c::debug::I2CDebugRecorder< SIZE_DEBUG > | |
I2CDebugRecorder (DEBUG debug=DEBUG::DEBUG_ALL) | |
Create an I2CDebugRecorder that can record I2C notifications determined by debug list. More... | |
void | reset () |
Clear all recorded notifications. More... | |
void | trace (OSTREAM &out) |
Output all recorded I2C notifications to out then clear all records. More... | |
Class recording I2C debug and status notifications for later output.
SIZE_STATUS | the maximum number of status notifications to record (each notification is 2 bytes) |
SIZE_DEBUG | the maximum number of debug notifications to record (each notification is 2 bytes) |
Definition at line 362 of file i2c_debug.h.
|
inline |
Create an I2CDebugStatusRecorder that can record I2C notifications determined by debug
list.
The number of recorded notifications is limited by SIZE
. Once SIZE
notifications have been recorded by this I2CDebugRecorder, any additional notification will be trashed. To be effective, this must be attached to an I2C Manager (at construction time). Recorded notifications can be output to a streams::ostream
with trace()
.
trace | the list of debug notifications to be recorded |
debug | the list of status notifications to be recorded |
Definition at line 384 of file i2c_debug.h.
|
inline |
|
inline |
Output all recorded I2C notifications to out
then clear all records.
out | the streams::ostream to output traces to |
hex_status | if true (the default), status values will be displayed in hexadecimal, otherwise status name will be displayed |
Definition at line 406 of file i2c_debug.h.