-
Notifications
You must be signed in to change notification settings - Fork 0
/
Trace.h
40 lines (35 loc) · 839 Bytes
/
Trace.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
/**********************************
* FILE NAME: Trace.h
*
* DESCRIPTION: Header file Trace class
**********************************/
#ifndef TRACE_H_
#define TRACE_H_
#include "stdincludes.h"
/*
* Macros
*/
#define LOG_FILE_LOCATION "machine.log"
/**
* CLASS NAME: Trace
*
* DESCRIPTION: Creates a trace of function entry, exit and variable values for debugging
*/
class Trace {
public:
FILE *logF;
int traceFileCreate();
int printToTrace(
char *keyMessage, // Message to be written as key
char *valueMessage // Message to be written as value
);
int traceFileClose();
int funcEntry(
char *valueMessage // Value
);
int funcExit(
char *valueMessage, // Value
int f_rc = SUCCESS // Function RC
);
};
#endif