ril_debug.h File Reference
#include <stdio.h>
#include <iostream>
#include <string>
#include "general.h"
Go to the source code of
this file.
Detailed Description
This File contains the debugging routines for the RL Toolbox. They
where inspired by 'nachos' Copyright (c) 1992-1993 The Regents of
the University of California.
The debugging routines allow the user to turn on selected
debugging messages and write then into different files. The debug
files can also be directly accessed. Enablig and disabling of debug
flags can easily be done by console or during runtime. You are
encouraged to add your own debugging flags.
The predefined debugging flags are:
'+' -- turn on all debug messages
'd' -- dynamic programming package
'e' -- etraces
'f' -- feature functions
'p' -- policies
'q' -- qfunctions
't' -- tdleaners
'v' -- torchfunction (gradient descent updates)
Define Documentation
Enumeration Type Documentation
| |
the debug mode sets the file caching behavior of the debug
system
In most cases speed of debugging is most important, in other
cases it is most important, that all debug data is saved in case of
a program crash. The debug mode allows the user to configure the
debug system to his/her needs
- Enumerator:
-
|
DebugModeCloseAlways
|
Slowest mode; all debug files are closed immedeately after
writing.
|
|
DebugModeFlushAlways
|
all debug files are flushed immedeately after writing
(default)
|
|
DebugModeLeaveCached
|
debug data is left cached in memory -- don't forget to close
all debug files (DebugDisable) before finishing your
program
|
|
Function Documentation
| void DebugDisable |
( |
char * |
flags =
NULL |
) |
|
|
| |
disable (all) debug flags
all debug flags in 'flags' will be removed and their debug files
closed removes all flags if 'flags' = NULL
|
| void
DebugDisposeFileHandle
|
( |
char |
flag |
) |
|
|
| FILE*
DebugGetFileHandle
|
( |
char |
flag |
) |
|
|
| |
get the actual debug mode
|
| void DebugInit |
( |
char * |
filename,
|
|
|
char * |
flags,
|
|
|
bool |
flgAppend =
true |
|
) |
|
|
| |
initialize a debug file, enable printing debug messages
all debug flags in 'flags' will be written into file 'filename'
if flgAppend = false and the file already exists it will be
deleted
|
| bool
DebugIsEnabled
|
( |
char |
flag =
0 |
) |
|
|
| |
Checks whether a debug flag is enabled.
|
| void DebugPrint |
( |
char |
flag,
|
|
|
char * |
format,
|
|
|
|
... |
|
) |
|
|
| |
Print debug message into corresponding debug file if flag is
enabled, else do nothing.
|
|