Libtrap: Internal development docs
1.16.1
|
Data Structures | |
struct | hello_msg_header_s |
Macros | |
#define | MSG(level, format, args...) if (trap_debug >= level) {snprintf(trap_err_msg, 4095, format, ##args); debug_msg(level,trap_err_msg);} |
Debug message macro if DEBUG macro is defined. More... | |
#define | MSG_NONL(level, format, args...) if (trap_debug >= level) {snprintf(trap_err_msg, 4095, format, ##args); debug_msg_nonl(trap_err_msg);} |
Debug message macro if DEBUG macro is defined - without new line. More... | |
#define | LINE() {fprintf(stderr, "file: %s, line: %i\n", __FILE__, __LINE__); fflush(stderr);} |
#define | INLINE |
#define | VERBOSE(level, format, args...) |
#define | DEBUG_IFC(X) |
#define | DEBUG_BUF(X) |
Typedefs | |
typedef struct trap_ctx_priv_s | trap_ctx_priv_t |
typedef struct hello_msg_header_s | hello_msg_header_t |
typedef enum trap_verbose_level | trap_verbose_level_t |
VERBOSE/MSG levels. More... | |
Enumerations | |
enum | trap_verbose_level { CL_ERROR = -3, CL_WARNING = -2, CL_VERBOSE_OFF = -1, CL_VERBOSE_BASIC, CL_VERBOSE_ADVANCED, CL_VERBOSE_LIBRARY } |
VERBOSE/MSG levels. More... | |
Functions | |
void | trap_verbose_msg (int level, char *string) |
send verbose message to stderr More... | |
Variables | |
int | trap_debug |
int | trap_verbose |
char | trap_err_msg [] |
trap_ctx_priv_t * | trap_glob_ctx |
Timeouts handling | |
#define | TRAP_NO_IFC_SLEEP 4 |
seconds to sleep, when autoflushing is not active More... | |
#define | TRAP_IFC_TIMEOUT 2000000 |
size of default timeout on output interfaces in microseconds More... | |
#define DEBUG_BUF | ( | X | ) |
Definition at line 187 of file trap_internal.h.
#define DEBUG_IFC | ( | X | ) |
Definition at line 183 of file trap_internal.h.
#define INLINE |
Definition at line 150 of file trap_internal.h.
#define LINE | ( | ) | {fprintf(stderr, "file: %s, line: %i\n", __FILE__, __LINE__); fflush(stderr);} |
Prints line in source file if DEBUG macro is defined
Definition at line 148 of file trap_internal.h.
#define MSG | ( | level, | |
format, | |||
args... | |||
) | if (trap_debug >= level) {snprintf(trap_err_msg, 4095, format, ##args); debug_msg(level,trap_err_msg);} |
Debug message macro if DEBUG macro is defined.
now 3 known DEBUG LEVELS
BE VERBOSE AND DEBUG ARE DIFFERENT OPTIONS !!!
Definition at line 142 of file trap_internal.h.
#define MSG_NONL | ( | level, | |
format, | |||
args... | |||
) | if (trap_debug >= level) {snprintf(trap_err_msg, 4095, format, ##args); debug_msg_nonl(trap_err_msg);} |
Debug message macro if DEBUG macro is defined - without new line.
Definition at line 146 of file trap_internal.h.
#define TRAP_IFC_TIMEOUT 2000000 |
size of default timeout on output interfaces in microseconds
Definition at line 129 of file trap_internal.h.
#define TRAP_NO_IFC_SLEEP 4 |
seconds to sleep, when autoflushing is not active
Definition at line 128 of file trap_internal.h.
#define VERBOSE | ( | level, | |
format, | |||
args... | |||
) |
Macro for verbose message
Definition at line 171 of file trap_internal.h.
typedef struct hello_msg_header_s hello_msg_header_t |
Hello message header structure (used during the output and input interface negotiation). Contains data format and data specifier size of the output interface which is making the negotiation.
typedef struct trap_ctx_priv_s trap_ctx_priv_t |
Definition at line 99 of file trap_internal.h.
typedef enum trap_verbose_level trap_verbose_level_t |
VERBOSE/MSG levels.
enum trap_verbose_level |
VERBOSE/MSG levels.
Definition at line 116 of file trap_internal.h.
void trap_verbose_msg | ( | int | level, |
char * | string | ||
) |
send verbose message to stderr
send verbose message to stderr. may change in future. don't use it directly
level | importance level |
string | format string, like printf function |
Definition at line 107 of file trap_internal.c.
int trap_debug |
char trap_err_msg[] |
buffer for verbose and debug messages
Definition at line 58 of file trap_internal.c.
trap_ctx_priv_t* trap_glob_ctx |
int trap_verbose |
control verbose level
Definition at line 57 of file trap_internal.c.