Hamlib  1.2.15
Data Structures | Files | Defines | Typedefs | Enumerations | Functions | Variables
Rig (transceiver) API

Data Structures

struct  confparams
 Configuration parameter structure. More...
union  value_t
 Universal approach for passing values. More...
struct  freq_range_list
 Frequency range. More...
struct  tuning_step_list
 Tuning step definition. More...
struct  filter_list
 Filter definition. More...
struct  ext_list
 Extension attribute definition. More...
struct  channel
 Channel structure. More...
struct  channel_cap
 Channel capability definition. More...
struct  chan_list
 Memory channel list definition. More...
struct  gran
 level/parm granularity definition More...
struct  cal_table
 Calibration table struct. More...
struct  rig_caps
 Rig data structure. More...
struct  hamlib_port_t
 Port definition. More...
struct  rig_state
 Rig state containing live data and customized fields. More...
struct  rig_callbacks
 Callback functions and args for rig event. More...
struct  rig
 The Rig structure. More...

Files

file  conf.c
 

Rig configuration interface.


file  event.c
 

Event handling.


file  ext.c
 

Extension request parameter interface.


file  mem.c
 

Memory and channel interface.


file  rig.c
 

Ham Radio Control Libraries interface.


file  settings.c
 

func/level/parm interface


file  tones.c
 

CTCSS and DCS interface and tables.


file  rig.h
 

Hamlib rig data structures.


Defines

#define __BEGIN_DECLS   /* empty */
#define __END_DECLS   /* empty */
#define HAMLIB_PARAMS(protos)   ()
#define rig_ptr_t   char*
#define NETRIGCTL_RET   "RPRT "
 Token in the netrigctl protocol for returning error code.
#define RIGNAMSIZ   30
#define RIGVERSIZ   8
#define FILPATHLEN   100
#define FRQRANGESIZ   30
#define MAXCHANDESC   30 /* describe channel eg: "WWV 5Mhz" */
#define TSLSTSIZ   20 /* max tuning step list size, zero ended */
#define FLTLSTSIZ   42 /* max mode/filter list size, zero ended */
#define MAXDBLSTSIZ   8 /* max preamp/att levels supported, zero ended */
#define CHANLSTSIZ   16 /* max mem_list size, zero ended */
#define MAX_CAL_LENGTH   32 /* max calibration plots in cal_table_t */
#define RIG_FLAG_TRANSCEIVER   (RIG_FLAG_RECEIVER|RIG_FLAG_TRANSMITTER)
#define RIG_TYPE_MASK   (RIG_FLAG_TRANSCEIVER|RIG_FLAG_SCANNER|RIG_FLAG_MOBILE|RIG_FLAG_HANDHELD|RIG_FLAG_COMPUTER|RIG_FLAG_TRUNKING|RIG_FLAG_TUNER)
#define RIG_TYPE_OTHER   0
#define RIG_TYPE_TRANSCEIVER   RIG_FLAG_TRANSCEIVER
#define RIG_TYPE_HANDHELD   (RIG_FLAG_TRANSCEIVER|RIG_FLAG_HANDHELD)
#define RIG_TYPE_MOBILE   (RIG_FLAG_TRANSCEIVER|RIG_FLAG_MOBILE)
#define RIG_TYPE_RECEIVER   RIG_FLAG_RECEIVER
#define RIG_TYPE_PCRECEIVER   (RIG_FLAG_COMPUTER|RIG_FLAG_RECEIVER)
#define RIG_TYPE_SCANNER   (RIG_FLAG_SCANNER|RIG_FLAG_RECEIVER)
#define RIG_TYPE_TRUNKSCANNER   (RIG_TYPE_SCANNER|RIG_FLAG_TRUNKING)
#define RIG_TYPE_COMPUTER   (RIG_FLAG_TRANSCEIVER|RIG_FLAG_COMPUTER)
#define RIG_TYPE_TUNER   RIG_FLAG_TUNER
#define RIG_STATUS_NEW   RIG_STATUS_UNTESTED
 Map all deprecated RIG_STATUS_NEW references to RIG_STATUS_UNTESTED for backward compatibility.
#define PRIfreq   "f"
 printf(3) format to be used for freq_t type
#define SCNfreq   "lf"
 scanf(3) format to be used for freq_t type
#define FREQFMT   SCNfreq
#define Hz(f)   ((freq_t)(f))
#define kHz(f)   ((freq_t)((f)*(freq_t)1000))
#define MHz(f)   ((freq_t)((f)*(freq_t)1000000))
#define GHz(f)   ((freq_t)((f)*(freq_t)1000000000))
#define s_Hz(f)   ((shortfreq_t)(f))
#define s_kHz(f)   ((shortfreq_t)((f)*(shortfreq_t)1000))
#define s_MHz(f)   ((shortfreq_t)((f)*(shortfreq_t)1000000))
#define s_GHz(f)   ((shortfreq_t)((f)*(shortfreq_t)1000000000))
#define RIG_FREQ_NONE   Hz(0)
#define RIG_VFO_NONE   0
 '' -- used in caps
#define RIG_VFO_TX_FLAG   (1<<30)
#define RIG_VFO_CURR   (1<<29)
 currVFO -- current "tunable channel"/VFO
#define RIG_VFO_MEM   (1<<28)
 MEM -- means Memory mode, to be used with set_vfo
#define RIG_VFO_VFO   (1<<27)
 VFO -- means (last or any)VFO mode, with set_vfo
#define RIG_VFO_TX_VFO(v)   ((v)|RIG_VFO_TX_FLAG)
#define RIG_VFO_TX   RIG_VFO_TX_VFO(RIG_VFO_CURR)
 TX -- alias for split tx or uplink, of VFO_CURR
#define RIG_VFO_RX   RIG_VFO_CURR
 RX -- alias for split rx or downlink
#define RIG_VFO_MAIN   (1<<26)
 Main -- alias for MAIN
#define RIG_VFO_SUB   (1<<25)
 Sub -- alias for SUB
#define RIG_VFO_N(n)   (1<<(n))
#define RIG_VFO_A   RIG_VFO_N(0)
 VFOA -- VFO A
#define RIG_VFO_B   RIG_VFO_N(1)
 VFOB -- VFO B
#define RIG_VFO_C   RIG_VFO_N(2)
 VFOC -- VFO C
#define RIG_TARGETABLE_NONE   0
#define RIG_TARGETABLE_FREQ   (1<<0)
#define RIG_TARGETABLE_MODE   (1<<1)
#define RIG_TARGETABLE_PURE   (1<<2)
#define RIG_TARGETABLE_TONE   (1<<3)
#define RIG_TARGETABLE_FUNC   (1<<4)
#define RIG_TARGETABLE_ALL   0x7fffffff
#define RIG_PASSBAND_NORMAL   s_Hz(0)
#define RIG_CONF_END   0
#define RIG_COMBO_MAX   8
#define RIG_ANT_NONE   0
#define RIG_ANT_N(n)   ((ant_t)1<<(n))
#define RIG_ANT_1   RIG_ANT_N(0)
#define RIG_ANT_2   RIG_ANT_N(1)
#define RIG_ANT_3   RIG_ANT_N(2)
#define RIG_ANT_4   RIG_ANT_N(3)
#define RIG_ANT_5   RIG_ANT_N(4)
#define RIG_LEVEL_FLOAT_LIST   (RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_APF|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_COMP|RIG_LEVEL_BALANCE|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX)
#define RIG_LEVEL_READONLY_LIST   (RIG_LEVEL_SQLSTAT|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_STRENGTH|RIG_LEVEL_RAWSTR)
#define RIG_LEVEL_IS_FLOAT(l)   ((l)&RIG_LEVEL_FLOAT_LIST)
#define RIG_LEVEL_SET(l)   ((l)&~RIG_LEVEL_READONLY_LIST)
#define RIG_PARM_FLOAT_LIST   (RIG_PARM_BACKLIGHT|RIG_PARM_BAT)
#define RIG_PARM_READONLY_LIST   (RIG_PARM_BAT)
#define RIG_PARM_IS_FLOAT(l)   ((l)&RIG_PARM_FLOAT_LIST)
#define RIG_PARM_SET(l)   ((l)&~RIG_PARM_READONLY_LIST)
#define RIG_SETTING_MAX   32
#define RIG_TRN_OFF   0
#define RIG_TRN_RIG   1
#define RIG_TRN_POLL   2
#define mW(p)   ((int)(p))
#define Watts(p)   ((int)((p)*1000))
#define W(p)   Watts(p)
#define kW(p)   ((int)((p)*1000000L))
#define RIG_MODE_SSB   (RIG_MODE_USB|RIG_MODE_LSB)
 macro for backends, not to be used by rig_set_mode et al.
#define RIG_MODE_ECSS   (RIG_MODE_ECSSUSB|RIG_MODE_ECSSLSB)
 macro for backends, not to be used by rig_set_mode et al.
#define RIG_DBLST_END   0 /* end marker in a preamp/att level list */
#define RIG_IS_DBLST_END(d)   ((d)==0)
#define RIG_FRNG_END   {Hz(0),Hz(0),RIG_MODE_NONE,0,0,RIG_VFO_NONE}
#define RIG_IS_FRNG_END(r)   ((r).start == Hz(0) && (r).end == Hz(0))
#define RIG_ITU_REGION1   1
#define RIG_ITU_REGION2   2
#define RIG_ITU_REGION3   3
#define RIG_TS_ANY   0
#define RIG_TS_END   {RIG_MODE_NONE,0}
#define RIG_IS_TS_END(t)   ((t).modes == RIG_MODE_NONE && (t).ts == 0)
#define RIG_FLT_ANY   0
#define RIG_FLT_END   {RIG_MODE_NONE,0}
#define RIG_IS_FLT_END(f)   ((f).modes == RIG_MODE_NONE)
#define RIG_CHFLAG_NONE   0
 Empty channel_t.flags field.
#define RIG_CHFLAG_SKIP   (1<<0)
 skip memory channel during scan (lock out), channel_t.flags
#define RIG_CHFLAG_DATA   (1<<1)
 DATA port mode flag.
#define RIG_EXT_END   {0, {.i=0}}
#define RIG_IS_EXT_END(x)   ((x).token == 0)
#define RIG_CHAN_END   {0,0,RIG_MTYPE_NONE}
#define RIG_IS_CHAN_END(c)   ((c).type == RIG_MTYPE_NONE)
#define RIG_MEM_CAPS_ALL   -1
 Special memory channel value to tell rig_lookup_mem_caps() to retrieve all the ranges.
#define EMPTY_STR_CAL   { 0, { { 0, 0 }, } }
#define rig_set_split(r, v, s)   rig_set_split_vfo((r),(v),(s),RIG_VFO_CURR)
#define rig_get_split(r, v, s)   ({ vfo_t _tx_vfo; rig_get_split_vfo((r),(v),(s),&_tx_vfo); })
#define rig_get_strength(r, v, s)   rig_get_level((r),(v),RIG_LEVEL_STRENGTH, (value_t*)(s))
#define rig_idx2setting(i)   (1UL<<(i))
#define rig_set_debug_level(level)   rig_set_debug(level)

Typedefs

typedef struct rig RIG
 Rig structure definition (see rig for details).
typedef unsigned int tone_t
 CTCSS and DCS type definition.
typedef enum rig_port_e rig_port_t
 Port type.
typedef double freq_t
 Frequency type, Frequency type unit in Hz, able to hold SHF frequencies.
typedef signed long shortfreq_t
 Short frequency type Frequency in Hz restricted to 31bits, suitable for offsets, shifts, etc..
typedef int vfo_t
 VFO definition.
typedef shortfreq_t pbwidth_t
 Passband width, in Hz.
typedef enum dcd_e dcd_t
 DCD status.
typedef long token_t
 configuration token
typedef int ant_t
 Antenna number.
typedef unsigned long setting_t
 Setting.
typedef struct freq_range_list freq_range_t
 Frequency range.
typedef struct channel channel_t
 Channel structure typedef.
typedef struct channel_cap channel_cap_t
 Channel cap.
typedef struct chan_list chan_t
 chan_t type
typedef struct gran gran_t
 gran_t type
typedef struct cal_table cal_table_t
 calibration table type
typedef int(* chan_cb_t )(RIG *, channel_t **, int, const chan_t *, char *)
typedef int(* confval_cb_t )(RIG *, const struct confparams *, value_t *, char *)
typedef hamlib_port_t port_t
typedef int(* vprintf_cb_t )(enum rig_debug_level_e, char *, const char *, va_list)
typedef int(* freq_cb_t )(RIG *, vfo_t, freq_t, char *)
typedef int(* mode_cb_t )(RIG *, vfo_t, rmode_t, pbwidth_t, char *)
typedef int(* vfo_cb_t )(RIG *, vfo_t, char *)
typedef int(* ptt_cb_t )(RIG *, vfo_t, ptt_t, char *)
typedef int(* dcd_cb_t )(RIG *, vfo_t, dcd_t, char *)
typedef int(* pltune_cb_t )(RIG *, vfo_t, freq_t *, rmode_t *, pbwidth_t *, char *)
typedef int(* rig_probe_func_t )(const hamlib_port_t *, rig_model_t, char *)

Enumerations

enum  rig_errcode_e {
  RIG_OK = 0, RIG_EINVAL, RIG_ECONF, RIG_ENOMEM,
  RIG_ENIMPL, RIG_ETIMEOUT, RIG_EIO, RIG_EINTERNAL,
  RIG_EPROTO, RIG_ERJCTED, RIG_ETRUNC, RIG_ENAVAIL,
  RIG_ENTARGET, RIG_BUSERROR, RIG_BUSBUSY, RIG_EARG,
  RIG_EVFO, RIG_EDOM
}
 Hamlib error codes Error code definition that can be returned by the Hamlib functions. Unless stated otherwise, Hamlib functions return the negative value of rig_errcode_e definitions in case of error, or 0 when successful. More...
enum  rig_debug_level_e {
  RIG_DEBUG_NONE = 0, RIG_DEBUG_BUG, RIG_DEBUG_ERR, RIG_DEBUG_WARN,
  RIG_DEBUG_VERBOSE, RIG_DEBUG_TRACE
}
 Hamlib debug levels. More...
enum  rig_port_e {
  RIG_PORT_NONE = 0, RIG_PORT_SERIAL, RIG_PORT_NETWORK, RIG_PORT_DEVICE,
  RIG_PORT_PACKET, RIG_PORT_DTMF, RIG_PORT_ULTRA, RIG_PORT_RPC,
  RIG_PORT_PARALLEL, RIG_PORT_USB, RIG_PORT_UDP_NETWORK, RIG_PORT_CM108
}
 Port type. More...
enum  serial_parity_e {
  RIG_PARITY_NONE = 0, RIG_PARITY_ODD, RIG_PARITY_EVEN, RIG_PARITY_MARK,
  RIG_PARITY_SPACE
}
 Serial parity. More...
enum  serial_handshake_e { RIG_HANDSHAKE_NONE = 0, RIG_HANDSHAKE_XONXOFF, RIG_HANDSHAKE_HARDWARE }
 Serial handshake. More...
enum  serial_control_state_e { RIG_SIGNAL_UNSET = 0, RIG_SIGNAL_ON, RIG_SIGNAL_OFF }
 Serial control state. More...
enum  rig_type_t {
  RIG_FLAG_RECEIVER = (1<<1), RIG_FLAG_TRANSMITTER = (1<<2), RIG_FLAG_SCANNER = (1<<3), RIG_FLAG_MOBILE = (1<<4),
  RIG_FLAG_HANDHELD = (1<<5), RIG_FLAG_COMPUTER = (1<<6), RIG_FLAG_TRUNKING = (1<<7), RIG_FLAG_APRS = (1<<8),
  RIG_FLAG_TNC = (1<<9), RIG_FLAG_DXCLUSTER = (1<<10), RIG_FLAG_TUNER = (1<<11)
}
 Rig type flags. More...
enum  rig_status_e {
  RIG_STATUS_ALPHA = 0, RIG_STATUS_UNTESTED, RIG_STATUS_BETA, RIG_STATUS_STABLE,
  RIG_STATUS_BUGGY
}
 Development status of the backend. More...
enum  rptr_shift_t { RIG_RPT_SHIFT_NONE = 0, RIG_RPT_SHIFT_MINUS, RIG_RPT_SHIFT_PLUS }
 Repeater shift type. More...
enum  split_t { RIG_SPLIT_OFF = 0, RIG_SPLIT_ON }
 Split mode. More...
enum  dcd_e { RIG_DCD_OFF = 0, RIG_DCD_ON }
 DCD status. More...
enum  dcd_type_t {
  RIG_DCD_NONE = 0, RIG_DCD_RIG, RIG_DCD_SERIAL_DSR, RIG_DCD_SERIAL_CTS,
  RIG_DCD_SERIAL_CAR, RIG_DCD_PARALLEL, RIG_DCD_CM108
}
 DCD type. More...
enum  ptt_t { RIG_PTT_OFF = 0, RIG_PTT_ON, RIG_PTT_ON_MIC, RIG_PTT_ON_DATA }
 PTT status. More...
enum  ptt_type_t {
  RIG_PTT_NONE = 0, RIG_PTT_RIG, RIG_PTT_SERIAL_DTR, RIG_PTT_SERIAL_RTS,
  RIG_PTT_PARALLEL, RIG_PTT_RIG_MICDATA, RIG_PTT_CM108
}
 PTT type. More...
enum  powerstat_t { RIG_POWER_OFF = 0, RIG_POWER_ON = (1<<0), RIG_POWER_STANDBY = (1<<1) }
 Radio power state. More...
enum  reset_t {
  RIG_RESET_NONE = 0, RIG_RESET_SOFT = (1<<0), RIG_RESET_VFO = (1<<1), RIG_RESET_MCALL = (1<<2),
  RIG_RESET_MASTER = (1<<3)
}
 Reset operation. More...
enum  vfo_op_t {
  RIG_OP_NONE = 0, RIG_OP_CPY = (1<<0), RIG_OP_XCHG = (1<<1), RIG_OP_FROM_VFO = (1<<2),
  RIG_OP_TO_VFO = (1<<3), RIG_OP_MCL = (1<<4), RIG_OP_UP = (1<<5), RIG_OP_DOWN = (1<<6),
  RIG_OP_BAND_UP = (1<<7), RIG_OP_BAND_DOWN = (1<<8), RIG_OP_LEFT = (1<<9), RIG_OP_RIGHT = (1<<10),
  RIG_OP_TUNE = (1<<11), RIG_OP_TOGGLE = (1<<12)
}
 VFO operation. More...
enum  scan_t {
  RIG_SCAN_NONE = 0, RIG_SCAN_STOP = RIG_SCAN_NONE, RIG_SCAN_MEM = (1<<0), RIG_SCAN_SLCT = (1<<1),
  RIG_SCAN_PRIO = (1<<2), RIG_SCAN_PROG = (1<<3), RIG_SCAN_DELTA = (1<<4), RIG_SCAN_VFO = (1<<5),
  RIG_SCAN_PLT = (1<<6)
}
 Rig Scan operation. More...
enum  rig_conf_e {
  RIG_CONF_STRING, RIG_CONF_COMBO, RIG_CONF_NUMERIC, RIG_CONF_CHECKBUTTON,
  RIG_CONF_BUTTON
}
 parameter types More...
enum  ann_t {
  RIG_ANN_NONE = 0, RIG_ANN_OFF = RIG_ANN_NONE, RIG_ANN_FREQ = (1<<0), RIG_ANN_RXMODE = (1<<1),
  RIG_ANN_CW = (1<<2), RIG_ANN_ENG = (1<<3), RIG_ANN_JAP = (1<<4)
}
 Announce. More...
enum  agc_level_e {
  RIG_AGC_OFF = 0, RIG_AGC_SUPERFAST, RIG_AGC_FAST, RIG_AGC_SLOW,
  RIG_AGC_USER, RIG_AGC_MEDIUM, RIG_AGC_AUTO
}
 AGC delay settings. More...
enum  meter_level_e {
  RIG_METER_NONE = 0, RIG_METER_SWR = (1<<0), RIG_METER_COMP = (1<<1), RIG_METER_ALC = (1<<2),
  RIG_METER_IC = (1<<3), RIG_METER_DB = (1<<4), RIG_METER_PO = (1<<5), RIG_METER_VDD = (1<<6)
}
 Level display meters.
enum  rig_level_e {
  RIG_LEVEL_NONE = 0, RIG_LEVEL_PREAMP = (1<<0), RIG_LEVEL_ATT = (1<<1), RIG_LEVEL_VOX = (1<<2),
  RIG_LEVEL_AF = (1<<3), RIG_LEVEL_RF = (1<<4), RIG_LEVEL_SQL = (1<<5), RIG_LEVEL_IF = (1<<6),
  RIG_LEVEL_APF = (1<<7), RIG_LEVEL_NR = (1<<8), RIG_LEVEL_PBT_IN = (1<<9), RIG_LEVEL_PBT_OUT = (1<<10),
  RIG_LEVEL_CWPITCH = (1<<11), RIG_LEVEL_RFPOWER = (1<<12), RIG_LEVEL_MICGAIN = (1<<13), RIG_LEVEL_KEYSPD = (1<<14),
  RIG_LEVEL_NOTCHF = (1<<15), RIG_LEVEL_COMP = (1<<16), RIG_LEVEL_AGC = (1<<17), RIG_LEVEL_BKINDL = (1<<18),
  RIG_LEVEL_BALANCE = (1<<19), RIG_LEVEL_METER = (1<<20), RIG_LEVEL_VOXGAIN = (1<<21), RIG_LEVEL_VOXDELAY = RIG_LEVEL_VOX,
  RIG_LEVEL_ANTIVOX = (1<<22), RIG_LEVEL_SLOPE_LOW = (1<<23), RIG_LEVEL_SLOPE_HIGH = (1<<24), RIG_LEVEL_BKIN_DLYMS = (1<<25),
  RIG_LEVEL_RAWSTR = (1<<26), RIG_LEVEL_SQLSTAT = (1<<27), RIG_LEVEL_SWR = (1<<28), RIG_LEVEL_ALC = (1<<29),
  RIG_LEVEL_STRENGTH = (1<<30)
}
 Rig Level Settings. More...
enum  rig_parm_e {
  RIG_PARM_NONE = 0, RIG_PARM_ANN = (1<<0), RIG_PARM_APO = (1<<1), RIG_PARM_BACKLIGHT = (1<<2),
  RIG_PARM_BEEP = (1<<4), RIG_PARM_TIME = (1<<5), RIG_PARM_BAT = (1<<6), RIG_PARM_KEYLIGHT = (1<<7)
}
 Rig Parameters. More...
enum  rig_func_e {
  RIG_FUNC_NONE = 0, RIG_FUNC_FAGC = (1<<0), RIG_FUNC_NB = (1<<1), RIG_FUNC_COMP = (1<<2),
  RIG_FUNC_VOX = (1<<3), RIG_FUNC_TONE = (1<<4), RIG_FUNC_TSQL = (1<<5), RIG_FUNC_SBKIN = (1<<6),
  RIG_FUNC_FBKIN = (1<<7), RIG_FUNC_ANF = (1<<8), RIG_FUNC_NR = (1<<9), RIG_FUNC_AIP = (1<<10),
  RIG_FUNC_APF = (1<<11), RIG_FUNC_MON = (1<<12), RIG_FUNC_MN = (1<<13), RIG_FUNC_RF = (1<<14),
  RIG_FUNC_ARO = (1<<15), RIG_FUNC_LOCK = (1<<16), RIG_FUNC_MUTE = (1<<17), RIG_FUNC_VSC = (1<<18),
  RIG_FUNC_REV = (1<<19), RIG_FUNC_SQL = (1<<20), RIG_FUNC_ABM = (1<<21), RIG_FUNC_BC = (1<<22),
  RIG_FUNC_MBC = (1<<23), RIG_FUNC_AFC = (1<<25), RIG_FUNC_SATMODE = (1<<26), RIG_FUNC_SCOPE = (1<<27),
  RIG_FUNC_RESUME = (1<<28), RIG_FUNC_TBURST = (1<<29), RIG_FUNC_TUNER = (1<<30)
}
 Rig Function Settings. More...
enum  rmode_t {
  RIG_MODE_NONE = 0, RIG_MODE_AM = (1<<0), RIG_MODE_CW = (1<<1), RIG_MODE_USB = (1<<2),
  RIG_MODE_LSB = (1<<3), RIG_MODE_RTTY = (1<<4), RIG_MODE_FM = (1<<5), RIG_MODE_WFM = (1<<6),
  RIG_MODE_CWR = (1<<7), RIG_MODE_RTTYR = (1<<8), RIG_MODE_AMS = (1<<9), RIG_MODE_PKTLSB = (1<<10),
  RIG_MODE_PKTUSB = (1<<11), RIG_MODE_PKTFM = (1<<12), RIG_MODE_ECSSUSB = (1<<13), RIG_MODE_ECSSLSB = (1<<14),
  RIG_MODE_FAX = (1<<15), RIG_MODE_SAM = (1<<16), RIG_MODE_SAL = (1<<17), RIG_MODE_SAH = (1<<18),
  RIG_MODE_DSB = (1<<19), RIG_MODE_TESTS_MAX
}
 Radio mode. More...
enum  chan_type_t {
  RIG_MTYPE_NONE = 0, RIG_MTYPE_MEM, RIG_MTYPE_EDGE, RIG_MTYPE_CALL,
  RIG_MTYPE_MEMOPAD, RIG_MTYPE_SAT, RIG_MTYPE_BAND, RIG_MTYPE_PRIO
}
 Memory channel type definition. More...

Functions

int rig_token_foreach (RIG *rig, int(*cfunc)(const struct confparams *, char *), char *data)
 call a function against each configuration token of a rig
struct confparamsrig_confparam_lookup (RIG *rig, const char *name)
 lookup a confparam struct
token_t rig_token_lookup (RIG *rig, const char *name)
 lookup a token id
int rig_set_conf (RIG *rig, token_t token, const char *val)
 set a radio configuration parameter
int rig_get_conf (RIG *rig, token_t token, char *val)
 get the value of a configuration parameter
int rig_set_freq_callback (RIG *rig, freq_cb_t cb, char *arg)
 set the callback for freq events
int rig_set_mode_callback (RIG *rig, mode_cb_t cb, char *arg)
 set the callback for mode events
int rig_set_vfo_callback (RIG *rig, vfo_cb_t cb, char *arg)
 set the callback for vfo events
int rig_set_ptt_callback (RIG *rig, ptt_cb_t cb, char *arg)
 set the callback for ptt events
int rig_set_dcd_callback (RIG *rig, dcd_cb_t cb, char *arg)
 set the callback for dcd events
int rig_set_pltune_callback (RIG *rig, pltune_cb_t cb, char *arg)
 set the callback for pipelined tuning module
int rig_set_trn (RIG *rig, int trn)
 control the transceive mode
int rig_get_trn (RIG *rig, int *trn)
 get the current transceive mode
int rig_ext_level_foreach (RIG *rig, int(*cfunc)(RIG *, const struct confparams *, char *), char *data)
 Executes cfunc on all the elements stored in the extlevels table The callback cfunc is called until it returns a value which is not strictly positive. A zero value means a normal end of iteration, and a negative value an abnormal end, which will be the return value of rig_ext_level_foreach.
int rig_ext_parm_foreach (RIG *rig, int(*cfunc)(RIG *, const struct confparams *, char *), char *data)
 Executes cfunc on all the elements stored in the extparms table The callback cfunc is called until it returns a value which is not strictly positive. A zero value means a normal end of iteration, and a negative value an abnormal end, which will be the return value of rig_ext_parm_foreach.
struct confparamsrig_ext_lookup (RIG *rig, const char *name)
 lookup ext token by its name, return pointer to confparams struct.
struct confparamsrig_ext_lookup_tok (RIG *rig, token_t token)
 lookup ext token, return pointer to confparams struct.
token_t rig_ext_token_lookup (RIG *rig, const char *name)
 Simple lookup returning token id assicated with name.
int rig_set_mem (RIG *rig, vfo_t vfo, int ch)
 set the current memory channel number
int rig_get_mem (RIG *rig, vfo_t vfo, int *ch)
 get the current memory channel number
int rig_set_bank (RIG *rig, vfo_t vfo, int bank)
 set the current memory bank
int rig_set_channel (RIG *rig, const channel_t *chan)
 set channel data
int rig_get_channel (RIG *rig, channel_t *chan)
 get channel data
int rig_set_chan_all_cb (RIG *rig, chan_cb_t chan_cb, char *arg)
 set all channel data, by callback
int rig_get_chan_all_cb (RIG *rig, chan_cb_t chan_cb, char *arg)
 get all channel data, by callback
int rig_set_chan_all (RIG *rig, const channel_t chans[])
 set all channel data
int rig_get_chan_all (RIG *rig, channel_t chans[])
 get all channel data
int rig_copy_channel (RIG *rig, channel_t *dest, const channel_t *src)
int rig_set_mem_all_cb (RIG *rig, chan_cb_t chan_cb, confval_cb_t parm_cb, char *arg)
 set all channel and non-channel data by call-back
int rig_get_mem_all_cb (RIG *rig, chan_cb_t chan_cb, confval_cb_t parm_cb, char *arg)
 get all channel and non-channel data by call-back
int rig_set_mem_all (RIG *rig, const channel_t chans[], const struct confparams cfgps[], const value_t vals[])
 set all channel and non-channel data
int rig_get_mem_all (RIG *rig, channel_t chans[], const struct confparams cfgps[], value_t vals[])
 get all channel and non-channel data
const chan_trig_lookup_mem_caps (RIG *rig, int ch)
 lookup the memory type and capabilities
int rig_mem_count (RIG *rig)
 get memory channel count
const char * rigerror (int errnum)
 get string describing the error code
RIGrig_init (rig_model_t rig_model)
 allocate a new RIG handle
int rig_open (RIG *rig)
 open the communication to the rig
int rig_close (RIG *rig)
 close the communication to the rig
int rig_cleanup (RIG *rig)
 release a rig handle and free associated memory
int rig_set_freq (RIG *rig, vfo_t vfo, freq_t freq)
 set the frequency of the target VFO
int rig_get_freq (RIG *rig, vfo_t vfo, freq_t *freq)
 get the frequency of the target VFO
int rig_set_mode (RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
 set the mode of the target VFO
int rig_get_mode (RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
 get the mode of the target VFO
pbwidth_t rig_passband_normal (RIG *rig, rmode_t mode)
 get the normal passband of a mode
pbwidth_t rig_passband_narrow (RIG *rig, rmode_t mode)
 get the narrow passband of a mode
pbwidth_t rig_passband_wide (RIG *rig, rmode_t mode)
 get the wide passband of a mode
int rig_set_vfo (RIG *rig, vfo_t vfo)
 set the current VFO
int rig_get_vfo (RIG *rig, vfo_t *vfo)
 get the current VFO
int rig_set_ptt (RIG *rig, vfo_t vfo, ptt_t ptt)
 set PTT on/off
int rig_get_ptt (RIG *rig, vfo_t vfo, ptt_t *ptt)
 get the status of the PTT
int rig_get_dcd (RIG *rig, vfo_t vfo, dcd_t *dcd)
 get the status of the DCD
int rig_set_rptr_shift (RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
 set the repeater shift
int rig_get_rptr_shift (RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
 get the current repeater shift
int rig_set_rptr_offs (RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
 set the repeater offset
int rig_get_rptr_offs (RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs)
 get the current repeater offset
int rig_set_split_freq (RIG *rig, vfo_t vfo, freq_t tx_freq)
 set the split frequencies
int rig_get_split_freq (RIG *rig, vfo_t vfo, freq_t *tx_freq)
 get the current split frequencies
int rig_set_split_mode (RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
 set the split modes
int rig_get_split_mode (RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width)
 get the current split modes
int rig_set_split_vfo (RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
 set the split mode
int rig_get_split_vfo (RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo)
 get the current split mode
int rig_set_rit (RIG *rig, vfo_t vfo, shortfreq_t rit)
 set the RIT
int rig_get_rit (RIG *rig, vfo_t vfo, shortfreq_t *rit)
 get the current RIT offset
int rig_set_xit (RIG *rig, vfo_t vfo, shortfreq_t xit)
 set the XIT
int rig_get_xit (RIG *rig, vfo_t vfo, shortfreq_t *xit)
 get the current XIT offset
int rig_set_ts (RIG *rig, vfo_t vfo, shortfreq_t ts)
 set the Tuning Step
int rig_get_ts (RIG *rig, vfo_t vfo, shortfreq_t *ts)
 get the current Tuning Step
int rig_set_ant (RIG *rig, vfo_t vfo, ant_t ant)
 set the antenna
int rig_get_ant (RIG *rig, vfo_t vfo, ant_t *ant)
 get the current antenna
int rig_power2mW (RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode)
 conversion utility from relative range to absolute in mW
int rig_mW2power (RIG *rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode)
 conversion utility from absolute in mW to relative range
shortfreq_t rig_get_resolution (RIG *rig, rmode_t mode)
 get the best frequency resolution of the rig
int rig_set_powerstat (RIG *rig, powerstat_t status)
 turn on/off the radio
int rig_get_powerstat (RIG *rig, powerstat_t *status)
 get the on/off status of the radio
int rig_reset (RIG *rig, reset_t reset)
 reset the radio
int rig_probe_first (hamlib_port_t *p)
int rig_probe_all_backends (hamlib_port_t *p, rig_probe_func_t cfunc, char *data)
rig_model_t rig_probe (hamlib_port_t *port)
 try to guess a rig
int rig_probe_all (hamlib_port_t *port, rig_probe_func_t cfunc, char *data)
 try to guess rigs
vfo_op_t rig_has_vfo_op (RIG *rig, vfo_op_t op)
 check retrieval ability of VFO operations
int rig_vfo_op (RIG *rig, vfo_t vfo, vfo_op_t op)
 perform Memory/VFO operations
scan_t rig_has_scan (RIG *rig, scan_t scan)
 check availability of scanning functions
int rig_scan (RIG *rig, vfo_t vfo, scan_t scan, int ch)
 perform Memory/VFO operations
int rig_send_dtmf (RIG *rig, vfo_t vfo, const char *digits)
 send DTMF digits
int rig_recv_dtmf (RIG *rig, vfo_t vfo, char *digits, int *length)
 receive DTMF digits
int rig_send_morse (RIG *rig, vfo_t vfo, const char *msg)
 send morse code
const freq_range_trig_get_range (const freq_range_t range_list[], freq_t freq, rmode_t mode)
 find the freq_range of freq/mode
const char * rig_get_info (RIG *rig)
 get general information from the radio
int rig_set_level (RIG *rig, vfo_t vfo, setting_t level, value_t val)
 set a radio level setting
int rig_get_level (RIG *rig, vfo_t vfo, setting_t level, value_t *val)
 get the value of a level
int rig_set_parm (RIG *rig, setting_t parm, value_t val)
 set a radio parameter
int rig_get_parm (RIG *rig, setting_t parm, value_t *val)
 get the value of a parameter
setting_t rig_has_get_level (RIG *rig, setting_t level)
 check retrieval ability of level settings
setting_t rig_has_set_level (RIG *rig, setting_t level)
 check settable ability of level settings
setting_t rig_has_get_parm (RIG *rig, setting_t parm)
 check retrieval ability of parameter settings
setting_t rig_has_set_parm (RIG *rig, setting_t parm)
 check settable ability of parameter settings
setting_t rig_has_get_func (RIG *rig, setting_t func)
 check ability of radio functions
setting_t rig_has_set_func (RIG *rig, setting_t func)
 check ability of radio functions
int rig_set_func (RIG *rig, vfo_t vfo, setting_t func, int status)
 activate/de-activate functions of radio
int rig_get_func (RIG *rig, vfo_t vfo, setting_t func, int *status)
 get the status of functions of the radio
int rig_set_ext_level (RIG *rig, vfo_t vfo, token_t token, value_t val)
 set a radio level extra parameter
int rig_get_ext_level (RIG *rig, vfo_t vfo, token_t token, value_t *val)
 get the value of a level extra parameter
int rig_set_ext_parm (RIG *rig, token_t token, value_t val)
 set a radio parm extra parameter
int rig_get_ext_parm (RIG *rig, token_t token, value_t *val)
 get the value of a parm extra parameter
int rig_setting2idx (setting_t s)
 basically convert setting_t expressed 2^n to n
int rig_set_ctcss_tone (RIG *rig, vfo_t vfo, tone_t tone)
 set CTCSS sub-tone frequency
int rig_get_ctcss_tone (RIG *rig, vfo_t vfo, tone_t *tone)
 get the current CTCSS sub-tone frequency
int rig_set_dcs_code (RIG *rig, vfo_t vfo, tone_t code)
 set the current encoding DCS code
int rig_get_dcs_code (RIG *rig, vfo_t vfo, tone_t *code)
 get the current encoding DCS code
int rig_set_ctcss_sql (RIG *rig, vfo_t vfo, tone_t tone)
 set CTCSS squelch
int rig_get_ctcss_sql (RIG *rig, vfo_t vfo, tone_t *tone)
 get the current CTCSS squelch
int rig_set_dcs_sql (RIG *rig, vfo_t vfo, tone_t code)
 set the current DCS code
int rig_get_dcs_sql (RIG *rig, vfo_t vfo, tone_t *code)
 get the current DCS code
RIGrig_init ()
int rig_open ()
int rig_set_freq ()
int rig_get_freq ()
int rig_set_mode ()
int rig_get_mode ()
int rig_set_vfo ()
int rig_get_vfo ()
int rig_set_ptt ()
int rig_get_ptt ()
int rig_get_dcd ()
int rig_set_rptr_shift ()
int rig_get_rptr_shift ()
int rig_set_rptr_offs ()
int rig_get_rptr_offs ()
int rig_set_ctcss_tone ()
int rig_get_ctcss_tone ()
int rig_set_dcs_code ()
int rig_get_dcs_code ()
int rig_set_ctcss_sql ()
int rig_get_ctcss_sql ()
int rig_set_dcs_sql ()
int rig_get_dcs_sql ()
int rig_set_split_freq ()
int rig_get_split_freq ()
int rig_set_split_mode ()
int rig_get_split_mode ()
int rig_set_split_vfo ()
int rig_get_split_vfo ()
int rig_set_rit ()
int rig_get_rit ()
int rig_set_xit ()
int rig_get_xit ()
int rig_set_ts ()
int rig_get_ts ()
int rig_power2mW ()
int rig_mW2power ()
shortfreq_t rig_get_resolution ()
int rig_set_level ()
int rig_get_level ()
int rig_set_parm ()
int rig_get_parm ()
int rig_set_conf ()
int rig_get_conf ()
int rig_set_powerstat ()
int rig_get_powerstat ()
int rig_reset ()
int rig_set_ext_level ()
int rig_get_ext_level ()
int rig_set_ext_parm ()
int rig_get_ext_parm ()
int rig_ext_level_foreach ()
int rig_ext_parm_foreach ()
struct confparamsrig_ext_lookup ()
struct confparamsrig_ext_lookup_tok ()
token_t rig_ext_token_lookup ()
int rig_token_foreach ()
struct confparamsrig_confparam_lookup ()
token_t rig_token_lookup ()
int rig_close ()
int rig_cleanup ()
int rig_set_ant ()
int rig_get_ant ()
setting_t rig_has_get_level ()
setting_t rig_has_set_level ()
setting_t rig_has_get_parm ()
setting_t rig_has_set_parm ()
setting_t rig_has_get_func ()
setting_t rig_has_set_func ()
int rig_set_func ()
int rig_get_func ()
int rig_send_dtmf ()
int rig_recv_dtmf ()
int rig_send_morse ()
int rig_set_bank ()
int rig_set_mem ()
int rig_get_mem ()
int rig_vfo_op ()
vfo_op_t rig_has_vfo_op ()
int rig_scan ()
scan_t rig_has_scan ()
int rig_set_channel ()
int rig_get_channel ()
int rig_set_chan_all ()
int rig_get_chan_all ()
int rig_set_chan_all_cb ()
int rig_get_chan_all_cb ()
int rig_set_mem_all_cb ()
int rig_get_mem_all_cb ()
int rig_set_mem_all ()
int rig_get_mem_all ()
const chan_trig_lookup_mem_caps ()
int rig_mem_count ()
int rig_set_trn ()
int rig_get_trn ()
int rig_set_freq_callback ()
int rig_set_mode_callback ()
int rig_set_vfo_callback ()
int rig_set_ptt_callback ()
int rig_set_dcd_callback ()
int rig_set_pltune_callback ()
const char * rig_get_info ()
struct rig_capsrig_get_caps ()
const freq_range_trig_get_range ()
pbwidth_t rig_passband_normal ()
pbwidth_t rig_passband_narrow ()
pbwidth_t rig_passband_wide ()
const char * rigerror ()
int rig_setting2idx ()
void rig_set_debug ()
int rig_need_debug ()
void rig_debug ()
vprintf_cb_t rig_set_debug_callback ()
FILE * rig_set_debug_file ()
int rig_register ()
int rig_unregister ()
int rig_list_foreach ()
int rig_load_backend ()
int rig_check_backend ()
int rig_load_all_backends ()
int rig_probe_all ()
rig_model_t rig_probe ()
const char * rig_strrmode (rmode_t mode)
 Convert enum RIG_MODE to alpha string.
const char * rig_strvfo (vfo_t vfo)
 Convert enum RIG_VFO_... to alpha string.
const char * rig_strfunc (setting_t)
 Convert enum RIG_FUNC_... to alpha string.
const char * rig_strlevel (setting_t)
 Convert enum RIG_LEVEL_... to alpha string.
const char * rig_strparm (setting_t)
 Convert enum RIG_PARM_... to alpha string.
const char * rig_strptrshift (rptr_shift_t)
 convert enum RIG_RPT_SHIFT_... to printable character
const char * rig_strvfop (vfo_op_t op)
 Convert enum RIG_OP_... to alpha string.
const char * rig_strscan (scan_t scan)
 Convert enum RIG_SCAN_... to alpha string.
const char * rig_strstatus (enum rig_status_e status)
 Convert enum RIG_STATUS_... to printable string.
const char * rig_strmtype (chan_type_t mtype)
 Convert enum RIG_MTYPE_... to alpha string.
rmode_t rig_parse_mode (const char *s)
 Convert alpha string to enum RIG_MODE.
vfo_t rig_parse_vfo (const char *s)
 Convert alpha string to enum RIG_VFO_...
setting_t rig_parse_func (const char *s)
 Convert alpha string to enum RIG_FUNC_...
setting_t rig_parse_level (const char *s)
 Convert alpha string to enum RIG_LEVEL_...
setting_t rig_parse_parm (const char *s)
 Convert alpha string to RIG_PARM_...
vfo_op_t rig_parse_vfo_op (const char *s)
 Convert alpha string to enum RIG_OP_...
scan_t rig_parse_scan (const char *s)
 Convert alpha string to enum RIG_SCAN_...
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_...

Variables

const char hamlib_version [21] = "Hamlib " PACKAGE_VERSION
 Hamlib release number The version number has the format x.y.z.
const char hamlib_copyright [231] = "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
 Hamlib copyright notice.
const tone_t full_ctcss_list [] = { 600, 670, 693, 719, 744, 770, 797, 825, 854, 885, 915, 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1200, 1230, 1273, 1318, 1365, 1413, 1462, 1514, 1567, 1598, 1622, 1655, 1679, 1713, 1738, 1773, 1799, 1835, 1862, 1899, 1928, 1966, 1995, 2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, 0, }
const tone_t common_ctcss_list [] = { 670, 693, 719, 744, 770, 797, 825, 854, 885, 915, 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, 1318, 1365, 1413, 1462, 1514, 1567, 1598, 1622, 1655, 1679, 1713, 1738, 1773, 1799, 1835, 1862, 1899, 1928, 1966, 1995, 2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, 0, }
const tone_t common_dcs_list [] = { 23, 25, 26, 31, 32, 36, 43, 47, 51, 53, 54, 65, 71, 72, 73, 74, 114, 115, 116, 122, 125, 131, 132, 134, 143, 145, 152, 155, 156, 162, 165, 172, 174, 205, 212, 223, 225, 226, 243, 244, 245, 246, 251, 252, 255, 261, 263, 265, 266, 271, 274, 306, 311, 315, 325, 331, 332, 343, 346, 351, 356, 364, 365, 371, 411, 412, 413, 423, 431, 432, 445, 446, 452, 454, 455, 462, 464, 465, 466, 503, 506, 516, 523, 526, 532, 546, 565, 606, 612, 624, 627, 631, 632, 654, 662, 664, 703, 712, 723, 731, 732, 734, 743, 754, 0, }
const tone_t full_dcs_list [] = { 17, 23, 25, 26, 31, 32, 36, 43, 47, 50, 51, 53, 54, 65, 71, 72, 73, 74, 114, 115, 116, 122, 125, 131, 132, 134, 143, 145, 152, 155, 156, 162, 165, 172, 174, 205, 212, 223, 225, 226, 243, 244, 245, 246, 251, 252, 255, 261, 263, 265, 266, 271, 274, 306, 311, 315, 325, 331, 332, 343, 346, 351, 356, 364, 365, 371, 411, 412, 413, 423, 431, 432, 445, 446, 452, 454, 455, 462, 464, 465, 466, 503, 506, 516, 523, 526, 532, 546, 565, 606, 612, 624, 627, 631, 632, 654, 662, 664, 703, 712, 723, 731, 732, 734, 743, 754, 0, }
const char hamlib_version []
 Hamlib release number The version number has the format x.y.z.
const char hamlib_copyright []
 Hamlib copyright notice.

Detailed Description

Define groups for Doxygen

Rig (radio) interface

For us, a "rig" is an item of general remote controllable radio equipment. Generally, there are a VFO settings, gain controls, etc.


Typedef Documentation

typedef struct cal_table cal_table_t

calibration table type

cal_table_t is a data type suited to hold linear calibration. cal_table_t.size tells the number of plots cal_table_t.table contains.

If a value is below or equal to cal_table_t.table[0].raw, rig_raw2val() will return cal_table_t.table[0].val.

If a value is greater or equal to cal_table_t.table[cal_table_t.size-1].raw, rig_raw2val() will return cal_table_t.table[cal_table_t.size-1].val.

typedef struct freq_range_list freq_range_t

Frequency range.

Put together a group of this struct in an array to define what frequencies your rig has access to.

Passband width, in Hz.

See also:
rig_passband_normal, rig_passband_narrow, rig_passband_wide
typedef unsigned long setting_t

Setting.

This can be a func, a level or a parm. Each bit designates one of them.

typedef unsigned int tone_t

CTCSS and DCS type definition.

Continuous Tone Controlled Squelch System (CTCSS) sub-audible tone frequency are expressed in tenth of Hz. For example, the subaudible tone of 88.5 Hz is represented within Hamlib by 885.

Digitally-Coded Squelch codes are simple direct integers.

typedef int vfo_t

VFO definition.

There are several ways of using a vfo_t. For most cases, using RIG_VFO_A, RIG_VFO_B, RIG_VFO_CURR, etc., as opaque macros should suffice.

Strictly speaking a VFO is Variable Frequency Oscillator. Here, it is referred as a tunable channel, from the radio operator's point of view. The channel can be designated individually by its real number, or by using an alias.

Aliases may or may not be honored by a backend and are defined using high significant bits, i.e. RIG_VFO_MEM, RIG_VFO_MAIN, etc.


Enumeration Type Documentation

AGC delay settings.

Enumerator:
RIG_AGC_USER 

user selectable

enum ann_t

Announce.

Designate optional speech synthesizer.

Enumerator:
RIG_ANN_NONE 

None

RIG_ANN_OFF 

disable announces

RIG_ANN_FREQ 

Announce frequency

RIG_ANN_RXMODE 

Announce receive mode

RIG_ANN_CW 

CW

RIG_ANN_ENG 

English

RIG_ANN_JAP 

Japan

Memory channel type definition.

Definition of memory types. Depending on the type, the content of the memory channel has to be interpreted accordingly. For instance, a RIG_MTYPE_EDGE channel_t will hold only a start or stop frequency.

See also:
chan_list
Enumerator:
RIG_MTYPE_NONE 

None

RIG_MTYPE_MEM 

Regular

RIG_MTYPE_EDGE 

Scan edge

RIG_MTYPE_CALL 

Call channel

RIG_MTYPE_MEMOPAD 

Memory pad

RIG_MTYPE_SAT 

Satellite

RIG_MTYPE_BAND 

VFO/Band channel

RIG_MTYPE_PRIO 

Priority channel

enum dcd_e

DCD status.

Enumerator:
RIG_DCD_OFF 

Squelch closed

RIG_DCD_ON 

Squelch open

enum dcd_type_t

DCD type.

See also:
rig_get_dcd
Enumerator:
RIG_DCD_NONE 

No DCD available

RIG_DCD_RIG 

Rig has DCD status support, i.e. rig has get_dcd cap

RIG_DCD_SERIAL_DSR 

DCD status from serial DSR signal

RIG_DCD_SERIAL_CTS 

DCD status from serial CTS signal

RIG_DCD_SERIAL_CAR 

DCD status from serial CD signal

RIG_DCD_PARALLEL 

DCD status from parallel port pin

RIG_DCD_CM108 

DCD status from CM108 vol dn pin

Radio power state.

Enumerator:
RIG_POWER_OFF 

Power off

RIG_POWER_ON 

Power on

RIG_POWER_STANDBY 

Standby

enum ptt_t

PTT status.

Enumerator:
RIG_PTT_OFF 

PTT desactivated

RIG_PTT_ON 

PTT activated

RIG_PTT_ON_MIC 

PTT Mic only, fallbacks on RIG_PTT_ON if unavailable

RIG_PTT_ON_DATA 

PTT Data (Mic-muted), fallbacks on RIG_PTT_ON if unavailable

enum ptt_type_t

PTT type.

See also:
rig_get_ptt
Enumerator:
RIG_PTT_NONE 

No PTT available

RIG_PTT_RIG 

Legacy PTT

RIG_PTT_SERIAL_DTR 

PTT control through serial DTR signal

RIG_PTT_SERIAL_RTS 

PTT control through serial RTS signal

RIG_PTT_PARALLEL 

PTT control through parallel port

RIG_PTT_RIG_MICDATA 

Legacy PTT, supports RIG_PTT_ON_MIC/RIG_PTT_ON_DATA

RIG_PTT_CM108 

PTT control through CM108 GPIO pin

enum reset_t

Reset operation.

Enumerator:
RIG_RESET_NONE 

No reset

RIG_RESET_SOFT 

Software reset

RIG_RESET_VFO 

VFO reset

RIG_RESET_MCALL 

Memory clear

RIG_RESET_MASTER 

Master reset

enum rig_conf_e

parameter types

Used with configuration, parameter and extra-parm tables.

Current internal implementation NUMERIC: val.f or val.i COMBO: val.i, starting from 0. Points to a table of strings or asci stored values. STRING: val.s or val.cs CHECKBUTTON: val.i 0/1

Enumerator:
RIG_CONF_STRING 

String type

RIG_CONF_COMBO 

Combo type

RIG_CONF_NUMERIC 

Numeric type integer or real

RIG_CONF_CHECKBUTTON 

on/off type

RIG_CONF_BUTTON 

Button type

Hamlib debug levels.

REM: Numeric order matters for debug level

See also:
rig_set_debug
Enumerator:
RIG_DEBUG_NONE 

no bug reporting

RIG_DEBUG_BUG 

serious bug

RIG_DEBUG_ERR 

error case (e.g. protocol, memory allocation)

RIG_DEBUG_WARN 

warning

RIG_DEBUG_VERBOSE 

verbose

RIG_DEBUG_TRACE 

tracing

Hamlib error codes Error code definition that can be returned by the Hamlib functions. Unless stated otherwise, Hamlib functions return the negative value of rig_errcode_e definitions in case of error, or 0 when successful.

Enumerator:
RIG_OK 

No error, operation completed sucessfully

RIG_EINVAL 

invalid parameter

RIG_ECONF 

invalid configuration (serial,..)

RIG_ENOMEM 

memory shortage

RIG_ENIMPL 

function not implemented, but will be

RIG_ETIMEOUT 

communication timed out

RIG_EIO 

IO error, including open failed

RIG_EINTERNAL 

Internal Hamlib error, huh!

RIG_EPROTO 

Protocol error

RIG_ERJCTED 

Command rejected by the rig

RIG_ETRUNC 

Command performed, but arg truncated

RIG_ENAVAIL 

function not available

RIG_ENTARGET 

VFO not targetable

RIG_BUSERROR 

Error talking on the bus

RIG_BUSBUSY 

Collision on the bus

RIG_EARG 

NULL RIG handle or any invalid pointer parameter in get arg

RIG_EVFO 

Invalid VFO

RIG_EDOM 

Argument out of domain of func

enum rig_func_e

Rig Function Settings.

Various operating functions supported by a rig.
STRING used in rigctl

See also:
rig_parse_func() rig_strfunc()
Enumerator:
RIG_FUNC_NONE 

'' -- No Function

RIG_FUNC_FAGC 

FAGC -- Fast AGC

RIG_FUNC_NB 

NB -- Noise Blanker

RIG_FUNC_COMP 

COMP -- Speech Compression

RIG_FUNC_VOX 

VOX -- Voice Operated Relay

RIG_FUNC_TONE 

TONE -- CTCSS Tone

RIG_FUNC_TSQL 

TSQL -- CTCSS Activate/De-activate

RIG_FUNC_SBKIN 

SBKIN -- Semi Break-in (CW mode)

RIG_FUNC_FBKIN 

FBKIN -- Full Break-in (CW mode)

RIG_FUNC_ANF 

ANF -- Automatic Notch Filter (DSP)

RIG_FUNC_NR 

NR -- Noise Reduction (DSP)

RIG_FUNC_AIP 

AIP -- RF pre-amp (AIP on Kenwood, IPO on Yaesu, etc.)

RIG_FUNC_APF 

APF -- Auto Passband/Audio Peak Filter

RIG_FUNC_MON 

MON -- Monitor transmitted signal

RIG_FUNC_MN 

MN -- Manual Notch

RIG_FUNC_RF 

RF -- RTTY Filter

RIG_FUNC_ARO 

ARO -- Auto Repeater Offset

RIG_FUNC_LOCK 

LOCK -- Lock

RIG_FUNC_MUTE 

MUTE -- Mute

RIG_FUNC_VSC 

VSC -- Voice Scan Control

RIG_FUNC_REV 

REV -- Reverse transmit and receive frequencies

RIG_FUNC_SQL 

SQL -- Turn Squelch Monitor on/off

RIG_FUNC_ABM 

ABM -- Auto Band Mode

RIG_FUNC_BC 

BC -- Beat Canceller

RIG_FUNC_MBC 

MBC -- Manual Beat Canceller

RIG_FUNC_AFC 

AFC -- Auto Frequency Control ON/OFF

RIG_FUNC_SATMODE 

SATMODE -- Satellite mode ON/OFF

RIG_FUNC_SCOPE 

SCOPE -- Simple bandscope ON/OFF

RIG_FUNC_RESUME 

RESUME -- Scan auto-resume

RIG_FUNC_TBURST 

TBURST -- 1750 Hz tone burst

RIG_FUNC_TUNER 

TUNER -- Enable automatic tuner

Rig Level Settings.

Various operating levels supported by a rig.
STRING used in rigctl

See also:
rig_parse_level() rig_strlevel()
Enumerator:
RIG_LEVEL_NONE 

'' -- No Level

RIG_LEVEL_PREAMP 

PREAMP -- Preamp, arg int (dB)

RIG_LEVEL_ATT 

ATT -- Attenuator, arg int (dB)

RIG_LEVEL_VOX 

VOX -- VOX delay, arg int (tenth of seconds)

RIG_LEVEL_AF 

AF -- Volume, arg float [0.0 ... 1.0]

RIG_LEVEL_RF 

RF -- RF gain (not TX power), arg float [0.0 ... 1.0]

RIG_LEVEL_SQL 

SQL -- Squelch, arg float [0.0 ... 1.0]

RIG_LEVEL_IF 

IF -- IF, arg int (Hz)

RIG_LEVEL_APF 

APF -- Audio Peak Filter, arg float [0.0 ... 1.0]

RIG_LEVEL_NR 

NR -- Noise Reduction, arg float [0.0 ... 1.0]

RIG_LEVEL_PBT_IN 

PBT_IN -- Twin PBT (inside), arg float [0.0 ... 1.0]

RIG_LEVEL_PBT_OUT 

PBT_OUT -- Twin PBT (outside), arg float [0.0 ... 1.0]

RIG_LEVEL_CWPITCH 

CWPITCH -- CW pitch, arg int (Hz)

RIG_LEVEL_RFPOWER 

RFPOWER -- RF Power, arg float [0.0 ... 1.0]

RIG_LEVEL_MICGAIN 

MICGAIN -- MIC Gain, arg float [0.0 ... 1.0]

RIG_LEVEL_KEYSPD 

KEYSPD -- Key Speed, arg int (WPM)

RIG_LEVEL_NOTCHF 

NOTCHF -- Notch Freq., arg int (Hz)

RIG_LEVEL_COMP 

COMP -- Compressor, arg float [0.0 ... 1.0]

RIG_LEVEL_AGC 

AGC -- AGC, arg int (see enum agc_level_e)

RIG_LEVEL_BKINDL 

BKINDL -- BKin Delay, arg int (tenth of dots)

RIG_LEVEL_BALANCE 

BAL -- Balance (Dual Watch), arg float [0.0 ... 1.0]

RIG_LEVEL_METER 

METER -- Display meter, arg int (see enum meter_level_e)

RIG_LEVEL_VOXGAIN 

VOXGAIN -- VOX gain level, arg float [0.0 ... 1.0]

RIG_LEVEL_VOXDELAY 

Synonym of RIG_LEVEL_VOX

RIG_LEVEL_ANTIVOX 

ANTIVOX -- anti-VOX level, arg float [0.0 ... 1.0]

RIG_LEVEL_SLOPE_LOW 

SLOPE_LOW -- Slope tune, low frequency cut,

RIG_LEVEL_SLOPE_HIGH 

SLOPE_HIGH -- Slope tune, high frequency cut,

RIG_LEVEL_BKIN_DLYMS 

BKIN_DLYMS -- BKin Delay, arg int Milliseconds These ones are not settable

RIG_LEVEL_RAWSTR 

RAWSTR -- Raw (A/D) value for signal strength, specific to each rig, arg int

RIG_LEVEL_SQLSTAT 

SQLSTAT -- SQL status, arg int (open=1/closed=0). Deprecated, use get_dcd instead

RIG_LEVEL_SWR 

SWR -- SWR, arg float [0.0 ... infinite]

RIG_LEVEL_ALC 

ALC -- ALC, arg float

RIG_LEVEL_STRENGTH 

STRENGTH -- Effective (calibrated) signal strength relative to S9, arg int (dB) Bandwidth Control, arg int (Hz)

enum rig_parm_e

Rig Parameters.

Parameters are settings that are not VFO specific.
STRING used in rigctl

See also:
rig_parse_parm() rig_strparm()
Enumerator:
RIG_PARM_NONE 

'' -- No Parm

RIG_PARM_ANN 

ANN -- "Announce" level, see ann_t

RIG_PARM_APO 

APO -- Auto power off, int in minute

RIG_PARM_BACKLIGHT 

BACKLIGHT -- LCD light, float [0.0 ... 1.0]

RIG_PARM_BEEP 

BEEP -- Beep on keypressed, int (0,1)

RIG_PARM_TIME 

TIME -- hh:mm:ss, int in seconds from 00:00:00

RIG_PARM_BAT 

BAT -- battery level, float [0.0 ... 1.0]

RIG_PARM_KEYLIGHT 

KEYLIGHT -- Button backlight, on/off

enum rig_port_e

Port type.

Enumerator:
RIG_PORT_NONE 

No port

RIG_PORT_SERIAL 

Serial

RIG_PORT_NETWORK 

Network socket type

RIG_PORT_DEVICE 

Device driver, like the WiNRADiO

RIG_PORT_PACKET 

AX.25 network type, e.g. SV8CS protocol

RIG_PORT_DTMF 

DTMF protocol bridge via another rig, eg. Kenwood Sky Cmd System

RIG_PORT_ULTRA 

IrDA Ultra protocol!

RIG_PORT_RPC 

RPC wrapper

RIG_PORT_PARALLEL 

Parallel port

RIG_PORT_USB 

USB port

RIG_PORT_UDP_NETWORK 

UDP Network socket type

RIG_PORT_CM108 

CM108 GPIO

Development status of the backend.

Enumerator:
RIG_STATUS_ALPHA 

Alpha quality, i.e. development

RIG_STATUS_UNTESTED 

Written from available specs, rig unavailable for test, feedback wanted!

RIG_STATUS_BETA 

Beta quality

RIG_STATUS_STABLE 

Stable

RIG_STATUS_BUGGY 

Was stable, but something broke it!

enum rig_type_t

Rig type flags.

Enumerator:
RIG_FLAG_RECEIVER 

Receiver

RIG_FLAG_TRANSMITTER 

Transmitter

RIG_FLAG_SCANNER 

Scanner

RIG_FLAG_MOBILE 

mobile sized

RIG_FLAG_HANDHELD 

handheld sized

RIG_FLAG_COMPUTER 

"Computer" rig

RIG_FLAG_TRUNKING 

has trunking

RIG_FLAG_APRS 

has APRS

RIG_FLAG_TNC 

has TNC

RIG_FLAG_DXCLUSTER 

has DXCluster

RIG_FLAG_TUNER 

dumb tuner

enum rmode_t

Radio mode.

Various modes supported by a rig.
STRING used in rigctl

See also:
rig_parse_mode() rig_strrmode()
Enumerator:
RIG_MODE_NONE 

'' -- None

RIG_MODE_AM 

AM -- Amplitude Modulation

RIG_MODE_CW 

CW -- CW "normal" sideband

RIG_MODE_USB 

USB -- Upper Side Band

RIG_MODE_LSB 

LSB -- Lower Side Band

RIG_MODE_RTTY 

RTTY -- Radio Teletype

RIG_MODE_FM 

FM -- "narrow" band FM

RIG_MODE_WFM 

WFM -- broadcast wide FM

RIG_MODE_CWR 

CWR -- CW "reverse" sideband

RIG_MODE_RTTYR 

RTTYR -- RTTY "reverse" sideband

RIG_MODE_AMS 

AMS -- Amplitude Modulation Synchronous

RIG_MODE_PKTLSB 

PKTLSB -- Packet/Digital LSB mode (dedicated port)

RIG_MODE_PKTUSB 

PKTUSB -- Packet/Digital USB mode (dedicated port)

RIG_MODE_PKTFM 

PKTFM -- Packet/Digital FM mode (dedicated port)

RIG_MODE_ECSSUSB 

ECSSUSB -- Exalted Carrier Single Sideband USB

RIG_MODE_ECSSLSB 

ECSSLSB -- Exalted Carrier Single Sideband LSB

RIG_MODE_FAX 

FAX -- Facsimile Mode

RIG_MODE_SAM 

SAM -- Synchronous AM double sideband

RIG_MODE_SAL 

SAL -- Synchronous AM lower sideband

RIG_MODE_SAH 

SAH -- Synchronous AM upper (higher) sideband

RIG_MODE_DSB 

DSB -- Double sideband suppressed carrier

RIG_MODE_TESTS_MAX 

MUST ALWAYS BE LAST, Max Count for dumpcaps.c

Repeater shift type.

Enumerator:
RIG_RPT_SHIFT_NONE 

No repeater shift

RIG_RPT_SHIFT_MINUS 

"-" shift

RIG_RPT_SHIFT_PLUS 

"+" shift

enum scan_t

Rig Scan operation.

Various scan operations supported by a rig.
STRING used in rigctl

See also:
rig_parse_scan() rig_strscan()
Enumerator:
RIG_SCAN_NONE 

'' No Scan

RIG_SCAN_STOP 

STOP -- Stop scanning

RIG_SCAN_MEM 

MEM -- Scan all memory channels

RIG_SCAN_SLCT 

SLCT -- Scan all selected memory channels

RIG_SCAN_PRIO 

PRIO -- Priority watch (mem or call channel)

RIG_SCAN_PROG 

PROG -- Programmed(edge) scan

RIG_SCAN_DELTA 

DELTA -- delta-f scan

RIG_SCAN_VFO 

VFO -- most basic scan

RIG_SCAN_PLT 

PLT -- Scan using pipelined tuning

Serial control state.

Enumerator:
RIG_SIGNAL_UNSET 

Unset or tri-state

RIG_SIGNAL_ON 

ON

RIG_SIGNAL_OFF 

OFF

Serial handshake.

Enumerator:
RIG_HANDSHAKE_NONE 

No handshake

RIG_HANDSHAKE_XONXOFF 

Software XON/XOFF

RIG_HANDSHAKE_HARDWARE 

Hardware CTS/RTS

Serial parity.

Enumerator:
RIG_PARITY_NONE 

No parity

RIG_PARITY_ODD 

Odd

RIG_PARITY_EVEN 

Even

RIG_PARITY_MARK 

Mark

RIG_PARITY_SPACE 

Space

enum split_t

Split mode.

Enumerator:
RIG_SPLIT_OFF 

Split mode disabled

RIG_SPLIT_ON 

Split mode enabled

enum vfo_op_t

VFO operation.

A VFO operation is an action on a VFO (or tunable memory). The difference with a function is that an action has no on/off status, it is performed at once.

Note: the vfo argument for some vfo operation may be irrelevant, and thus will be ignored.

The VFO/MEM "mode" is set by rig_set_vfo.
STRING used in rigctl

See also:
rig_parse_vfo_op() rig_strvfop()
Enumerator:
RIG_OP_NONE 

'' No VFO_OP

RIG_OP_CPY 

CPY -- VFO A = VFO B

RIG_OP_XCHG 

XCHG -- Exchange VFO A/B

RIG_OP_FROM_VFO 

FROM_VFO -- VFO->MEM

RIG_OP_TO_VFO 

TO_VFO -- MEM->VFO

RIG_OP_MCL 

MCL -- Memory clear

RIG_OP_UP 

UP -- UP increment VFO freq by tuning step

RIG_OP_DOWN 

DOWN -- DOWN decrement VFO freq by tuning step

RIG_OP_BAND_UP 

BAND_UP -- Band UP

RIG_OP_BAND_DOWN 

BAND_DOWN -- Band DOWN

RIG_OP_LEFT 

LEFT -- LEFT

RIG_OP_RIGHT 

RIGHT -- RIGHT

RIG_OP_TUNE 

TUNE -- Start tune

RIG_OP_TOGGLE 

TOGGLE -- Toggle VFOA and VFOB


Function Documentation

int rig_cleanup ( RIG rig)

release a rig handle and free associated memory

Parameters:
rigThe RIG handle of the radio to be closed

Releases a rig struct which port has eventualy been closed already with rig_close().

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_init(), rig_close()
Examples:
/tests/testrig.c.
int rig_close ( RIG rig)

close the communication to the rig

Parameters:
rigThe RIG handle of the radio to be closed

Closes communication to a radio which RIG handle has been passed by argument that was previously open with rig_open().

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_cleanup(), rig_open()
Examples:
/tests/testrig.c.
struct confparams* rig_confparam_lookup ( RIG rig,
const char *  name 
) [read]

lookup a confparam struct

Parameters:
rigThe rig handle
nameThe name of the configuration parameter

Lookup conf token by its name.

Returns:
a pointer to the confparams struct if found, otherwise NULL.
int rig_ext_level_foreach ( RIG rig,
int(*)(RIG *, const struct confparams *, char *)  cfunc,
char *  data 
)

Executes cfunc on all the elements stored in the extlevels table The callback cfunc is called until it returns a value which is not strictly positive. A zero value means a normal end of iteration, and a negative value an abnormal end, which will be the return value of rig_ext_level_foreach.

Parameters:
rigThe rig handle
cfunccallback function of each extlevel
datacookie to be passed to cfunc callback
struct confparams* rig_ext_lookup ( RIG rig,
const char *  name 
) [read]

lookup ext token by its name, return pointer to confparams struct.

Parameters:
rig
nameLookup extlevels table first, then fall back to extparms.

Returns NULL if nothing found

TODO: should use Lex to speed it up, strcmp hurts!

struct confparams* rig_ext_lookup_tok ( RIG rig,
token_t  token 
) [read]

lookup ext token, return pointer to confparams struct.

Parameters:
rig
tokenlookup extlevels table first, then fall back to extparms.

Returns NULL if nothing found

int rig_ext_parm_foreach ( RIG rig,
int(*)(RIG *, const struct confparams *, char *)  cfunc,
char *  data 
)

Executes cfunc on all the elements stored in the extparms table The callback cfunc is called until it returns a value which is not strictly positive. A zero value means a normal end of iteration, and a negative value an abnormal end, which will be the return value of rig_ext_parm_foreach.

Parameters:
rigThe rig handle
cfunccallback function of each extparm
datacookie to be passed to cfunc callback
token_t rig_ext_token_lookup ( RIG rig,
const char *  name 
)

Simple lookup returning token id assicated with name.

Parameters:
rig
name
int rig_get_ant ( RIG rig,
vfo_t  vfo,
ant_t ant 
)

get the current antenna

Parameters:
rigThe rig handle
vfoThe target VFO
antThe location where to store the current antenna

Retrieves the current antenna.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_ant()
int rig_get_chan_all ( RIG rig,
channel_t  chans[] 
)

get all channel data

Parameters:
rigThe rig handle
chansThe location where to store all the channel data

Retrieves the data associated with all the memory channels.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_chan_all_cb(), rig_set_chan_all()
int rig_get_chan_all_cb ( RIG rig,
chan_cb_t  chan_cb,
char *  arg 
)

get all channel data, by callback

Parameters:
rigThe rig handle
chan_cbPointer to a callback function to retrieve channel data
argArbitrary argument passed back to chan_cb

Retrieves the data associated with a all the memory channels. This is the prefered method to support clonable rigs.

chan_cb is called first with no data in chan (chan equals NULL). This means the application has to provide a struct where to store future data for channel channel_num. If channel_num == chan->channel_num, the application does not need to provide a new allocated structure.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_chan_all(), rig_set_chan_all_cb()
int rig_get_channel ( RIG rig,
channel_t chan 
)

get channel data

Parameters:
rigThe rig handle
chanThe location where to store the channel data

Retrieves the data associated with a channel. This channel can either be the state of a VFO specified by chan->vfo, or a memory channel specified with chan->vfo = RIG_VFO_MEM and chan->channel_num. See channel_t for more information.

Example:

  channel_t chan;
  int err;

  chan->vfo = RIG_VFO_MEM;
  chan->channel_num = 10;
  err = rig_get_channel(rig, &chan);
  if (err != RIG_OK)
        error("get_channel failed: %s", rigerror(err));

The rig_get_channel is supposed to have no impact on the current VFO and memory number selected. Depending on backend and rig capabilities, the chan struct may not be filled in completely.

Note: chan->ext_levels is a pointer to a newly mallocated memory. This is the responsability of the caller to manage and eventually free it.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_channel()
int rig_get_conf ( RIG rig,
token_t  token,
char *  val 
)

get the value of a configuration parameter

Parameters:
rigThe rig handle
tokenThe parameter
valThe location where to store the value of config token

Retrieves the value of a configuration paramter associated with token. The location pointed to by val must be large enough to hold the value of the config.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_conf()
int rig_get_ctcss_sql ( RIG rig,
vfo_t  vfo,
tone_t tone 
)

get the current CTCSS squelch

Parameters:
rigThe rig handle
vfoThe target VFO
toneThe location where to store the current tone

Retrieves the current Continuous Tone Controlled Squelch System (CTCSS) sub-audible *squelch* tone.

Note:
*tone is NOT in Hz, but in tenth of Hz! This way, if the function rig_get_ctcss_sql() returns a subaudible tone of 885 for example, then the real tone is 88.5 Hz. Also, a value of 0 for tone means the Tone squelch is disabled.
Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_ctcss_sql(), rig_get_ctcss_tone()
int rig_get_ctcss_tone ( RIG rig,
vfo_t  vfo,
tone_t tone 
)

get the current CTCSS sub-tone frequency

Parameters:
rigThe rig handle
vfoThe target VFO
toneThe location where to store the current tone

Retrieves the current Continuous Tone Controlled Squelch System (CTCSS) sub-audible tone frequency.

Note:
the *tone integer is NOT in Hz, but in tenth of Hz! This way, if the function rig_get_ctcss_tone() returns a subaudible tone of 885 for example, then the real tone is 88.5 Hz. Also, a value of 0 for *tone means the Tone encoding is disabled.
Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_ctcss_tone(), rig_get_ctcss_sql()
int rig_get_dcd ( RIG rig,
vfo_t  vfo,
dcd_t dcd 
)

get the status of the DCD

Parameters:
rigThe rig handle
vfoThe target VFO
dcdThe location where to store the status of the DCD

Retrieves the status of DCD (is squelch open?).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
int rig_get_dcs_code ( RIG rig,
vfo_t  vfo,
tone_t code 
)

get the current encoding DCS code

Parameters:
rigThe rig handle
vfoThe target VFO
codeThe location where to store the current tone

Retrieves the current encoding Digitally-Coded Squelch code.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_dcs_code(), rig_get_dcs_sql()
int rig_get_dcs_sql ( RIG rig,
vfo_t  vfo,
tone_t code 
)

get the current DCS code

Parameters:
rigThe rig handle
vfoThe target VFO
codeThe location where to store the current tone

Retrieves the current Digitally-Coded *Squelch* code.

Returns:
RIG_OK if the operation has been sucessful, ortherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_dcs_sql(), rig_get_dcs_code()
int rig_get_ext_level ( RIG rig,
vfo_t  vfo,
token_t  token,
value_t val 
)

get the value of a level extra parameter

Parameters:
rigThe rig handle
vfoThe target VFO
tokenThe parameter
valThe location where to store the value of token

Retrieves the value of a level extra parameter associated with token.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_ext_level()
int rig_get_ext_parm ( RIG rig,
token_t  token,
value_t val 
)

get the value of a parm extra parameter

Parameters:
rigThe rig handle
tokenThe parameter
valThe location where to store the value of token

Retrieves the value of a parm extra parameter associated with token.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_ext_parm()
int rig_get_freq ( RIG rig,
vfo_t  vfo,
freq_t freq 
)

get the frequency of the target VFO

Parameters:
rigThe rig handle
vfoThe target VFO
freqThe location where to store the current frequency

Retrieves the frequency of the target VFO. The value stored at freq location equals RIG_FREQ_NONE when the current frequency of the VFO is not defined (e.g. blank memory).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_freq()
Examples:
/tests/testrig.c.
int rig_get_func ( RIG rig,
vfo_t  vfo,
setting_t  func,
int *  status 
)

get the status of functions of the radio

Parameters:
rigThe rig handle
vfoThe target VFO
funcThe functions to get the status
statusThe location where to store the function status

Retrieves the status (on/off) of a function of the radio. Upon return, status will hold the status of the function, The value pointer to by the status argument is a non null value for "on", "off" otherwise, much as TRUE/FALSE definitions in C language.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_func()
const char* rig_get_info ( RIG rig)

get general information from the radio

Parameters:
rigThe rig handle

Retrieves some general information from the radio. This can include firmware revision, exact model name, or just nothing.

Returns:
a pointer to freshly allocated memory containing the ASCIIZ string if the operation has been sucessful, otherwise NULL if an error occured or get_info not part of capabilities.
int rig_get_level ( RIG rig,
vfo_t  vfo,
setting_t  level,
value_t val 
)

get the value of a level

Parameters:
rigThe rig handle
vfoThe target VFO
levelThe level setting
valThe location where to store the value of level

Retrieves the value of a level. The level value val can be a float or an integer. See value_t for more information.

RIG_LEVEL_STRENGTH: val is an integer, representing the S Meter level in dB relative to S9, according to the ideal S Meter scale. The ideal S Meter scale is as follow: S0=-54, S1=-48, S2=-42, S3=-36, S4=-30, S5=-24, S6=-18, S7=-12, S8=-6, S9=0, +10=10, +20=20, +30=30, +40=40, +50=50 and +60=60. This is the responsability of the backend to return values calibrated for this scale.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_has_get_level(), rig_set_level()
int rig_get_mem ( RIG rig,
vfo_t  vfo,
int *  ch 
)

get the current memory channel number

Parameters:
rigThe rig handle
vfoThe target VFO
chThe location where to store the current memory channel number

Retrieves the current memory channel number. It is not mandatory for the radio to be in memory mode. Actually it depends on rigs. YMMV.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_mem()
int rig_get_mem_all ( RIG rig,
channel_t  chans[],
const struct confparams  cfgps[],
value_t  vals[] 
)

get all channel and non-channel data

Parameters:
rigThe rig handle
chansArray of channels where to store the data
cfgpsArray of config parameters to retrieve
valsArray of values where to store the data

Retrieves the data associated with all the memory channels, and rigs memory parameters. This is the prefered method to support clonable rigs.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_mem_all(), rig_set_mem_all_cb()
Todo:
finish coding and testing of mem_all functions
int rig_get_mem_all_cb ( RIG rig,
chan_cb_t  chan_cb,
confval_cb_t  parm_cb,
char *  arg 
)

get all channel and non-channel data by call-back

Parameters:
rigThe rig handle
chan_cbThe callback for channel data
parm_cbThe callback for non-channel(aka parm) data
argCookie passed to chan_cb and parm_cb

Retrieves the data associated with all the memory channels, and rigs memory parameters, by callback. This is the prefered method to support clonable rigs.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_mem_all_cb(), rig_set_mem_all()
Todo:

get all parm's

finish coding and testing of mem_all functions

int rig_get_mode ( RIG rig,
vfo_t  vfo,
rmode_t mode,
pbwidth_t width 
)

get the mode of the target VFO

Parameters:
rigThe rig handle
vfoThe target VFO
modeThe location where to store the current mode
widthThe location where to store the current passband width

Retrieves the mode and passband of the target VFO. If the backend is unable to determine the width, the width will be set to RIG_PASSBAND_NORMAL as a default. The value stored at mode location equals RIG_MODE_NONE when the current mode of the VFO is not defined (e.g. blank memory).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_mode()
Examples:
/tests/testrig.c.
int rig_get_parm ( RIG rig,
setting_t  parm,
value_t val 
)

get the value of a parameter

Parameters:
rigThe rig handle
parmThe parameter
valThe location where to store the value of parm

Retrieves the value of a parm. The parameter value val can be a float or an integer. See value_t for more information.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_has_get_parm(), rig_set_parm()
int rig_get_powerstat ( RIG rig,
powerstat_t status 
)

get the on/off status of the radio

Parameters:
rigThe rig handle
statusThe locatation where to store the current status

Retrieve the status of the radio. See RIG_POWER_ON, RIG_POWER_OFF and RIG_POWER_STANDBY defines for the status.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_powerstat()
int rig_get_ptt ( RIG rig,
vfo_t  vfo,
ptt_t ptt 
)

get the status of the PTT

Parameters:
rigThe rig handle
vfoThe target VFO
pttThe location where to store the status of the PTT

Retrieves the status of PTT (are we on the air?).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_ptt()
const freq_range_t* rig_get_range ( const freq_range_t  range_list[],
freq_t  freq,
rmode_t  mode 
)

find the freq_range of freq/mode

Parameters:
range_listThe range list to search from
freqThe frequency that will be part of this range
modeThe mode that will be part of this range

Returns a pointer to the freq_range_t including freq and mode. Works for rx and tx range list as well.

Returns:
the location of the freq_range_t if found, otherwise NULL if not found or if range_list is invalid.
shortfreq_t rig_get_resolution ( RIG rig,
rmode_t  mode 
)

get the best frequency resolution of the rig

Parameters:
rigThe rig handle
modeThe mode where the conversion should take place

Returns the best frequency resolution of the rig, for a given mode.

Returns:
the frequency resolution in Hertz if the operation h has been sucessful, otherwise a negative value if an error occured.
int rig_get_rit ( RIG rig,
vfo_t  vfo,
shortfreq_t rit 
)

get the current RIT offset

Parameters:
rigThe rig handle
vfoThe target VFO
ritThe location where to store the current RIT offset

Retrieves the current RIT offset.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_rit()
int rig_get_rptr_offs ( RIG rig,
vfo_t  vfo,
shortfreq_t rptr_offs 
)

get the current repeater offset

Parameters:
rigThe rig handle
vfoThe target VFO
rptr_offsThe location where to store the current repeater offset

Retrieves the current repeater offset.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_rptr_offs()
int rig_get_rptr_shift ( RIG rig,
vfo_t  vfo,
rptr_shift_t rptr_shift 
)

get the current repeater shift

Parameters:
rigThe rig handle
vfoThe target VFO
rptr_shiftThe location where to store the current repeater shift

Retrieves the current repeater shift.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_rptr_shift()
int rig_get_split_freq ( RIG rig,
vfo_t  vfo,
freq_t tx_freq 
)

get the current split frequencies

Parameters:
rigThe rig handle
vfoThe target VFO
tx_freqThe location where to store the current transmit split frequency

Retrieves the current split(TX) frequency.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_split_freq()
int rig_get_split_mode ( RIG rig,
vfo_t  vfo,
rmode_t tx_mode,
pbwidth_t tx_width 
)

get the current split modes

Parameters:
rigThe rig handle
vfoThe target VFO
tx_modeThe location where to store the current transmit split mode
tx_widthThe location where to store the current transmit split width

Retrieves the current split(TX) mode and passband. If the backend is unable to determine the width, the tx_width will be set to RIG_PASSBAND_NORMAL as a default. The value stored at tx_mode location equals RIG_MODE_NONE when the current mode of the VFO is not defined (e.g. blank memory).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_split_mode()
int rig_get_split_vfo ( RIG rig,
vfo_t  vfo,
split_t split,
vfo_t tx_vfo 
)

get the current split mode

Parameters:
rigThe rig handle
vfoThe target VFO
splitThe location where to store the current split mode
tx_vfoThe transmit VFO

Retrieves the current split mode.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_split_vfo()
int rig_get_trn ( RIG rig,
int *  trn 
)

get the current transceive mode

Parameters:
rigThe rig handle
trnThe location where to store the current transceive mode

Retrieves the current status of the transceive mode, i.e. if radio sends new status automatically when some changes happened on the radio.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_trn()
int rig_get_ts ( RIG rig,
vfo_t  vfo,
shortfreq_t ts 
)

get the current Tuning Step

Parameters:
rigThe rig handle
vfoThe target VFO
tsThe location where to store the current tuning step

Retrieves the current tuning step.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_ts()
int rig_get_vfo ( RIG rig,
vfo_t vfo 
)

get the current VFO

Parameters:
rigThe rig handle
vfoThe location where to store the current VFO

Retrieves the current VFO. The VFO can be RIG_VFO_A, RIG_VFO_B, RIG_VFO_C for VFOA, VFOB, VFOC respectively or RIG_VFO_MEM for Memory mode. Supported VFOs depends on rig capabilities.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_vfo()
Examples:
/tests/testrig.c.
int rig_get_xit ( RIG rig,
vfo_t  vfo,
shortfreq_t xit 
)

get the current XIT offset

Parameters:
rigThe rig handle
vfoThe target VFO
xitThe location where to store the current XIT offset

Retrieves the current XIT offset.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_xit()
setting_t rig_has_get_func ( RIG rig,
setting_t  func 
)

check ability of radio functions

Parameters:
rigThe rig handle
funcThe functions

Checks if a rig supports a set of functions. Since the func is an OR'ed bitwise argument, more than one function can be checked at the same time.

EXAMPLE: if (rig_has_get_func(my_rig,RIG_FUNC_FAGC)) disp_fagc_button();

Returns:
a bit map of supported functions, otherwise 0 if none supported.
See also:
rig_has_set_func(), rig_get_func()
setting_t rig_has_get_level ( RIG rig,
setting_t  level 
)

check retrieval ability of level settings

Parameters:
rigThe rig handle
levelThe level settings

Checks if a rig is capable of *getting* a level setting. Since the level is an OR'ed bitwise argument, more than one level can be checked at the same time.

EXAMPLE: if (rig_has_get_level(my_rig, RIG_LVL_STRENGTH)) disp_Smeter();

Returns:
a bit map of supported level settings that can be retrieved, otherwise 0 if none supported.
See also:
rig_has_set_level(), rig_get_level()
setting_t rig_has_get_parm ( RIG rig,
setting_t  parm 
)

check retrieval ability of parameter settings

Parameters:
rigThe rig handle
parmThe parameter settings

Checks if a rig is capable of *getting* a parm setting. Since the parm is an OR'ed bitwise argument, more than one parameter can be checked at the same time.

EXAMPLE: if (rig_has_get_parm(my_rig, RIG_PARM_ANN)) good4you();

Returns:
a bit map of supported parameter settings that can be retrieved, otherwise 0 if none supported.
See also:
rig_has_set_parm(), rig_get_parm()
scan_t rig_has_scan ( RIG rig,
scan_t  scan 
)

check availability of scanning functions

Parameters:
rigThe rig handle
scanThe scan op

Checks if a rig is capable of performing a scan operation. Since the scan parameter is an OR'ed bitmap argument, more than one op can be checked at the same time.

EXAMPLE: if (rig_has_scan(my_rig, RIG_SCAN_PRIO)) disp_SCANprio_btn();

Returns:
a bit map of supported scan settings that can be retrieved, otherwise 0 if none supported.
See also:
rig_scan()
setting_t rig_has_set_func ( RIG rig,
setting_t  func 
)

check ability of radio functions

Parameters:
rigThe rig handle
funcThe functions

Checks if a rig supports a set of functions. Since the func is an OR'ed bitwise argument, more than one function can be checked at the same time.

EXAMPLE: if (rig_has_set_func(my_rig,RIG_FUNC_FAGC)) disp_fagc_button();

Returns:
a bit map of supported functions, otherwise 0 if none supported.
See also:
rig_set_func(), rig_has_get_func()
setting_t rig_has_set_level ( RIG rig,
setting_t  level 
)

check settable ability of level settings

Parameters:
rigThe rig handle
levelThe level settings

Checks if a rig can *set* a level setting. Since the level is an OR'ed bitwise argument, more than one level can be check at the same time.

EXAMPLE: if (rig_has_set_level(my_rig, RIG_LVL_RFPOWER)) crank_tx();

Returns:
a bit map of supported level settings that can be set, otherwise 0 if none supported.
See also:
rig_has_get_level(), rig_set_level()
setting_t rig_has_set_parm ( RIG rig,
setting_t  parm 
)

check settable ability of parameter settings

Parameters:
rigThe rig handle
parmThe parameter settings

Checks if a rig can *set* a parameter setting. Since the parm is an OR'ed bitwise argument, more than one parameter can be check at the same time.

EXAMPLE: if (rig_has_set_parm(my_rig, RIG_PARM_ANN)) announce_all();

Returns:
a bit map of supported parameter settings that can be set, otherwise 0 if none supported.
See also:
rig_has_get_parm(), rig_set_parm()
vfo_op_t rig_has_vfo_op ( RIG rig,
vfo_op_t  op 
)

check retrieval ability of VFO operations

Parameters:
rigThe rig handle
opThe VFO op

Checks if a rig is capable of executing a VFO operation. Since the op is an OR'ed bitmap argument, more than one op can be checked at the same time.

EXAMPLE: if (rig_has_vfo_op(my_rig, RIG_OP_CPY)) disp_VFOcpy_btn();

Returns:
a bit map mask of supported op settings that can be retrieved, otherwise 0 if none supported.
See also:
rig_vfo_op()
RIG* rig_init ( rig_model_t  rig_model)

allocate a new RIG handle

Parameters:
rig_modelThe rig model for this new handle

Allocates a new RIG handle and initializes the associated data for rig_model.

Returns:
a pointer to the RIG handle otherwise NULL if memory allocation failed or rig_model is unknown (e.g. backend autoload failed).
See also:
rig_cleanup(), rig_open()
Examples:
/tests/testrig.c.
const chan_t* rig_lookup_mem_caps ( RIG rig,
int  ch 
)

lookup the memory type and capabilities

Parameters:
rigThe rig handle
chThe memory channel number

Lookup the memory type and capabilities associated with a channel number. If ch equals RIG_MEM_CAPS_ALL, then a union of all the mem_caps sets is returned (pointer to static memory).

Returns:
a pointer to a chan_t structure if the operation has been sucessful, otherwise a NULL pointer, most probably because of incorrect channel number or buggy backend.
int rig_mem_count ( RIG rig)

get memory channel count

Parameters:
rigThe rig handle

Get the total memory channel count, computed from the rig caps

Returns:
the memory count
int rig_mW2power ( RIG rig,
float *  power,
unsigned int  mwpower,
freq_t  freq,
rmode_t  mode 
)

conversion utility from absolute in mW to relative range

Parameters:
rigThe rig handle
powerThe location where to store the converted relative power
mwpowerThe power in mW
freqThe frequency where the conversion should take place
modeThe mode where the conversion should take place

Converts a power value expressed in the real transmit power in milli Watts the radio would emit to a range on a [0.0 .. 1.0] relative scale. The freq and mode where the conversion should take place must be also provided since the relative power is peculiar to a specific freq and mode range of the radio.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_power2mW()
int rig_open ( RIG rig)

open the communication to the rig

Parameters:
rigThe RIG handle of the radio to be opened

Opens communication to a radio which RIG handle has been passed by argument.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
Return values:
RIG_EINVALrig is NULL or unconsistent.
RIG_ENIMPLport type communication is not implemented yet.
See also:
rig_init(), rig_close()
Examples:
/tests/testrig.c.
setting_t rig_parse_func ( const char *  s)

Convert alpha string to enum RIG_FUNC_...

Parameters:
sinput alpha string
Returns:
RIG_FUNC_...
See also:
rig_func_e
setting_t rig_parse_level ( const char *  s)

Convert alpha string to enum RIG_LEVEL_...

Parameters:
sinput alpha string
Returns:
RIG_LEVEL_...
See also:
rig_level_e
rmode_t rig_parse_mode ( const char *  s)

Convert alpha string to enum RIG_MODE.

Parameters:
sinput alpha string
Returns:
enum RIG_MODE_??
See also:
rmode_t
chan_type_t rig_parse_mtype ( const char *  s)

Convert alpha string to enum RIG_MTYPE_...

Parameters:
salpha string
Returns:
RIG_MTYPE_...
See also:
chan_type_t
setting_t rig_parse_parm ( const char *  s)

Convert alpha string to RIG_PARM_...

Parameters:
sinput alpha string
Returns:
RIG_PARM_...
See also:
rig_parm_e
rptr_shift_t rig_parse_rptr_shift ( const char *  s)

Convert alpha char to enum RIG_RPT_SHIFT_...

Parameters:
salpha char
Returns:
RIG_RPT_SHIFT_...
scan_t rig_parse_scan ( const char *  s)

Convert alpha string to enum RIG_SCAN_...

Parameters:
salpha string
Returns:
RIG_SCAN_...
See also:
scan_t
vfo_t rig_parse_vfo ( const char *  s)

Convert alpha string to enum RIG_VFO_...

Parameters:
sinput alpha string
Returns:
RIG_VFO_...
See also:
RIG_VFO_A RIG_VFO_B RIG_VFO_C RIG_VFO_MAIN RIG_VFO_SUB RIG_VFO_VFO RIG_VFO_CURR RIG_VFO_MEM RIG_VFO_TX RIG_VFO_RX RIG_VFO_NONE
vfo_op_t rig_parse_vfo_op ( const char *  s)

Convert alpha string to enum RIG_OP_...

Parameters:
salpha string
Returns:
RIG_OP_...
See also:
vfo_op_t
pbwidth_t rig_passband_narrow ( RIG rig,
rmode_t  mode 
)

get the narrow passband of a mode

Parameters:
rigThe rig handle
modeThe mode to get the passband

Returns the narrow (closest) passband for the given mode. EXAMPLE: rig_set_mode(my_rig, RIG_MODE_LSB, rig_passband_narrow(my_rig, RIG_MODE_LSB) );

Returns:
the passband in Hz if the operation has been sucessful, or a 0 if an error occured (passband not found, whatever).
See also:
rig_passband_normal(), rig_passband_wide()
Examples:
/tests/testrig.c.
pbwidth_t rig_passband_normal ( RIG rig,
rmode_t  mode 
)

get the normal passband of a mode

Parameters:
rigThe rig handle
modeThe mode to get the passband

Returns the normal (default) passband for the given mode.

Returns:
the passband in Hz if the operation has been sucessful, or a 0 if an error occured (passband not found, whatever).
See also:
rig_passband_narrow(), rig_passband_wide()
pbwidth_t rig_passband_wide ( RIG rig,
rmode_t  mode 
)

get the wide passband of a mode

Parameters:
rigThe rig handle
modeThe mode to get the passband

Returns the wide (default) passband for the given mode. EXAMPLE: rig_set_mode(my_rig, RIG_MODE_AM, rig_passband_wide(my_rig, RIG_MODE_AM) );

Returns:
the passband in Hz if the operation has been sucessful, or a 0 if an error occured (passband not found, whatever).
See also:
rig_passband_narrow(), rig_passband_normal()
int rig_power2mW ( RIG rig,
unsigned int *  mwpower,
float  power,
freq_t  freq,
rmode_t  mode 
)

conversion utility from relative range to absolute in mW

Parameters:
rigThe rig handle
mwpowerThe location where to store the converted power in mW
powerThe relative power
freqThe frequency where the conversion should take place
modeThe mode where the conversion should take place

Converts a power value expressed in a range on a [0.0 .. 1.0] relative scale to the real transmit power in milli Watts the radio would emit. The freq and mode where the conversion should take place must be also provided since the relative power is peculiar to a specific freq and mode range of the radio.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_mW2power()

try to guess a rig

Parameters:
portA pointer describing a port linking the host to the rig

Try to guess what is the model of the first rig attached to the port. It can be very buggy, and mess up the radio at the other end. (but fun if it works!)

Warning:
this is really Experimental, It has been tested only with IC-706MkIIG. any feedback welcome! --SF
Returns:
the rig model id according to the rig_model_t type if found, otherwise RIG_MODEL_NONE if unable to determine rig model.
Examples:
/tests/testrig.c.
int rig_probe_all ( hamlib_port_t port,
rig_probe_func_t  cfunc,
char *  data 
)

try to guess rigs

Parameters:
portA pointer describing a port linking the host to the rigs
cfuncFunction to be called each time a rig is found
dataArbitrary data passed to cfunc

Try to guess what are the model of all rigs attached to the port. It can be very buggy, and mess up the radio at the other end. (but fun if it works!)

Warning:
this is really Experimental, It has been tested only with IC-706MkIIG. any feedback welcome! --SF
Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
int rig_recv_dtmf ( RIG rig,
vfo_t  vfo,
char *  digits,
int *  length 
)

receive DTMF digits

Parameters:
rigThe rig handle
vfoThe target VFO
digitsLocation where the digits are to be stored
lengthin: max length of buffer, out: number really read.

Receives DTMF digits (not blocking). See DTMF change speed, etc. (TODO).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
int rig_reset ( RIG rig,
reset_t  reset 
)

reset the radio

Parameters:
rigThe rig handle
resetThe reset operation to perform

Resets the radio. See RIG_RESET_NONE, RIG_RESET_SOFT and RIG_RESET_MCALL defines for the reset.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
int rig_scan ( RIG rig,
vfo_t  vfo,
scan_t  scan,
int  ch 
)

perform Memory/VFO operations

Parameters:
rigThe rig handle
vfoThe target VFO
scanThe scanning operation to perform
chOptional channel argument used for the scan.

Performs scanning operation. See scan_t for more information.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_has_scan()
int rig_send_dtmf ( RIG rig,
vfo_t  vfo,
const char *  digits 
)

send DTMF digits

Parameters:
rigThe rig handle
vfoThe target VFO
digitsDigits to be send

Sends DTMF digits. See DTMF change speed, etc. (TODO).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
int rig_send_morse ( RIG rig,
vfo_t  vfo,
const char *  msg 
)

send morse code

Parameters:
rigThe rig handle
vfoThe target VFO
msgMessage to be sent

Sends morse message. See keyer change speed, etc. (TODO).

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
int rig_set_ant ( RIG rig,
vfo_t  vfo,
ant_t  ant 
)

set the antenna

Parameters:
rigThe rig handle
vfoThe target VFO
antThe anntena to select

Select the antenna connector.

        rig_set_ant(rig, RIG_VFO_CURR, RIG_ANT_1);  // apply to both TX&RX
        rig_set_ant(rig, RIG_VFO_RX, RIG_ANT_2);
Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_ant()
int rig_set_bank ( RIG rig,
vfo_t  vfo,
int  bank 
)

set the current memory bank

Parameters:
rigThe rig handle
vfoThe target VFO
bankThe memory bank

Sets the current memory bank number. It is not mandatory for the radio to be in memory mode. Actually it depends on rigs. YMMV.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_mem()
int rig_set_chan_all ( RIG rig,
const channel_t  chans[] 
)

set all channel data

Parameters:
rigThe rig handle
chansThe location of data to set for all channels

Write the data associated with all the memory channels.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_chan_all_cb(), rig_get_chan_all()
int rig_set_chan_all_cb ( RIG rig,
chan_cb_t  chan_cb,
char *  arg 
)

set all channel data, by callback

Parameters:
rigThe rig handle
chan_cbPointer to a callback function to provide channel data
argArbitrary argument passed back to chan_cb

Write the data associated with a all the memory channels. This is the prefered method to support clonable rigs.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_chan_all(), rig_get_chan_all_cb()
int rig_set_channel ( RIG rig,
const channel_t chan 
)

set channel data

Parameters:
rigThe rig handle
chanThe location of data to set for this channel

Sets the data associated with a channel. This channel can either be the state of a VFO specified by chan->vfo, or a memory channel specified with chan->vfo = RIG_VFO_MEM and chan->channel_num. See channel_t for more information.

The rig_set_channel is supposed to have no impact on the current VFO and memory number selected. Depending on backend and rig capabilities, the chan struct may not be set completely.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_channel()
int rig_set_conf ( RIG rig,
token_t  token,
const char *  val 
)

set a radio configuration parameter

Parameters:
rigThe rig handle
tokenThe parameter
valThe value to set the parameter to

Sets a configuration parameter.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_conf()
int rig_set_ctcss_sql ( RIG rig,
vfo_t  vfo,
tone_t  tone 
)

set CTCSS squelch

Parameters:
rigThe rig handle
vfoThe target VFO
toneThe PL tone to set the squelch to

Sets the current Continuous Tone Controlled Squelch System (CTCSS) sub-audible *squelch* tone.

Note:
tone is NOT in Hz, but in tenth of Hz! This way, if you want to set subaudible squelch tone of 88.5 Hz for example, then pass 885 to this function.

NB: the tone squelch has to be explicitly enabled or disabled through a call to rig_set_func() with arg RIG_FUNC_TSQL, unless it is unavailable and the tone arg has to be set to 0.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_ctcss_sql(), rig_set_ctcss_tone()
int rig_set_ctcss_tone ( RIG rig,
vfo_t  vfo,
tone_t  tone 
)

set CTCSS sub-tone frequency

Parameters:
rigThe rig handle
vfoThe target VFO
toneThe tone to set to

Sets the current Continuous Tone Controlled Squelch System (CTCSS) sub-audible tone frequency.

Note:
the tone integer is NOT in Hz, but in tenth of Hz! This way, if you want to set a subaudible tone of 88.5 Hz for example, then pass 885 to this function.

NB: CTCSS encoding has to be explicitly enabled or disabled through a call to rig_set_func() with arg RIG_FUNC_TONE, unless it is unavailable and the tone arg has to be set to 0.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_ctcss_tone(), rig_set_ctcss_sql()
int rig_set_dcd_callback ( RIG rig,
dcd_cb_t  cb,
char *  arg 
)

set the callback for dcd events

Parameters:
rigThe rig handle
cbThe callback to install
argA Pointer to some private data to pass later on to the callback

Install a callback for dcd events, to be called when in transceive mode.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_trn()
int rig_set_dcs_code ( RIG rig,
vfo_t  vfo,
tone_t  code 
)

set the current encoding DCS code

Parameters:
rigThe rig handle
vfoThe target VFO
codeThe tone to set to

Sets the current encoding Digitally-Coded Squelch code.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_dcs_code(), rig_set_dcs_sql()
int rig_set_dcs_sql ( RIG rig,
vfo_t  vfo,
tone_t  code 
)

set the current DCS code

Parameters:
rigThe rig handle
vfoThe target VFO
codeThe tone to set to

Sets the current Digitally-Coded *Squelch* code.

Returns:
returns RIG_OK if the operation has been sucessful, ortherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_dcs_sql(), rig_set_dcs_code()
int rig_set_ext_level ( RIG rig,
vfo_t  vfo,
token_t  token,
value_t  val 
)

set a radio level extra parameter

Parameters:
rigThe rig handle
vfoThe target VFO
tokenThe parameter
valThe value to set the parameter to

Sets an level extra parameter.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_ext_level()
int rig_set_ext_parm ( RIG rig,
token_t  token,
value_t  val 
)

set a radio parm extra parameter

Parameters:
rigThe rig handle
tokenThe parameter
valThe value to set the parameter to

Sets an parm extra parameter.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_ext_parm()
int rig_set_freq ( RIG rig,
vfo_t  vfo,
freq_t  freq 
)

set the frequency of the target VFO

Parameters:
rigThe rig handle
vfoThe target VFO
freqThe frequency to set to

Sets the frequency of the target VFO.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_freq()
Examples:
/tests/testrig.c.
int rig_set_freq_callback ( RIG rig,
freq_cb_t  cb,
char *  arg 
)

set the callback for freq events

Parameters:
rigThe rig handle
cbThe callback to install
argA Pointer to some private data to pass later on to the callback

Install a callback for freq events, to be called when in transceive mode.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_trn()
int rig_set_func ( RIG rig,
vfo_t  vfo,
setting_t  func,
int  status 
)

activate/de-activate functions of radio

Parameters:
rigThe rig handle
vfoThe target VFO
funcThe functions to activate
statusThe status (on or off) to set to

Activate/de-activate a function of the radio.

The status argument is a non null value for "activate", "de-activate" otherwise, much as TRUE/FALSE definitions in C language.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_func()
int rig_set_level ( RIG rig,
vfo_t  vfo,
setting_t  level,
value_t  val 
)

set a radio level setting

Parameters:
rigThe rig handle
vfoThe target VFO
levelThe level setting
valThe value to set the level setting to

Sets the level of a setting. The level value val can be a float or an integer. See value_t for more information.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_has_set_level(), rig_get_level()
int rig_set_mem ( RIG rig,
vfo_t  vfo,
int  ch 
)

set the current memory channel number

Parameters:
rigThe rig handle
vfoThe target VFO
chThe memory channel number

Sets the current memory channel number. It is not mandatory for the radio to be in memory mode. Actually it depends on rigs. YMMV.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_mem()
int rig_set_mem_all ( RIG rig,
const channel_t  chans[],
const struct confparams  cfgps[],
const value_t  vals[] 
)

set all channel and non-channel data

Parameters:
rigThe rig handle
chansChannel data
cfgps??
vals??

Writes the data associated with all the memory channels, and rigs memory parameters.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_mem_all(), rig_set_mem_all_cb()
Todo:

set all parm's

finish coding and testing of mem_all functions

int rig_set_mem_all_cb ( RIG rig,
chan_cb_t  chan_cb,
confval_cb_t  parm_cb,
char *  arg 
)

set all channel and non-channel data by call-back

Parameters:
rigThe rig handle
chan_cbThe callback for channel data
parm_cbThe callback for non-channel(aka parm) data
argCookie passed to chan_cb and parm_cb

Writes the data associated with all the memory channels, and rigs memory parameters, by callback. This is the prefered method to support clonable rigs.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_mem_all_cb(), rig_set_mem_all()
Todo:
finish coding and testing of mem_all functions
int rig_set_mode ( RIG rig,
vfo_t  vfo,
rmode_t  mode,
pbwidth_t  width 
)

set the mode of the target VFO

Parameters:
rigThe rig handle
vfoThe target VFO
modeThe mode to set to
widthThe passband width to set to

Sets the mode and associated passband of the target VFO. The passband width must be supported by the backend of the rig.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_mode()
Examples:
/tests/testrig.c.
int rig_set_mode_callback ( RIG rig,
mode_cb_t  cb,
char *  arg 
)

set the callback for mode events

Parameters:
rigThe rig handle
cbThe callback to install
argA Pointer to some private data to pass later on to the callback

Install a callback for mode events, to be called when in transceive mode.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_trn()
int rig_set_parm ( RIG rig,
setting_t  parm,
value_t  val 
)

set a radio parameter

Parameters:
rigThe rig handle
parmThe parameter
valThe value to set the parameter

Sets a parameter. The parameter value val can be a float or an integer. See value_t for more information.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_has_set_parm(), rig_get_parm()
int rig_set_pltune_callback ( RIG rig,
pltune_cb_t  cb,
char *  arg 
)

set the callback for pipelined tuning module

Parameters:
rigThe rig handle
cbThe callback to install
argA Pointer to some private data to pass later on to the callback used to maintain state during pipelined tuning.

Install a callback for pipelined tuning module, to be called when the rig_scan( SCAN_PLT ) loop needs a new frequency, mode and width.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_trn()
int rig_set_powerstat ( RIG rig,
powerstat_t  status 
)

turn on/off the radio

Parameters:
rigThe rig handle
statusThe status to set to

turns on/off the radio. See RIG_POWER_ON, RIG_POWER_OFF and RIG_POWER_STANDBY defines for the status.

Returns:
RIG_OK if the operation has been sucessful, ortherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_powerstat()
int rig_set_ptt ( RIG rig,
vfo_t  vfo,
ptt_t  ptt 
)

set PTT on/off

Parameters:
rigThe rig handle
vfoThe target VFO
pttThe PTT status to set to

Sets "Push-To-Talk" on/off.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_ptt()
Examples:
/tests/testrig.c.
int rig_set_ptt_callback ( RIG rig,
ptt_cb_t  cb,
char *  arg 
)

set the callback for ptt events

Parameters:
rigThe rig handle
cbThe callback to install
argA Pointer to some private data to pass later on to the callback

Install a callback for ptt events, to be called when in transceive mode.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_trn()
int rig_set_rit ( RIG rig,
vfo_t  vfo,
shortfreq_t  rit 
)

set the RIT

Parameters:
rigThe rig handle
vfoThe target VFO
ritThe RIT offset to adjust to

Sets the current RIT offset. A value of 0 for rit disables RIT.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_rit()
int rig_set_rptr_offs ( RIG rig,
vfo_t  vfo,
shortfreq_t  rptr_offs 
)

set the repeater offset

Parameters:
rigThe rig handle
vfoThe target VFO
rptr_offsThe VFO to set to

Sets the current repeater offset.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_rptr_offs()
int rig_set_rptr_shift ( RIG rig,
vfo_t  vfo,
rptr_shift_t  rptr_shift 
)

set the repeater shift

Parameters:
rigThe rig handle
vfoThe target VFO
rptr_shiftThe repeater shift to set to

Sets the current repeater shift.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_rptr_shift()
int rig_set_split_freq ( RIG rig,
vfo_t  vfo,
freq_t  tx_freq 
)

set the split frequencies

Parameters:
rigThe rig handle
vfoThe target VFO
tx_freqThe transmit split frequency to set to

Sets the split(TX) frequency.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_split_freq(), rig_set_split_vfo()
int rig_set_split_mode ( RIG rig,
vfo_t  vfo,
rmode_t  tx_mode,
pbwidth_t  tx_width 
)

set the split modes

Parameters:
rigThe rig handle
vfoThe target VFO
tx_modeThe transmit split mode to set to
tx_widthThe transmit split width to set to

Sets the split(TX) mode.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_split_mode()
int rig_set_split_vfo ( RIG rig,
vfo_t  vfo,
split_t  split,
vfo_t  tx_vfo 
)

set the split mode

Parameters:
rigThe rig handle
vfoThe target VFO
splitThe split mode to set to
tx_vfoThe transmit VFO

Sets the current split mode.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_split_vfo()
int rig_set_trn ( RIG rig,
int  trn 
)

control the transceive mode

Parameters:
rigThe rig handle
trnThe transceive status to set to

Enable/disable the transceive handling of a rig and kick off async mode.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_trn()
int rig_set_ts ( RIG rig,
vfo_t  vfo,
shortfreq_t  ts 
)

set the Tuning Step

Parameters:
rigThe rig handle
vfoThe target VFO
tsThe tuning step to set to

Sets the Tuning Step.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_ts()
int rig_set_vfo ( RIG rig,
vfo_t  vfo 
)

set the current VFO

Parameters:
rigThe rig handle
vfoThe VFO to set to

Sets the current VFO. The VFO can be RIG_VFO_A, RIG_VFO_B, RIG_VFO_C for VFOA, VFOB, VFOC respectively or RIG_VFO_MEM for Memory mode. Supported VFOs depends on rig capabilities.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_vfo()
Examples:
/tests/testrig.c.
int rig_set_vfo_callback ( RIG rig,
vfo_cb_t  cb,
char *  arg 
)

set the callback for vfo events

Parameters:
rigThe rig handle
cbThe callback to install
argA Pointer to some private data to pass later on to the callback

Install a callback for vfo events, to be called when in transceive mode.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_set_trn()
int rig_set_xit ( RIG rig,
vfo_t  vfo,
shortfreq_t  xit 
)

set the XIT

Parameters:
rigThe rig handle
vfoThe target VFO
xitThe XIT offset to adjust to

Sets the current XIT offset. A value of 0 for xit disables XIT.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_get_xit()

basically convert setting_t expressed 2^n to n

Parameters:
sThe setting to convert to

Converts a setting_t value expressed by 2^n to the value of n.

Returns:
the index such that 2^n is the setting, otherwise 0 if the setting was not found.
const char* rig_strfunc ( setting_t  func)

Convert enum RIG_FUNC_... to alpha string.

Parameters:
funcRIG_FUNC_...
Returns:
alpha string
See also:
rig_func_e
const char* rig_strlevel ( setting_t  level)

Convert enum RIG_LEVEL_... to alpha string.

Parameters:
levelRIG_LEVEL_...
Returns:
alpha string
See also:
rig_level_e
const char* rig_strmtype ( chan_type_t  mtype)

Convert enum RIG_MTYPE_... to alpha string.

Parameters:
mtypeRIG_MTYPE_...
Returns:
alpha string
See also:
chan_type_t
const char* rig_strparm ( setting_t  parm)

Convert enum RIG_PARM_... to alpha string.

Parameters:
parmRIG_PARM_...
Returns:
alpha string
See also:
rig_parm_e
const char* rig_strptrshift ( rptr_shift_t  shift)

convert enum RIG_RPT_SHIFT_... to printable character

Parameters:
shiftRIG_RPT_SHIFT_??
Returns:
alpha character
const char* rig_strrmode ( rmode_t  mode)

Convert enum RIG_MODE to alpha string.

Parameters:
modeRIG_MODE_...
Returns:
alpha string
See also:
rmode_t
const char* rig_strscan ( scan_t  rscan)

Convert enum RIG_SCAN_... to alpha string.

Parameters:
rscanRIG_SCAN_...
Returns:
alpha string
See also:
scan_t
const char* rig_strstatus ( enum rig_status_e  status)

Convert enum RIG_STATUS_... to printable string.

Parameters:
statusRIG_STATUS_??
Returns:
string
const char* rig_strvfo ( vfo_t  vfo)

Convert enum RIG_VFO_... to alpha string.

Parameters:
vfoRIG_VFO_...
Returns:
alpha string
See also:
RIG_VFO_A RIG_VFO_B RIG_VFO_C RIG_VFO_MAIN RIG_VFO_SUB RIG_VFO_VFO RIG_VFO_CURR RIG_VFO_MEM RIG_VFO_TX RIG_VFO_RX RIG_VFO_NONE
const char* rig_strvfop ( vfo_op_t  op)

Convert enum RIG_OP_... to alpha string.

Parameters:
opRIG_OP_...
Returns:
alpha string
See also:
vfo_op_t
int rig_token_foreach ( RIG rig,
int(*)(const struct confparams *, char *)  cfunc,
char *  data 
)

call a function against each configuration token of a rig

Parameters:
rigThe rig handle
cfuncThe function to perform on each token
dataAny data to be passed to cfunc

Executes cfunc on all the elements stored in the conf table. rig_token_foreach starts first with backend conf table, then finish with frontend table.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
token_t rig_token_lookup ( RIG rig,
const char *  name 
)

lookup a token id

Parameters:
rigThe rig handle
nameThe name of the configuration parameter

Simple lookup returning token id assicated with name.

Returns:
the token id if found, otherwise RIG_CONF_END
int rig_vfo_op ( RIG rig,
vfo_t  vfo,
vfo_op_t  op 
)

perform Memory/VFO operations

Parameters:
rigThe rig handle
vfoThe target VFO
opThe Memory/VFO operation to perform

Performs Memory/VFO operation. See vfo_op_t for more information.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rig_has_vfo_op()
const char* rigerror ( int  errnum)

get string describing the error code

Parameters:
errnumThe error code
Returns:
the appropriate description string, otherwise a NULL pointer if the error code is unknown.

Returns a string describing the error code passed in the argument errnum.

Todo:
support gettext/localization
Examples:
/tests/testrig.c.

Variable Documentation

const tone_t common_ctcss_list[] = { 670, 693, 719, 744, 770, 797, 825, 854, 885, 915, 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, 1318, 1365, 1413, 1462, 1514, 1567, 1598, 1622, 1655, 1679, 1713, 1738, 1773, 1799, 1835, 1862, 1899, 1928, 1966, 1995, 2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, 0, }

50 CTCSS sub-audible tones, from 67.0Hz to 254.1Hz

Note:
Don't even think about changing a bit of this array, several backends depend on it. If you need to, create a copy for your own caps. --SF
const tone_t common_dcs_list[] = { 23, 25, 26, 31, 32, 36, 43, 47, 51, 53, 54, 65, 71, 72, 73, 74, 114, 115, 116, 122, 125, 131, 132, 134, 143, 145, 152, 155, 156, 162, 165, 172, 174, 205, 212, 223, 225, 226, 243, 244, 245, 246, 251, 252, 255, 261, 263, 265, 266, 271, 274, 306, 311, 315, 325, 331, 332, 343, 346, 351, 356, 364, 365, 371, 411, 412, 413, 423, 431, 432, 445, 446, 452, 454, 455, 462, 464, 465, 466, 503, 506, 516, 523, 526, 532, 546, 565, 606, 612, 624, 627, 631, 632, 654, 662, 664, 703, 712, 723, 731, 732, 734, 743, 754, 0, }

104 DCS codes

const tone_t full_ctcss_list[] = { 600, 670, 693, 719, 744, 770, 797, 825, 854, 885, 915, 948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1200, 1230, 1273, 1318, 1365, 1413, 1462, 1514, 1567, 1598, 1622, 1655, 1679, 1713, 1738, 1773, 1799, 1835, 1862, 1899, 1928, 1966, 1995, 2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, 0, }

52 CTCSS sub-audible tones

const tone_t full_dcs_list[] = { 17, 23, 25, 26, 31, 32, 36, 43, 47, 50, 51, 53, 54, 65, 71, 72, 73, 74, 114, 115, 116, 122, 125, 131, 132, 134, 143, 145, 152, 155, 156, 162, 165, 172, 174, 205, 212, 223, 225, 226, 243, 244, 245, 246, 251, 252, 255, 261, 263, 265, 266, 271, 274, 306, 311, 315, 325, 331, 332, 343, 346, 351, 356, 364, 365, 371, 411, 412, 413, 423, 431, 432, 445, 446, 452, 454, 455, 462, 464, 465, 466, 503, 506, 516, 523, 526, 532, 546, 565, 606, 612, 624, 627, 631, 632, 654, 662, 664, 703, 712, 723, 731, 732, 734, 743, 754, 0, }

106 DCS codes

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated by doxygen 1.7.6.1

Hamlib documentation for version 1.2.15 -- Thu Feb 2 2012 21:37:29
Project page: http://www.hamlib.org