RF24Log  0.1.3
Unified logging library
NativePrintLogger.h
Go to the documentation of this file.
1 
15 #ifndef SRC_RF24LOGGERS_NATIVEPRINTLOGGER_H_
16 #define SRC_RF24LOGGERS_NATIVEPRINTLOGGER_H_
17 #ifndef ARDUINO
18 
19 #include "../RF24LogParts/PrintfParser.h"
20 #include "../RF24LogParts/LevelDescriptions.h"
21 
23 #ifndef printf_P
24 #define printf_P printf
25 #endif
26 
29 {
30 public:
33 
34 protected:
35 
36  // declare the rest to raise from pure virtual
37  /************************************************/
38 
39  void appendTimestamp();
40  void appendChar(char data, uint16_t depth = 1);
41  void appendInt(long data);
42  void appendUInt(unsigned long data, uint8_t base = 10);
43  void appendDouble(double data, uint8_t precision = 2);
44  void appendStr(const char* data);
45 };
46 #endif /* ARDUINO */
47 #endif /* SRC_RF24LOGGERS_NATIVEPRINTLOGGER_H_ */
Class to manage logging messages to a printf function pointer.
void appendTimestamp()
output a timestamp
void appendChar(char data, uint16_t depth=1)
append a character a number of times
void appendUInt(unsigned long data, uint8_t base=10)
append an ‘unsigned’ (only +) number
void appendStr(const char *data)
append a c-string
void appendInt(long data)
append a signed (+/-) number
NativePrintLogger()
Construct a new NativePrintLogger object using stdout.
void appendDouble(double data, uint8_t precision=2)
append a floating point number
class that holds the RF24Log's in-house printf-like parsing
Definition: PrintfParser.h:25