|
GE-115 Emulator
An Emulator of the General Electrics GE-115 computer
|
#include <stdint.h>Go to the source code of this file.
Typedefs | |
| typedef int | ge_log_type |
Enumerations | |
| enum | ge_log_types { LOG_ERR = 0x001 , LOG_DEBUG = 0x002 , LOG_REGS = 0x004 , LOG_STATES = 0x008 , LOG_CONDS = 0x010 , LOG_REGS_V = 0x020 , LOG_FUTURE = 0x040 , LOG_CYCLE = 0x080 , LOG_CONSOLE = 0x100 , LOG_PERI = 0x200 , LOG_READER = 0x400 , LOG_CMDS = 0x800 } |
| Log types from the emulator. More... | |
Functions | |
| void | ge_log_set_active_types (ge_log_type types) |
| Set active log types. | |
| void | ge_log_set_active_types_from_spec (const char *spec) |
| Set active log types from a comma-separated name specification. | |
| void | ge_log (ge_log_type type, const char *format,...) |
| Log message. | |
| uint8_t | ge_log_enabled (ge_log_type type) |
| Check if a log type is enabled. | |
| typedef int ge_log_type |
| enum ge_log_types |
Log types from the emulator.
Every log message from the emulator has associated a log type such it can be filtered during execution to aid different kinds of debugging.
Log types can be combined by OR.
| void ge_log | ( | ge_log_type | type, |
| const char * | format, | ||
| ... | |||
| ) |
| uint8_t ge_log_enabled | ( | ge_log_type | type | ) |
| void ge_log_set_active_types | ( | ge_log_type | types | ) |
| void ge_log_set_active_types_from_spec | ( | const char * | spec | ) |
Set active log types from a comma-separated name specification.
Parses spec as a comma-separated list of category names and enables exactly those log types by calling ge_log_set_active_types(). Surrounding whitespace around each name is ignored.
Recognised names: err, debug, regs, states, conds, regs_v, future, cycle, console, peri, reader, cmds, all (enable everything), none (disable all).
If spec is NULL or empty the active types are left unchanged. Unknown names are silently ignored except that a LOG_ERR message is emitted.
| spec | Comma-separated list of category names, or NULL / empty string |