GE-115 Emulator
An Emulator of the General Electrics GE-115 computer
log.h
Go to the documentation of this file.
1 #ifndef LOG_H
2 #define LOG_H
3 
4 #include <stdint.h>
5 
6 typedef int ge_log_type;
7 
18  LOG_ERR = 0x001,
19  LOG_DEBUG = 0x002,
20  LOG_REGS = 0x004,
21  LOG_STATES = 0x008,
22  LOG_CONDS = 0x010,
23  LOG_REGS_V = 0x020,
24  LOG_FUTURE = 0x040,
25  LOG_CYCLE = 0x080,
26  LOG_CONSOLE = 0x100,
27  LOG_PERI = 0x200,
28  LOG_READER = 0x400,
29  LOG_CMDS = 0x800,
30 };
31 
40 
49 void ge_log(ge_log_type type, const char *format, ...);
50 
57 uint8_t ge_log_enabled(ge_log_type type);
58 
59 #endif /* LOG_H */
int ge_log_type
Definition: log.h:6
ge_log_types
Log types from the emulator.
Definition: log.h:17
@ LOG_REGS_V
Register trace per pulse.
Definition: log.h:23
@ LOG_ERR
Emulator unrecoverable condition.
Definition: log.h:18
@ LOG_FUTURE
Future state network debug.
Definition: log.h:24
@ LOG_REGS
Register trace per cycle.
Definition: log.h:20
@ LOG_STATES
State trace.
Definition: log.h:21
@ LOG_CONSOLE
Console interactions.
Definition: log.h:26
@ LOG_CONDS
MSL conditions trace.
Definition: log.h:22
@ LOG_CYCLE
Cycle attribution debug.
Definition: log.h:25
@ LOG_CMDS
MSL commands trace.
Definition: log.h:29
@ LOG_PERI
Peripherals IO.
Definition: log.h:27
@ LOG_DEBUG
General detailed debug information.
Definition: log.h:19
@ LOG_READER
Integrated Reader.
Definition: log.h:28
void ge_log_set_active_types(ge_log_type types)
Set active log types.
Definition: log.c:26
void ge_log(ge_log_type type, const char *format,...)
Log message.
Definition: log.c:31
uint8_t ge_log_enabled(ge_log_type type)
Check if a log type is enabled.
Definition: log.c:46