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

register.c File Reference

Detailed Description

Dynamic registration of backends.

doc todo: Let's explain what's going on here!

Definition in file register.c.

#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <ltdl.h>
#include <hamlib/rig.h>

Go to the source code of this file.


struct  rig_list


#define HASH_FUNC(a)   ((a)%RIGLSTHASHSZ)
#define PATH_MAX   1024
#define PREFIX   "hamlib-"
#define RIG_BACKEND_MAX   32
#define RIGLSTHASHSZ   16


typedef int(* backend_init_t )(rig_ptr_t)


static int dummy_rig_probe (const hamlib_port_t *p, rig_model_t model, rig_ptr_t data)
int HAMLIB_API rig_check_backend (rig_model_t rig_model)
static int rig_check_backend_version (const lt_dlhandle be_handle, const char *be_name, backend_init_t *be_init)
struct rig_caps *HAMLIB_API rig_get_caps (rig_model_t rig_model)
int HAMLIB_API rig_list_foreach (int(*cfunc)(const struct rig_caps *, rig_ptr_t), rig_ptr_t data)
int rig_load_all_backends ()
int HAMLIB_API rig_load_backend (const char *be_name)
static int rig_lookup_backend (rig_model_t rig_model)
int rig_probe_all_backends (hamlib_port_t *p, rig_probe_func_t cfunc, rig_ptr_t data)
rig_model_t rig_probe_first (hamlib_port_t *p)
int HAMLIB_API rig_register (const struct rig_caps *caps)
int HAMLIB_API rig_unregister (rig_model_t rig_model)


struct {
   const char *   be_name
   int   be_num
   rig_model_t(*   be_probe_all )(hamlib_port_t *, rig_probe_func_t, rig_ptr_t)
rig_backend_list [RIG_BACKEND_MAX]
static struct rig_list * rig_hash_table [RIGLSTHASHSZ] = { NULL, }

Generated by  Doxygen 1.6.0   Back to index