Hamlib
1.2.15
|
Miscellaneous utility routines. More...
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <hamlib/rig.h>
#include "misc.h"
Defines | |
#define | llabs(a) ((a)<0?-(a):(a)) |
Functions | |
unsigned char * | to_bcd (unsigned char bcd_data[], unsigned long long freq, unsigned bcd_len) |
Convert from binary to 4-bit BCD digits, little-endian. | |
unsigned long long | from_bcd (const unsigned char bcd_data[], unsigned bcd_len) |
Convert BCD digits, little-endian, to a long long (e.g. frequency in Hz) | |
unsigned char * | to_bcd_be (unsigned char bcd_data[], unsigned long long freq, unsigned bcd_len) |
Convert from binary to 4-bit BCD digits, big-endian. | |
unsigned long long | from_bcd_be (const unsigned char bcd_data[], unsigned bcd_len) |
Convert 4-bit BCD digits to binary, big-endian. | |
int | sprintf_freq (char *str, freq_t freq) |
Pretty print a frequency. | |
const char * | rig_strstatus (enum rig_status_e status) |
Convert enum RIG_STATUS_... to printable string. | |
rmode_t | rig_parse_mode (const char *s) |
Convert alpha string to enum RIG_MODE. | |
const char * | rig_strrmode (rmode_t mode) |
Convert enum RIG_MODE to alpha string. | |
vfo_t | rig_parse_vfo (const char *s) |
Convert alpha string to enum RIG_VFO_... | |
const char * | rig_strvfo (vfo_t vfo) |
Convert enum RIG_VFO_... to alpha string. | |
setting_t | rig_parse_func (const char *s) |
Convert alpha string to enum RIG_FUNC_... | |
const char * | rig_strfunc (setting_t func) |
Convert enum RIG_FUNC_... to alpha string. | |
setting_t | rig_parse_level (const char *s) |
Convert alpha string to enum RIG_LEVEL_... | |
const char * | rig_strlevel (setting_t level) |
Convert enum RIG_LEVEL_... to alpha string. | |
setting_t | rig_parse_parm (const char *s) |
Convert alpha string to RIG_PARM_... | |
const char * | rig_strparm (setting_t parm) |
Convert enum RIG_PARM_... to alpha string. | |
vfo_op_t | rig_parse_vfo_op (const char *s) |
Convert alpha string to enum RIG_OP_... | |
const char * | rig_strvfop (vfo_op_t op) |
Convert enum RIG_OP_... to alpha string. | |
scan_t | rig_parse_scan (const char *s) |
Convert alpha string to enum RIG_SCAN_... | |
const char * | rig_strscan (scan_t rscan) |
Convert enum RIG_SCAN_... to alpha string. | |
const char * | rig_strptrshift (rptr_shift_t shift) |
convert enum RIG_RPT_SHIFT_... to printable character | |
rptr_shift_t | rig_parse_rptr_shift (const char *s) |
Convert alpha char to enum RIG_RPT_SHIFT_... | |
chan_type_t | rig_parse_mtype (const char *s) |
Convert alpha string to enum RIG_MTYPE_... | |
const char * | rig_strmtype (chan_type_t mtype) |
Convert enum RIG_MTYPE_... to alpha string. | |
int | rig_check_cache_timeout (const struct timeval *tv, int timeout) |
Helper for checking cache timeout. | |
void | rig_force_cache_timeout (struct timeval *tv) |
Helper for forcing cache timeout next call. |
Miscellaneous utility routines.
Hamlib documentation for version 1.2.15 -- Thu Feb 2 2012 21:37:28
Project page: http://www.hamlib.org