FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
i2c::debug::I2CDebugRecorder< SIZE > Class Template Reference

Class recording I2C debug notifications for later output. More...

#include <fastarduino/i2c_debug.h>

Public Member Functions

 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...
 
template<typename OSTREAM >
void trace (OSTREAM &out)
 Output all recorded I2C notifications to out then clear all records. More...
 

Detailed Description

template<uint8_t SIZE>
class i2c::debug::I2CDebugRecorder< SIZE >

Class recording I2C debug notifications for later output.

Template Parameters
SIZEthe maximum number of notifications to record (each notification is 2 bytes)
See also
i2c::DebugStatus

Definition at line 139 of file i2c_debug.h.

Constructor & Destructor Documentation

◆ I2CDebugRecorder()

template<uint8_t SIZE>
i2c::debug::I2CDebugRecorder< SIZE >::I2CDebugRecorder ( DEBUG  debug = DEBUG::DEBUG_ALL)
inlineexplicit

Create an I2CDebugRecorder 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().

Parameters
debugthe list of notifications to be recorded
See also
trace()
reset()

Definition at line 156 of file i2c_debug.h.

Member Function Documentation

◆ reset()

template<uint8_t SIZE>
void i2c::debug::I2CDebugRecorder< SIZE >::reset ( )
inline

Clear all recorded notifications.

See also
trace()

Definition at line 162 of file i2c_debug.h.

◆ trace()

template<uint8_t SIZE>
template<typename OSTREAM >
void i2c::debug::I2CDebugRecorder< SIZE >::trace ( OSTREAM &  out)
inline

Output all recorded I2C notifications to out then clear all records.

Parameters
outthe streams::ostream to output traces to
See also
reset()

Definition at line 173 of file i2c_debug.h.


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