16 #if defined(ARDUINO_ARCH_AVR)
17 #include <avr/pgmspace.h>
24 #if defined(ARDUINO_ARCH_AVR)
26 const __FlashStringHelper *vendorId,
27 const __FlashStringHelper *message,
30 PGM_P p =
reinterpret_cast<PGM_P
>(message);
31 char c = pgm_read_byte(p++);
35 #if defined(RF24LOG_NO_EOL)
39 PGM_P
id =
reinterpret_cast<PGM_P
>(vendorId);
40 char v = pgm_read_byte(
id++);
57 c = pgm_read_byte(p++);
58 while (c && fmt_parser.
isFlagged(c)) { c = pgm_read_byte(p++); }
59 while (c && fmt_parser.
isPaddPrec(c)) { c = pgm_read_byte(p++); }
60 while (c && fmt_parser.
isFmtOption(c)) { c = pgm_read_byte(p++); }
77 #if defined(RF24LOG_TAB_SIZE)
81 #if defined(RF24LOG_NO_EOL)
87 c = pgm_read_byte(p++);
89 #if !defined(RF24LOG_NO_EOL)
90 if (c ==
'\n') { c = pgm_read_byte(p++); }
100 const char *vendorId,
104 char *c = (
char *)message;
108 #if defined(RF24LOG_NO_EOL)
129 while (*c && fmt_parser.
isFlagged(*c)) { ++c; }
130 while (*c && fmt_parser.
isPaddPrec(*c)) { ++c; }
146 #if defined(RF24LOG_TAB_SIZE)
150 #if defined(RF24LOG_NO_EOL)
158 #if !defined(RF24LOG_NO_EOL)
159 if (*c ==
'\n') { ++c; }
Mechanisms for parsing the log messages before they are output to a stream.
#define RF24LOG_NO_EOL
macro (when defined) disables line feeds at the end of all log messages.
#define RF24LOG_TAB_SIZE
macro (when defined) relaces all \t characters with a specified quantity of spaces
#define RF24LOG_DELIMITER
Change The Delimiter character used in the header prefix of log messages.
virtual void appendStr(const char *data)=0
append a c-string
virtual void appendChar(char data, uint16_t depth=1)=0
append a character a number of times
void appendFormat(FormatSpecifier *fmt_parser, va_list *args)
output a data according to the format specifier
void descTimeLevel(uint8_t logLevel)
Automate the output of the header' timestamp and level description.
void write(uint8_t logLevel, const char *vendorId, const char *message, va_list *args)