-
Notifications
You must be signed in to change notification settings - Fork 0
/
debug_logger.h
40 lines (32 loc) · 924 Bytes
/
debug_logger.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
#pragma once
#include "singleton.h"
struct DeviceInfo;
class Cash;
struct IRState;
struct MagneticSignal;
struct CISParameter;
class Bitmap;
struct CISErrorInfo;
struct CISImageInfo {
char tag[40];
Bitmap *image;
};
class DebugLogger {
public:
bool Init();
void StartDebug();
void Upgrade(LPCTSTR toVersion, int result);
void CalibrateInfrared(int result, const IRState states[6]);
void DetectMagneticSignal(int result, int object, const MagneticSignal *signals);
void CalibrateCIS(int step, const CISErrorInfo *error, const CISParameter *parameters, const CISImageInfo *images, int imageCount);
bool SaveCash(Cash *cash);
void EndDebug();
private:
TCHAR logPath_[MAX_PATH];
CFile logFile_;
DebugLogger();
virtual ~DebugLogger();
bool WriteRecord(const char *tag, const void *data, int length);
bool IsUploadDetail(int level, int result);
DECLARE_SINGLETON(DebugLogger)
};