GE-115 Emulator
An Emulator of the General Electrics GE-115 computer
Typedefs | Enumerations | Functions
log.h File Reference
#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. More...
 
void ge_log (ge_log_type type, const char *format,...)
 Log message. More...
 
uint8_t ge_log_enabled (ge_log_type type)
 Check if a log type is enabled. More...
 

Typedef Documentation

◆ ge_log_type

typedef int ge_log_type

Definition at line 6 of file log.h.

Enumeration Type Documentation

◆ 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.

Enumerator
LOG_ERR 

Emulator unrecoverable condition.

LOG_DEBUG 

General detailed debug information.

LOG_REGS 

Register trace per cycle.

LOG_STATES 

State trace.

LOG_CONDS 

MSL conditions trace.

LOG_REGS_V 

Register trace per pulse.

LOG_FUTURE 

Future state network debug.

LOG_CYCLE 

Cycle attribution debug.

LOG_CONSOLE 

Console interactions.

LOG_PERI 

Peripherals IO.

LOG_READER 

Integrated Reader.

LOG_CMDS 

MSL commands trace.

Definition at line 17 of file log.h.

Function Documentation

◆ ge_log()

void ge_log ( ge_log_type  type,
const char *  format,
  ... 
)

Log message.

Specifies which set of logging messages should be displayed.

Parameters
typeThe type of the message
formatThe printf-style format for the log message

Definition at line 31 of file log.c.

◆ ge_log_enabled()

uint8_t ge_log_enabled ( ge_log_type  type)

Check if a log type is enabled.

Parameters
typeThe type to check
Returns
true if the logtype mask is enabled

Definition at line 46 of file log.c.

◆ ge_log_set_active_types()

void ge_log_set_active_types ( ge_log_type  types)

Set active log types.

Specifies which set of logging messages should be displayed.

Parameters
typesA set of log types

Definition at line 26 of file log.c.