1 #include "ITransport.h" 8 m_file.open(
"transport.log");
19 for (
size_t i = 0; i <
length; ++i) {
20 m_file << std::hex << (int)data[i] <<
" ";
23 uint8_t byte = data[0];
24 int port = ((byte >> 4) & 0xF);
25 int channel = ((byte >> 0) & 0x3);
26 m_file <<
" (port: " << port <<
" channel: " << channel <<
")";
35 for (
size_t i = 0; i < ack.size; ++i) {
36 m_file << std::hex << (int)ack.data[i] <<
" ";
39 uint8_t byte = ack.data[0];
40 int port = ((byte >> 4) & 0xF);
41 int channel = ((byte >> 0) & 0x3);
42 m_file <<
" (port: " << port <<
" channel: " << channel <<
")";
void logPacket(const uint8_t *data, uint32_t length)
void logAck(const Ack &ack)
void enableLogging(bool enable)