-
Notifications
You must be signed in to change notification settings - Fork 2
/
DbgPrintFile.h
51 lines (43 loc) · 1.1 KB
/
DbgPrintFile.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* DbgPrintFile.h
*
* Created on: 21.04.2015
* Author: aschoepfer
*/
#ifndef PLAT_DEBUG_TRACE_DBGPRINTFILE_H_
#define PLAT_DEBUG_TRACE_DBGPRINTFILE_H_
#include "IDbgPrint.h"
#ifdef ARDUINO
#include <Arduino.h>
#endif
/**
* @brief Debug trace print for printing to a file.
*/
class DbgPrint_File : public IDbgPrint
{
public:
/**
* Constructor of a debug trace file printer.
*/
DbgPrint_File();
/**
* Destructor of a debug trace file printer.
*/
virtual ~DbgPrint_File() { }
/**
* @brief Store a string to a file.
* @param str Const char message to be stored.
*/
virtual void print(const char* str);
#ifdef ARDUINO
/**
* @brief Store a string from flash memory to a file. (ram optimization for Arduino).
* @param fshvar Const char message to be stored.
*/
virtual void print(const __FlashStringHelper* fshvar);
#endif
private: // forbidden default functions
DbgPrint_File& operator = (const DbgPrint_File& src); // assignment operator
DbgPrint_File(const DbgPrint_File& src); // copy constructor
};
#endif /* PLAT_DEBUG_TRACE_DBGPRINTFILE_H_ */