Logo Search packages:      
Sourcecode: hamlib version File versions  Download package

debug.c File Reference


Detailed Description

control hamlib debugging functions

Definition in file debug.c.

#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/types.h>
#include <hamlib/rig.h>
#include "misc.h"

Go to the source code of this file.

Defines

#define DUMP_HEX_WIDTH   16

Functions

void dump_hex (const unsigned char ptr[], size_t size)
 Do a hex dump of the unsigned char array.
void HAMLIB_API rig_debug (enum rig_debug_level_e debug_level, const char *fmt,...)
 Default is debugging messages are done through stderr.
int HAMLIB_API rig_need_debug (enum rig_debug_level_e debug_level)
 Useful for dump_hex, etc.
void HAMLIB_API rig_set_debug (enum rig_debug_level_e debug_level)
 Change the current debug level.
vprintf_cb_t HAMLIB_API rig_set_debug_callback (vprintf_cb_t cb, rig_ptr_t arg)
 set callback to handle debug messages
FILE *HAMLIB_API rig_set_debug_file (FILE *stream)
 change stderr to some different output

Variables

static int rig_debug_level = RIG_DEBUG_TRACE
static FILE * rig_debug_stream
static rig_ptr_t rig_vprintf_arg
static vprintf_cb_t rig_vprintf_cb


Generated by  Doxygen 1.6.0   Back to index