Hamlib  4.3
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
Files | Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
Rig (transceiver) API

Files

file  rig.h
 Hamlib rig data structures.
 
file  conf.c
 Rig configuration interface.
 
file  debug.c
 Control Hamlib debugging functions.
 
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  sleep.c
 Replacements for sleep and usleep.
 
file  tones.c
 CTCSS and DCS interface and tables.
 

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  cal_table_float
 Calibration table struct for float values. More...
 
struct  rig_spectrum_scope
 Spectrum scope. More...
 
struct  rig_spectrum_avg_mode
 Spectrum scope averaging modes. More...
 
struct  rig_spectrum_line
 Represents a single line of rig spectrum scope FFT data. More...
 
struct  rig_cache
 Rig cache data. 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  s_rig
 The Rig structure. More...
 

Macros

#define HAMLIB_COOKIE_SIZE   37
 size of cookie request buffer Minimum size of cookie buffer to pass to rig_cookie
 
#define RIG_IS_SOFT_ERRCODE(errcode)
 Determines if the given error code indicates a "soft" error Soft errors are caused by invalid parameters and software/hardware features and cannot be fixed by retries or by re-initializing hardware. More...
 
#define NETRIGCTL_RET   "RPRT "
 Token in the netrigctl protocol for returning error code.
 
#define CTCSS_LIST_SIZE   60
 CTCSS and DCS type definition. More...
 
#define DCS_LIST_SIZE   128
 
#define RIG_STATUS_NEW   RIG_STATUS_UNTESTED
 Map all deprecated RIG_STATUS_NEW references to RIG_STATUS_UNTESTED for backward compatibility.
 
#define PRIfreq   ".0f"
 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
 printf(3) format to be used for freq_t type
 
#define Hz(f)   ((freq_t)(f))
 Macro to return Hz when f=Hz

 
#define kHz(f)   ((freq_t)((f)*(freq_t)1000))
 Macro to return Hz when f=kHz

 
#define MHz(f)   ((freq_t)((f)*(freq_t)1000000))
 Macro to return Hz when f=MHz

 
#define GHz(f)   ((freq_t)((f)*(freq_t)1000000000))
 Macro to return Hz when f=GHz

 
#define s_Hz(f)   ((shortfreq_t)(f))
 Macro to return short Hz when f=Hz

 
#define s_kHz(f)   ((shortfreq_t)((f)*(shortfreq_t)1000))
 Macro to return short Hz when f=kHz

 
#define s_MHz(f)   ((shortfreq_t)((f)*(shortfreq_t)1000000))
 Macro to return short Hz when f=MHz

 
#define s_GHz(f)   ((shortfreq_t)((f)*(shortfreq_t)1000000000))
 Macro to return short Hz when f=GHz

 
#define RIG_FREQ_NONE   Hz(0)
 Frequency none – used as default value for checking

 
#define RIG_VFO_N(n)   ((vfo_t)(1u<<(n)))
 '' – used in caps
 
#define RIG_VFO_NONE   0
 VFONone – vfo unknown
 
#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_VFO_SUB_A   RIG_VFO_N(21)
 SubA – alias for SUB_A
 
#define RIG_VFO_SUB_B   RIG_VFO_N(22)
 SubB – alias for SUB_B
 
#define RIG_VFO_SUB_C   RIG_VFO_N(3)
 SubC – alias for SUB_B
 
#define RIG_VFO_MAIN_A   RIG_VFO_N(23)
 MainA – alias for MAIN_A
 
#define RIG_VFO_MAIN_B   RIG_VFO_N(24)
 MainB – alias for MAIN_B
 
#define RIG_VFO_MAIN_C   RIG_VFO_N(4)
 MainC – alias for MAIN_C
 
#define RIG_VFO_SUB   RIG_VFO_N(25)
 Sub – alias for SUB
 
#define RIG_VFO_MAIN   RIG_VFO_N(26)
 Main – alias for MAIN
 
#define RIG_VFO_VFO   RIG_VFO_N(27)
 VFO – means (last or any)VFO mode, with set_vfo
 
#define RIG_VFO_MEM   RIG_VFO_N(28)
 MEM – means Memory mode, to be used with set_vfo
 
#define RIG_VFO_CURR   RIG_VFO_N(29)
 currVFO – current "tunable channel"/VFO
 
#define RIG_VFO_TX_FLAG   RIG_VFO_N(30)
 Flag to set if VFO can transmit
 
#define RIG_VFO_ALL   RIG_VFO_N(31)
 Flag to set all VFOS
 
#define RIG_VFO_TX_VFO(v)   ((v)|RIG_VFO_TX_FLAG)
 Macro to tell you if VFO can transmit
 
#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_PASSBAND_NORMAL   s_Hz(0)
 Macro for bandpass to be set to normal.
 
#define RIG_PASSBAND_NOCHANGE   s_Hz(-1)
 Macro for bandpass to be left alone.
 
#define RIG_ANT_NONE   0
 Antenna numberNo antenna set yet or unknown.
 
#define RIG_ANT_N(n)   ((ant_t)1<<(n))
 Antenna conversion macroConvert antenna number to bit mask.
 
#define RIG_ANT_1   RIG_ANT_N(0)
 Macro for Ant#1.
 
#define RIG_ANT_2   RIG_ANT_N(1)
 Macro for Ant#2.
 
#define RIG_ANT_3   RIG_ANT_N(2)
 Macro for Ant#3.
 
#define RIG_ANT_4   RIG_ANT_N(3)
 Macro for Ant#4.
 
#define RIG_ANT_5   RIG_ANT_N(4)
 Macro for Ant#5.
 
#define RIG_ANT_CURR   RIG_ANT_N(31)
 Antenna is on whatever "current" means.
 
#define RIG_ANT_UNKNOWN   RIG_ANT_N(30)
 Macro for unknown antenna.
 
#define RIG_ANT_MAX   32
 Maximum antenna#.
 
#define RIG_LEVEL_NONE   0
 
#define RIG_LEVEL_PREAMP   CONSTANT_64BIT_FLAG(0)
 
#define RIG_LEVEL_ATT   CONSTANT_64BIT_FLAG(1)
 
#define RIG_LEVEL_VOXDELAY   CONSTANT_64BIT_FLAG(2)
 
#define RIG_LEVEL_AF   CONSTANT_64BIT_FLAG(3)
 
#define RIG_LEVEL_RF   CONSTANT_64BIT_FLAG(4)
 
#define RIG_LEVEL_SQL   CONSTANT_64BIT_FLAG(5)
 
#define RIG_LEVEL_IF   CONSTANT_64BIT_FLAG(6)
 
#define RIG_LEVEL_APF   CONSTANT_64BIT_FLAG(7)
 
#define RIG_LEVEL_NR   CONSTANT_64BIT_FLAG(8)
 
#define RIG_LEVEL_PBT_IN   CONSTANT_64BIT_FLAG(9)
 
#define RIG_LEVEL_PBT_OUT   CONSTANT_64BIT_FLAG(10)
 
#define RIG_LEVEL_CWPITCH   CONSTANT_64BIT_FLAG(11)
 
#define RIG_LEVEL_RFPOWER   CONSTANT_64BIT_FLAG(12)
 
#define RIG_LEVEL_MICGAIN   CONSTANT_64BIT_FLAG(13)
 
#define RIG_LEVEL_KEYSPD   CONSTANT_64BIT_FLAG(14)
 
#define RIG_LEVEL_NOTCHF   CONSTANT_64BIT_FLAG(15)
 
#define RIG_LEVEL_COMP   CONSTANT_64BIT_FLAG(16)
 
#define RIG_LEVEL_AGC   CONSTANT_64BIT_FLAG(17)
 
#define RIG_LEVEL_BKINDL   CONSTANT_64BIT_FLAG(18)
 
#define RIG_LEVEL_BALANCE   CONSTANT_64BIT_FLAG(19)
 
#define RIG_LEVEL_METER   CONSTANT_64BIT_FLAG(20)
 
#define RIG_LEVEL_VOXGAIN   CONSTANT_64BIT_FLAG(21)
 
#define RIG_LEVEL_ANTIVOX   CONSTANT_64BIT_FLAG(22)
 
#define RIG_LEVEL_SLOPE_LOW   CONSTANT_64BIT_FLAG(23)
 
#define RIG_LEVEL_SLOPE_HIGH   CONSTANT_64BIT_FLAG(24)
 
#define RIG_LEVEL_BKIN_DLYMS   CONSTANT_64BIT_FLAG(25)
 
#define RIG_LEVEL_RAWSTR   CONSTANT_64BIT_FLAG(26)
 
#define RIG_LEVEL_SWR   CONSTANT_64BIT_FLAG(28)
 
#define RIG_LEVEL_ALC   CONSTANT_64BIT_FLAG(29)
 
#define RIG_LEVEL_STRENGTH   CONSTANT_64BIT_FLAG(30)
 
#define RIG_LEVEL_RFPOWER_METER   CONSTANT_64BIT_FLAG(32)
 
#define RIG_LEVEL_COMP_METER   CONSTANT_64BIT_FLAG(33)
 
#define RIG_LEVEL_VD_METER   CONSTANT_64BIT_FLAG(34)
 
#define RIG_LEVEL_ID_METER   CONSTANT_64BIT_FLAG(35)
 
#define RIG_LEVEL_NOTCHF_RAW   CONSTANT_64BIT_FLAG(36)
 
#define RIG_LEVEL_MONITOR_GAIN   CONSTANT_64BIT_FLAG(37)
 
#define RIG_LEVEL_NB   CONSTANT_64BIT_FLAG(38)
 
#define RIG_LEVEL_RFPOWER_METER_WATTS   CONSTANT_64BIT_FLAG(39)
 
#define RIG_LEVEL_SPECTRUM_MODE   CONSTANT_64BIT_FLAG(40)
 
#define RIG_LEVEL_SPECTRUM_SPAN   CONSTANT_64BIT_FLAG(41)
 
#define RIG_LEVEL_SPECTRUM_EDGE_LOW   CONSTANT_64BIT_FLAG(42)
 
#define RIG_LEVEL_SPECTRUM_EDGE_HIGH   CONSTANT_64BIT_FLAG(43)
 
#define RIG_LEVEL_SPECTRUM_SPEED   CONSTANT_64BIT_FLAG(44)
 
#define RIG_LEVEL_SPECTRUM_REF   CONSTANT_64BIT_FLAG(45)
 
#define RIG_LEVEL_SPECTRUM_AVG   CONSTANT_64BIT_FLAG(46)
 
#define RIG_LEVEL_SPECTRUM_ATT   CONSTANT_64BIT_FLAG(47)
 
#define RIG_LEVEL_TEMP_METER   CONSTANT_64BIT_FLAG(48)
 
#define RIG_LEVEL_48   CONSTANT_64BIT_FLAG(48)
 
#define RIG_LEVEL_49   CONSTANT_64BIT_FLAG(49)
 
#define RIG_LEVEL_50   CONSTANT_64BIT_FLAG(50)
 
#define RIG_LEVEL_51   CONSTANT_64BIT_FLAG(51)
 
#define RIG_LEVEL_52   CONSTANT_64BIT_FLAG(52)
 
#define RIG_LEVEL_53   CONSTANT_64BIT_FLAG(53)
 
#define RIG_LEVEL_54   CONSTANT_64BIT_FLAG(54)
 
#define RIG_LEVEL_55   CONSTANT_64BIT_FLAG(55)
 
#define RIG_LEVEL_56   CONSTANT_64BIT_FLAG(56)
 
#define RIG_LEVEL_57   CONSTANT_64BIT_FLAG(57)
 
#define RIG_LEVEL_58   CONSTANT_64BIT_FLAG(58)
 
#define RIG_LEVEL_59   CONSTANT_64BIT_FLAG(59)
 
#define RIG_LEVEL_60   CONSTANT_64BIT_FLAG(60)
 
#define RIG_LEVEL_61   CONSTANT_64BIT_FLAG(61)
 
#define RIG_LEVEL_62   CONSTANT_64BIT_FLAG(62)
 
#define RIG_LEVEL_63   CONSTANT_64BIT_FLAG(63)
 
#define RIG_SETTING_MAX   64
 Maximum # of rig settings.
 
#define RIG_TRN_OFF   0
 Transceive mode The rig notifies the host of any event, like freq changed, mode changed, etc.Turn it off. More...
 
#define RIG_TRN_RIG   1
 Transceive mode. More...
 
#define RIG_TRN_POLL   2
 
#define RIG_FUNC_NONE   0
 Rig Function Settings. More...
 
#define RIG_FUNC_FAGC   CONSTANT_64BIT_FLAG (0)
 
#define RIG_FUNC_NB   CONSTANT_64BIT_FLAG (1)
 
#define RIG_FUNC_COMP   CONSTANT_64BIT_FLAG (2)
 
#define RIG_FUNC_VOX   CONSTANT_64BIT_FLAG (3)
 
#define RIG_FUNC_TONE   CONSTANT_64BIT_FLAG (4)
 
#define RIG_FUNC_TSQL   CONSTANT_64BIT_FLAG (5)
 
#define RIG_FUNC_SBKIN   CONSTANT_64BIT_FLAG (6)
 
#define RIG_FUNC_FBKIN   CONSTANT_64BIT_FLAG (7)
 
#define RIG_FUNC_ANF   CONSTANT_64BIT_FLAG (8)
 
#define RIG_FUNC_NR   CONSTANT_64BIT_FLAG (9)
 
#define RIG_FUNC_AIP   CONSTANT_64BIT_FLAG (10)
 
#define RIG_FUNC_APF   CONSTANT_64BIT_FLAG (11)
 
#define RIG_FUNC_MON   CONSTANT_64BIT_FLAG (12)
 
#define RIG_FUNC_MN   CONSTANT_64BIT_FLAG (13)
 
#define RIG_FUNC_RF   CONSTANT_64BIT_FLAG (14)
 
#define RIG_FUNC_ARO   CONSTANT_64BIT_FLAG (15)
 
#define RIG_FUNC_LOCK   CONSTANT_64BIT_FLAG (16)
 
#define RIG_FUNC_MUTE   CONSTANT_64BIT_FLAG (17)
 
#define RIG_FUNC_VSC   CONSTANT_64BIT_FLAG (18)
 
#define RIG_FUNC_REV   CONSTANT_64BIT_FLAG (19)
 
#define RIG_FUNC_SQL   CONSTANT_64BIT_FLAG (20)
 
#define RIG_FUNC_ABM   CONSTANT_64BIT_FLAG (21)
 
#define RIG_FUNC_BC   CONSTANT_64BIT_FLAG (22)
 
#define RIG_FUNC_MBC   CONSTANT_64BIT_FLAG (23)
 
#define RIG_FUNC_RIT   CONSTANT_64BIT_FLAG (24)
 
#define RIG_FUNC_AFC   CONSTANT_64BIT_FLAG (25)
 
#define RIG_FUNC_SATMODE   CONSTANT_64BIT_FLAG (26)
 
#define RIG_FUNC_SCOPE   CONSTANT_64BIT_FLAG (27)
 
#define RIG_FUNC_RESUME   CONSTANT_64BIT_FLAG (28)
 
#define RIG_FUNC_TBURST   CONSTANT_64BIT_FLAG (29)
 
#define RIG_FUNC_TUNER   CONSTANT_64BIT_FLAG (30)
 
#define RIG_FUNC_XIT   CONSTANT_64BIT_FLAG (31)
 
#define RIG_FUNC_NB2   CONSTANT_64BIT_FLAG (32)
 
#define RIG_FUNC_CSQL   CONSTANT_64BIT_FLAG (33)
 
#define RIG_FUNC_AFLT   CONSTANT_64BIT_FLAG (34)
 
#define RIG_FUNC_ANL   CONSTANT_64BIT_FLAG (35)
 
#define RIG_FUNC_BC2   CONSTANT_64BIT_FLAG (36)
 
#define RIG_FUNC_DUAL_WATCH   CONSTANT_64BIT_FLAG (37)
 
#define RIG_FUNC_DIVERSITY   CONSTANT_64BIT_FLAG (38)
 
#define RIG_FUNC_DSQL   CONSTANT_64BIT_FLAG (39)
 
#define RIG_FUNC_SCEN   CONSTANT_64BIT_FLAG (40)
 
#define RIG_FUNC_SLICE   CONSTANT_64BIT_FLAG (41)
 
#define RIG_FUNC_TRANSCEIVE   CONSTANT_64BIT_FLAG (42)
 
#define RIG_FUNC_SPECTRUM   CONSTANT_64BIT_FLAG (43)
 
#define RIG_FUNC_SPECTRUM_HOLD   CONSTANT_64BIT_FLAG (44)
 
#define RIG_FUNC_BIT45   CONSTANT_64BIT_FLAG (45)
 
#define RIG_FUNC_BIT46   CONSTANT_64BIT_FLAG (46)
 
#define RIG_FUNC_BIT47   CONSTANT_64BIT_FLAG (47)
 
#define RIG_FUNC_BIT48   CONSTANT_64BIT_FLAG (48)
 
#define RIG_FUNC_BIT49   CONSTANT_64BIT_FLAG (49)
 
#define RIG_FUNC_BIT50   CONSTANT_64BIT_FLAG (50)
 
#define RIG_FUNC_BIT51   CONSTANT_64BIT_FLAG (51)
 
#define RIG_FUNC_BIT52   CONSTANT_64BIT_FLAG (52)
 
#define RIG_FUNC_BIT53   CONSTANT_64BIT_FLAG (53)
 
#define RIG_FUNC_BIT54   CONSTANT_64BIT_FLAG (54)
 
#define RIG_FUNC_BIT55   CONSTANT_64BIT_FLAG (55)
 
#define RIG_FUNC_BIT56   CONSTANT_64BIT_FLAG (56)
 
#define RIG_FUNC_BIT57   CONSTANT_64BIT_FLAG (57)
 
#define RIG_FUNC_BIT58   CONSTANT_64BIT_FLAG (58)
 
#define RIG_FUNC_BIT59   CONSTANT_64BIT_FLAG (59)
 
#define RIG_FUNC_BIT60   CONSTANT_64BIT_FLAG (60)
 
#define RIG_FUNC_BIT61   CONSTANT_64BIT_FLAG (61)
 
#define RIG_FUNC_BIT62   CONSTANT_64BIT_FLAG (62)
 
#define RIG_FUNC_BIT63   CONSTANT_64BIT_FLAG (63)
 
#define mW(p)   ((int)(p))
 power unit macrosConverts a power level integer to milliwatts. This is limited to 2 megawatts on 32 bit systems.
 
#define Watts(p)   ((int)((p)*1000))
 power unit macros More...
 
#define W(p)   Watts(p)
 power unit macros More...
 
#define RIG_MODE_NONE   0
 
#define RIG_MODE_AM   CONSTANT_64BIT_FLAG (0)
 
#define RIG_MODE_CW   CONSTANT_64BIT_FLAG (1)
 
#define RIG_MODE_USB   CONSTANT_64BIT_FLAG (2)
 
#define RIG_MODE_LSB   CONSTANT_64BIT_FLAG (3)
 
#define RIG_MODE_RTTY   CONSTANT_64BIT_FLAG (4)
 
#define RIG_MODE_FM   CONSTANT_64BIT_FLAG (5)
 
#define RIG_MODE_WFM   CONSTANT_64BIT_FLAG (6)
 
#define RIG_MODE_CWR   CONSTANT_64BIT_FLAG (7)
 
#define RIG_MODE_RTTYR   CONSTANT_64BIT_FLAG (8)
 
#define RIG_MODE_AMS   CONSTANT_64BIT_FLAG (9)
 
#define RIG_MODE_PKTLSB   CONSTANT_64BIT_FLAG (10)
 
#define RIG_MODE_PKTUSB   CONSTANT_64BIT_FLAG (11)
 
#define RIG_MODE_PKTFM   CONSTANT_64BIT_FLAG (12)
 
#define RIG_MODE_ECSSUSB   CONSTANT_64BIT_FLAG (13)
 
#define RIG_MODE_ECSSLSB   CONSTANT_64BIT_FLAG (14)
 
#define RIG_MODE_FAX   CONSTANT_64BIT_FLAG (15)
 
#define RIG_MODE_SAM   CONSTANT_64BIT_FLAG (16)
 
#define RIG_MODE_SAL   CONSTANT_64BIT_FLAG (17)
 
#define RIG_MODE_SAH   CONSTANT_64BIT_FLAG (18)
 
#define RIG_MODE_DSB   CONSTANT_64BIT_FLAG (19)
 
#define RIG_MODE_FMN   CONSTANT_64BIT_FLAG (21)
 
#define RIG_MODE_PKTAM   CONSTANT_64BIT_FLAG (22)
 
#define RIG_MODE_P25   CONSTANT_64BIT_FLAG (23)
 
#define RIG_MODE_DSTAR   CONSTANT_64BIT_FLAG (24)
 
#define RIG_MODE_DPMR   CONSTANT_64BIT_FLAG (25)
 
#define RIG_MODE_NXDNVN   CONSTANT_64BIT_FLAG (26)
 
#define RIG_MODE_NXDN_N   CONSTANT_64BIT_FLAG (27)
 
#define RIG_MODE_DCR   CONSTANT_64BIT_FLAG (28)
 
#define RIG_MODE_AMN   CONSTANT_64BIT_FLAG (29)
 
#define RIG_MODE_PSK   CONSTANT_64BIT_FLAG (30)
 
#define RIG_MODE_PSKR   CONSTANT_64BIT_FLAG (31)
 
#define RIG_MODE_DD   CONSTANT_64BIT_FLAG (32)
 
#define RIG_MODE_C4FM   CONSTANT_64BIT_FLAG (33)
 
#define RIG_MODE_PKTFMN   CONSTANT_64BIT_FLAG (34)
 
#define RIG_MODE_SPEC   CONSTANT_64BIT_FLAG (35)
 
#define RIG_MODE_CWN   CONSTANT_64BIT_FLAG (36)
 
#define RIG_MODE_BIT37   CONSTANT_64BIT_FLAG (37)
 
#define RIG_MODE_BIT38   CONSTANT_64BIT_FLAG (38)
 
#define RIG_MODE_BIT39   CONSTANT_64BIT_FLAG (39)
 
#define RIG_MODE_BIT40   CONSTANT_64BIT_FLAG (40)
 
#define RIG_MODE_BIT41   CONSTANT_64BIT_FLAG (41)
 
#define RIG_MODE_BIT42   CONSTANT_64BIT_FLAG (42)
 
#define RIG_MODE_BIT43   CONSTANT_64BIT_FLAG (43)
 
#define RIG_MODE_BIT44   CONSTANT_64BIT_FLAG (44)
 
#define RIG_MODE_BIT45   CONSTANT_64BIT_FLAG (45)
 
#define RIG_MODE_BIT46   CONSTANT_64BIT_FLAG (46)
 
#define RIG_MODE_BIT47   CONSTANT_64BIT_FLAG (47)
 
#define RIG_MODE_BIT48   CONSTANT_64BIT_FLAG (48)
 
#define RIG_MODE_BIT49   CONSTANT_64BIT_FLAG (49)
 
#define RIG_MODE_BIT50   CONSTANT_64BIT_FLAG (50)
 
#define RIG_MODE_BIT51   CONSTANT_64BIT_FLAG (51)
 
#define RIG_MODE_BIT52   CONSTANT_64BIT_FLAG (52)
 
#define RIG_MODE_BIT53   CONSTANT_64BIT_FLAG (53)
 
#define RIG_MODE_BIT54   CONSTANT_64BIT_FLAG (54)
 
#define RIG_MODE_BIT55   CONSTANT_64BIT_FLAG (55)
 
#define RIG_MODE_BIT56   CONSTANT_64BIT_FLAG (56)
 
#define RIG_MODE_BIT57   CONSTANT_64BIT_FLAG (57)
 
#define RIG_MODE_BIT58   CONSTANT_64BIT_FLAG (58)
 
#define RIG_MODE_BIT59   CONSTANT_64BIT_FLAG (59)
 
#define RIG_MODE_BIT60   CONSTANT_64BIT_FLAG (60)
 
#define RIG_MODE_BIT61   CONSTANT_64BIT_FLAG (61)
 
#define RIG_MODE_BIT62   CONSTANT_64BIT_FLAG (62)
 
#define RIG_MODE_TESTS_MAX   CONSTANT_64BIT_FLAG (63)
 
#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_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_CHFLAG_PSKIP   (1<<2)
 programmed skip (PSKIP) memory channel during scan (lock out), channel_t.flags
 
#define RIG_MEM_CAPS_ALL   -1
 Special memory channel value to tell rig_lookup_mem_caps() to retrieve all the ranges.
 
#define HAMLIB_ELAPSED_GET   0
 
#define HAMLIB_ELAPSED_SET   1
 
#define HAMLIB_ELAPSED_INVALIDATE   2
 

Typedefs

typedef struct s_rig RIG
 Rig structure definition (see rig for details).
 
typedef unsigned int tone_t
 
typedef enum rig_port_e rig_port_t
 Port type.
 
typedef double freq_t
 Frequency type,. More...
 
typedef signed long shortfreq_t
 Short frequency type. More...
 
typedef unsigned int vfo_t
 VFO definition. More...
 
typedef shortfreq_t pbwidth_t
 
typedef enum dcd_e dcd_t
 DCD status.
 
typedef long token_t
 configuration token
 
typedef unsigned int ant_t
 Antenna typedef.
 
typedef uint64_t rig_level_e
 Rig Level Settings. More...
 
typedef uint64_t setting_t
 Setting. More...
 
typedef uint64_t rmode_t
 Radio mode. More...
 
typedef struct freq_range_list freq_range_t
 Frequency range. More...
 
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 More...
 
typedef struct cal_table_float cal_table_float_t
 calibration table type for float values More...
 
typedef hamlib_port_t port_t
 Rig data structure. More...
 

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 , RIG_DEBUG_CACHE
}
 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 ,
  RIG_PORT_GPIO , RIG_PORT_GPION
}
 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 , RIG_DCD_GPIO ,
  RIG_DCD_GPION
}
 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 , RIG_PTT_GPIO ,
  RIG_PTT_GPION
}
 PTT type. More...
 
enum  powerstat_t {
  RIG_POWER_OFF = 0 , RIG_POWER_ON = (1 << 0) , RIG_POWER_STANDBY = (1 << 1) , RIG_POWER_OPERATE = (1 << 2) ,
  RIG_POWER_UNKNOWN = (1 << 3)
}
 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_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_STOP = (1 << 7)
}
 Rig Scan operation. More...
 
enum  rig_conf_e {
  RIG_CONF_STRING , RIG_CONF_COMBO , RIG_CONF_NUMERIC , RIG_CONF_CHECKBUTTON ,
  RIG_CONF_BUTTON , RIG_CONF_BINARY
}
 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) ,
  RIG_METER_TEMP = (1 << 7)
}
 Level display meters.
 
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_PARM_SCREENSAVER = (1 << 8)
}
 Rig Parameters. More...
 
enum  cookie_e { RIG_COOKIE_GET , RIG_COOKIE_RELEASE , RIG_COOKIE_RENEW }
 Rig Cookie enumerations. More...
 
enum  multicast_item_e { RIG_MULTICAST_POLL , RIG_MULTICAST_TRANSCEIVE , RIG_MULTICAST_SPECTRUM }
 Multicast data items 3 different data item can be included in the multicast JSON.
 
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...
 
enum  rig_spectrum_mode_e {
  RIG_SPECTRUM_MODE_NONE = 0 , RIG_SPECTRUM_MODE_CENTER , RIG_SPECTRUM_MODE_FIXED , RIG_SPECTRUM_MODE_CENTER_SCROLL ,
  RIG_SPECTRUM_MODE_FIXED_SCROLL
}
 Spectrum scope modes. More...
 
enum  hamlib_cache_t {
  HAMLIB_CACHE_ALL , HAMLIB_CACHE_VFO , HAMLIB_CACHE_FREQ , HAMLIB_CACHE_MODE ,
  HAMLIB_CACHE_PTT , HAMLIB_CACHE_SPLIT , HAMLIB_CACHE_WIDTH
}
 
enum  twiddle_state_t { TWIDDLE_OFF , TWIDDLE_ON }
 

Functions

int rig_token_foreach (RIG *rig, int(*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data)
 call a function against each configuration token of a rig More...
 
const struct confparamsrig_confparam_lookup (RIG *rig, const char *name)
 lookup a confparam struct More...
 
token_t rig_token_lookup (RIG *rig, const char *name)
 lookup a token id More...
 
int rig_set_conf (RIG *rig, token_t token, const char *val)
 set a radio configuration parameter More...
 
int rig_get_conf (RIG *rig, token_t token, char *val)
 get the value of a configuration parameter More...
 
void rig_set_debug (enum rig_debug_level_e debug_level)
 Change the current debug level. More...
 
int rig_need_debug (enum rig_debug_level_e debug_level)
 Test if a given debug level is active. More...
 
void rig_set_debug_time_stamp (int flag)
 Enable or disable the time stamp on debugging output. More...
 
void rig_debug (enum rig_debug_level_e debug_level, const char *fmt,...)
 Print debugging messages through stderr by default. More...
 
vprintf_cb_t rig_set_debug_callback (vprintf_cb_t cb, rig_ptr_t arg)
 Set callback to handle debugging messages. More...
 
FILE * rig_set_debug_file (FILE *stream)
 Change the output stream from stderr a different stream. More...
 
int rig_set_freq_callback (RIG *rig, freq_cb_t cb, rig_ptr_t arg)
 set the callback for freq events More...
 
int rig_set_mode_callback (RIG *rig, mode_cb_t cb, rig_ptr_t arg)
 set the callback for mode events More...
 
int rig_set_vfo_callback (RIG *rig, vfo_cb_t cb, rig_ptr_t arg)
 set the callback for vfo events More...
 
int rig_set_ptt_callback (RIG *rig, ptt_cb_t cb, rig_ptr_t arg)
 set the callback for ptt events More...
 
int rig_set_dcd_callback (RIG *rig, dcd_cb_t cb, rig_ptr_t arg)
 set the callback for dcd events More...
 
int rig_set_pltune_callback (RIG *rig, pltune_cb_t cb, rig_ptr_t arg)
 set the callback for pipelined tuning module More...
 
int rig_set_spectrum_callback (RIG *rig, spectrum_cb_t cb, rig_ptr_t arg)
 set the callback for spectrum line reception events More...
 
int rig_set_trn (RIG *rig, int trn)
 control the transceive mode More...
 
int rig_get_trn (RIG *rig, int *trn)
 get the current transceive mode More...
 
int rig_ext_func_foreach (RIG *rig, int(*cfunc)(RIG *, const struct confparams *, rig_ptr_t), rig_ptr_t data)
 Executes cfunc on all the elements stored in the extfuncs table. More...
 
int rig_ext_level_foreach (RIG *rig, int(*cfunc)(RIG *, const struct confparams *, rig_ptr_t), rig_ptr_t data)
 Executes cfunc on all the elements stored in the extlevels table. More...
 
int rig_ext_parm_foreach (RIG *rig, int(*cfunc)(RIG *, const struct confparams *, rig_ptr_t), rig_ptr_t data)
 Executes cfunc on all the elements stored in the extparms table. More...
 
const struct confparamsrig_ext_lookup (RIG *rig, const char *name)
 lookup ext token by its name, return pointer to confparams struct. More...
 
const struct confparamsrig_ext_lookup_tok (RIG *rig, token_t token)
 lookup ext token, return pointer to confparams struct. More...
 
token_t rig_ext_token_lookup (RIG *rig, const char *name)
 Simple lookup returning token id associated with name. More...
 
int rig_set_mem (RIG *rig, vfo_t vfo, int ch)
 set the current memory channel number More...
 
int rig_get_mem (RIG *rig, vfo_t vfo, int *ch)
 get the current memory channel number More...
 
int rig_set_bank (RIG *rig, vfo_t vfo, int bank)
 set the current memory bank More...
 
int rig_set_channel (RIG *rig, vfo_t vfo, const channel_t *chan)
 set channel data More...
 
int rig_get_channel (RIG *rig, vfo_t vfox, channel_t *chan, int read_only)
 get channel data More...
 
int rig_set_chan_all_cb (RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t arg)
 set all channel data, by callback More...
 
int rig_get_chan_all_cb (RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t arg)
 get all channel data, by callback More...
 
int rig_set_chan_all (RIG *rig, vfo_t vfo, const channel_t chans[])
 set all channel data More...
 
int rig_get_chan_all (RIG *rig, vfo_t vfo, channel_t chans[])
 get all channel data More...
 
int rig_copy_channel (RIG *rig, channel_t *dest, const channel_t *src)
 copy channel structure to another channel structure More...
 
int rig_set_mem_all_cb (RIG *rig, vfo_t vfo, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t arg)
 set all channel and non-channel data by call-back More...
 
int rig_get_mem_all_cb (RIG *rig, vfo_t vfo, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t arg)
 get all channel and non-channel data by call-back More...
 
int rig_set_mem_all (RIG *rig, vfo_t vfo, const channel_t chans[], const struct confparams cfgps[], const value_t vals[])
 set all channel and non-channel data More...
 
int rig_get_mem_all (RIG *rig, vfo_t vfo, channel_t chans[], const struct confparams cfgps[], value_t vals[])
 get all channel and non-channel data More...
 
const chan_trig_lookup_mem_caps (RIG *rig, int ch)
 lookup the memory type and capabilities More...
 
int rig_mem_count (RIG *rig)
 get memory channel count More...
 
const char * rigerror (int errnum)
 
int rig_check_rig_caps ()
 
RIGrig_init (rig_model_t rig_model)
 allocate a new RIG handle More...
 
int rig_open (RIG *rig)
 open the communication to the rig More...
 
int rig_close (RIG *rig)
 close the communication to the rig More...
 
int rig_cleanup (RIG *rig)
 release a rig handle and free associated memory More...
 
int rig_set_twiddle (RIG *rig, int seconds)
 timeout (secs) to stop rigctld when VFO is manually changed More...
 
int rig_set_uplink (RIG *rig, int val)
 For GPredict to avoid reading frequency on uplink VFO. More...
 
int rig_get_twiddle (RIG *rig, int *seconds)
 get the twiddle timeout value (secs) More...
 
int rig_get_cache (RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms_freq, rmode_t *mode, int *cache_ms_mode, pbwidth_t *width, int *cache_ms_width)
 
int twiddling (RIG *rig)
 
int rig_set_freq (RIG *rig, vfo_t vfo, freq_t freq)
 set the frequency of the target VFO More...
 
int rig_get_freq (RIG *rig, vfo_t vfo, freq_t *freq)
 get the frequency of the target VFO More...
 
int rig_get_freqs (RIG *rig, freq_t *freqA, freq_t freqB)
 get the frequency of VFOA and VFOB More...
 
int rig_set_mode (RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
 set the mode of the target VFO More...
 
int rig_get_mode (RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
 
pbwidth_t rig_passband_normal (RIG *rig, rmode_t mode)
 get the normal passband of a mode More...
 
pbwidth_t rig_passband_narrow (RIG *rig, rmode_t mode)
 get the narrow passband of a mode More...
 
pbwidth_t rig_passband_wide (RIG *rig, rmode_t mode)
 get the wide passband of a mode More...
 
int rig_set_vfo (RIG *rig, vfo_t vfo)
 set the current VFO More...
 
int rig_get_vfo (RIG *rig, vfo_t *vfo)
 get the current VFO More...
 
int rig_set_ptt (RIG *rig, vfo_t vfo, ptt_t ptt)
 set PTT on/off More...
 
int rig_get_ptt (RIG *rig, vfo_t vfo, ptt_t *ptt)
 get the status of the PTT More...
 
int rig_get_dcd (RIG *rig, vfo_t vfo, dcd_t *dcd)
 get the status of the DCD More...
 
int rig_set_rptr_shift (RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
 set the repeater shift More...
 
int rig_get_rptr_shift (RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
 get the current repeater shift More...
 
int rig_set_rptr_offs (RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
 set the repeater offset More...
 
int rig_get_rptr_offs (RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs)
 get the current repeater offset More...
 
int rig_set_split_freq (RIG *rig, vfo_t vfo, freq_t tx_freq)
 set the split frequencies More...
 
int rig_get_split_freq (RIG *rig, vfo_t vfo, freq_t *tx_freq)
 get the current split frequencies More...
 
int rig_set_split_mode (RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
 set the split modes More...
 
int rig_get_split_mode (RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width)
 get the current split modes More...
 
int rig_set_split_freq_mode (RIG *rig, vfo_t vfo, freq_t tx_freq, rmode_t tx_mode, pbwidth_t tx_width)
 set the split frequency and mode More...
 
int rig_get_split_freq_mode (RIG *rig, vfo_t vfo, freq_t *tx_freq, rmode_t *tx_mode, pbwidth_t *tx_width)
 get the current split frequency and mode More...
 
int rig_set_split_vfo (RIG *rig, vfo_t rx_vfo, split_t split, vfo_t tx_vfo)
 set the split mode More...
 
int rig_get_split_vfo (RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo)
 get the current split mode More...
 
int rig_set_rit (RIG *rig, vfo_t vfo, shortfreq_t rit)
 set the RIT More...
 
int rig_get_rit (RIG *rig, vfo_t vfo, shortfreq_t *rit)
 get the current RIT offset More...
 
int rig_set_xit (RIG *rig, vfo_t vfo, shortfreq_t xit)
 set the XIT More...
 
int rig_get_xit (RIG *rig, vfo_t vfo, shortfreq_t *xit)
 get the current XIT offset More...
 
int rig_set_ts (RIG *rig, vfo_t vfo, shortfreq_t ts)
 set the Tuning Step More...
 
int rig_get_ts (RIG *rig, vfo_t vfo, shortfreq_t *ts)
 get the current Tuning Step More...
 
int rig_set_ant (RIG *rig, vfo_t vfo, ant_t ant, value_t option)
 set the antenna More...
 
int rig_get_ant (RIG *rig, vfo_t vfo, ant_t ant, value_t *option, ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx)
 get the current antenna More...
 
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 More...
 
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 More...
 
shortfreq_t rig_get_resolution (RIG *rig, rmode_t mode)
 get the best frequency resolution of the rig More...
 
int rig_set_powerstat (RIG *rig, powerstat_t status)
 turn on/off the radio More...
 
int rig_get_powerstat (RIG *rig, powerstat_t *status)
 get the on/off status of the radio More...
 
int rig_reset (RIG *rig, reset_t reset)
 reset the radio More...
 
rig_model_t rig_probe (hamlib_port_t *port)
 try to guess a rig More...
 
int rig_probe_all (hamlib_port_t *port, rig_probe_func_t cfunc, rig_ptr_t data)
 try to guess rigs More...
 
vfo_op_t rig_has_vfo_op (RIG *rig, vfo_op_t op)
 check retrieval ability of VFO operations More...
 
int rig_vfo_op (RIG *rig, vfo_t vfo, vfo_op_t op)
 perform Memory/VFO operations More...
 
scan_t rig_has_scan (RIG *rig, scan_t scan)
 check availability of scanning functions More...
 
int rig_scan (RIG *rig, vfo_t vfo, scan_t scan, int ch)
 perform Memory/VFO operations More...
 
int rig_send_dtmf (RIG *rig, vfo_t vfo, const char *digits)
 send DTMF digits More...
 
int rig_recv_dtmf (RIG *rig, vfo_t vfo, char *digits, int *length)
 receive DTMF digits More...
 
int rig_send_morse (RIG *rig, vfo_t vfo, const char *msg)
 send morse code More...
 
int rig_stop_morse (RIG *rig, vfo_t vfo)
 stop morse code More...
 
int rig_wait_morse (RIG *rig, vfo_t vfo)
 wait morse code More...
 
int rig_send_voice_mem (RIG *rig, vfo_t vfo, int ch)
 send voice memory content More...
 
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 More...
 
int rig_set_vfo_opt (RIG *rig, int status)
 set the vfo option for rigctld More...
 
const char * rig_get_info (RIG *rig)
 get general information from the radio More...
 
void make_crc_table (unsigned long crcTable[])
 
unsigned long gen_crc (unsigned char *p, size_t n)
 
int rig_get_rig_info (RIG *rig, char *response, int max_response_len)
 get freq/mode/width for requested VFO More...
 
int rig_get_vfo_info (RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, pbwidth_t *width, split_t *split, int *satmode)
 get freq/mode/width for requested VFO More...
 
int rig_get_vfo_list (RIG *rig, char *buf, int buflen)
 get list of available vfos More...
 
const char * rig_license ()
 get the Hamlib license
 
const char * rig_version ()
 get the Hamlib version
 
const char * rig_copyright ()
 get the Hamlib copyright
 
int rig_cookie (RIG *rig, enum cookie_e cookie_cmd, char *cookie, int cookie_len)
 get a cookie to grab rig control More...
 
void sync_callback (int lock)
 
int rig_set_level (RIG *rig, vfo_t vfo, setting_t level, value_t val)
 set a radio level setting More...
 
int rig_get_level (RIG *rig, vfo_t vfo, setting_t level, value_t *val)
 get the value of a level More...
 
int rig_set_parm (RIG *rig, setting_t parm, value_t val)
 set a radio parameter More...
 
int rig_get_parm (RIG *rig, setting_t parm, value_t *val)
 get the value of a parameter More...
 
setting_t rig_has_get_level (RIG *rig, setting_t level)
 check retrieval ability of level settings More...
 
setting_t rig_has_set_level (RIG *rig, setting_t level)
 check settable ability of level settings More...
 
setting_t rig_has_get_parm (RIG *rig, setting_t parm)
 check retrieval ability of parameter settings More...
 
setting_t rig_has_set_parm (RIG *rig, setting_t parm)
 check settable ability of parameter settings More...
 
setting_t rig_has_get_func (RIG *rig, setting_t func)
 check ability of radio functions More...
 
setting_t rig_has_set_func (RIG *rig, setting_t func)
 check ability of radio functions More...
 
int rig_set_func (RIG *rig, vfo_t vfo, setting_t func, int status)
 activate/de-activate functions of radio More...
 
int rig_get_func (RIG *rig, vfo_t vfo, setting_t func, int *status)
 get the status of functions of the radio More...
 
int rig_set_ext_level (RIG *rig, vfo_t vfo, token_t token, value_t val)
 set a radio level extra parameter More...
 
int rig_get_ext_level (RIG *rig, vfo_t vfo, token_t token, value_t *val)
 get the value of a level extra parameter More...
 
int rig_set_ext_func (RIG *rig, vfo_t vfo, token_t token, int status)
 set a radio function extra parameter More...
 
int rig_get_ext_func (RIG *rig, vfo_t vfo, token_t token, int *status)
 get the value of a function extra parameter More...
 
int rig_set_ext_parm (RIG *rig, token_t token, value_t val)
 set a radio parm extra parameter More...
 
int rig_get_ext_parm (RIG *rig, token_t token, value_t *val)
 get the value of a parm extra parameter More...
 
int rig_setting2idx (setting_t s)
 basically convert setting_t expressed 2^n to n More...
 
int hl_usleep (rig_useconds_t usec)
 provide sleep and usleep replacements More...
 
int rig_set_ctcss_tone (RIG *rig, vfo_t vfo, tone_t tone)
 set CTCSS sub-tone frequency More...
 
int rig_get_ctcss_tone (RIG *rig, vfo_t vfo, tone_t *tone)
 get the current CTCSS sub-tone frequency More...
 
int rig_set_dcs_code (RIG *rig, vfo_t vfo, tone_t code)
 set the current encoding DCS code More...
 
int rig_get_dcs_code (RIG *rig, vfo_t vfo, tone_t *code)
 get the current encoding DCS code More...
 
int rig_set_ctcss_sql (RIG *rig, vfo_t vfo, tone_t tone)
 set CTCSS squelch More...
 
int rig_get_ctcss_sql (RIG *rig, vfo_t vfo, tone_t *tone)
 get the current CTCSS squelch More...
 
int rig_set_dcs_sql (RIG *rig, vfo_t vfo, tone_t code)
 set the current DCS code More...
 
int rig_get_dcs_sql (RIG *rig, vfo_t vfo, tone_t *code)
 get the current DCS code More...
 

Variables

int cookie_use
 
const char * hamlib_license = "LGPL"
 Hamlib release number. More...
 
struct rig_caps caps_test
 
const char * hamlib_copyright2
 Hamlib copyright notice. More...
 
char debugmsgsave [DEBUGMSGSAVE_SIZE] = "No message"
 get string describing the error code More...
 
char debugmsgsave2 [DEBUGMSGSAVE_SIZE] = "No message"
 
char debugmsgsave3 [DEBUGMSGSAVE_SIZE] = "No message"
 
void * caps_test_rig_model = &caps_test.rig_model
 
void * caps_test_macro_name = &caps_test.macro_name
 
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, }
 
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, }
 
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, }
 
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, }
 

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.

Macro Definition Documentation

◆ CTCSS_LIST_SIZE

#define CTCSS_LIST_SIZE   60

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.

◆ RIG_FUNC_ABM

#define RIG_FUNC_ABM   CONSTANT_64BIT_FLAG (21)

ABM – Auto Band Mode

◆ RIG_FUNC_AFC

#define RIG_FUNC_AFC   CONSTANT_64BIT_FLAG (25)

AFC – Auto Frequency Control ON/OFF

◆ RIG_FUNC_AFLT

#define RIG_FUNC_AFLT   CONSTANT_64BIT_FLAG (34)

AFLT – AF Filter setting

◆ RIG_FUNC_AIP

#define RIG_FUNC_AIP   CONSTANT_64BIT_FLAG (10)

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

◆ RIG_FUNC_ANF

#define RIG_FUNC_ANF   CONSTANT_64BIT_FLAG (8)

ANF – Automatic Notch Filter (DSP)

◆ RIG_FUNC_ANL

#define RIG_FUNC_ANL   CONSTANT_64BIT_FLAG (35)

ANL – Noise limiter setting

◆ RIG_FUNC_APF

#define RIG_FUNC_APF   CONSTANT_64BIT_FLAG (11)

APF – Auto Passband/Audio Peak Filter

◆ RIG_FUNC_ARO

#define RIG_FUNC_ARO   CONSTANT_64BIT_FLAG (15)

ARO – Auto Repeater Offset

◆ RIG_FUNC_BC

#define RIG_FUNC_BC   CONSTANT_64BIT_FLAG (22)

BC – Beat Canceller

◆ RIG_FUNC_BC2

#define RIG_FUNC_BC2   CONSTANT_64BIT_FLAG (36)

BC2 – 2nd Beat Cancel

◆ RIG_FUNC_BIT45

#define RIG_FUNC_BIT45   CONSTANT_64BIT_FLAG (45)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT46

#define RIG_FUNC_BIT46   CONSTANT_64BIT_FLAG (46)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT47

#define RIG_FUNC_BIT47   CONSTANT_64BIT_FLAG (47)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT48

#define RIG_FUNC_BIT48   CONSTANT_64BIT_FLAG (48)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT49

#define RIG_FUNC_BIT49   CONSTANT_64BIT_FLAG (49)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT50

#define RIG_FUNC_BIT50   CONSTANT_64BIT_FLAG (50)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT51

#define RIG_FUNC_BIT51   CONSTANT_64BIT_FLAG (51)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT52

#define RIG_FUNC_BIT52   CONSTANT_64BIT_FLAG (52)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT53

#define RIG_FUNC_BIT53   CONSTANT_64BIT_FLAG (53)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT54

#define RIG_FUNC_BIT54   CONSTANT_64BIT_FLAG (54)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT55

#define RIG_FUNC_BIT55   CONSTANT_64BIT_FLAG (55)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT56

#define RIG_FUNC_BIT56   CONSTANT_64BIT_FLAG (56)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT57

#define RIG_FUNC_BIT57   CONSTANT_64BIT_FLAG (57)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT58

#define RIG_FUNC_BIT58   CONSTANT_64BIT_FLAG (58)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT59

#define RIG_FUNC_BIT59   CONSTANT_64BIT_FLAG (59)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT60

#define RIG_FUNC_BIT60   CONSTANT_64BIT_FLAG (60)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT61

#define RIG_FUNC_BIT61   CONSTANT_64BIT_FLAG (61)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT62

#define RIG_FUNC_BIT62   CONSTANT_64BIT_FLAG (62)

available for future RIG_FUNC items

◆ RIG_FUNC_BIT63

#define RIG_FUNC_BIT63   CONSTANT_64BIT_FLAG (63)

available for future RIG_FUNC items

◆ RIG_FUNC_COMP

#define RIG_FUNC_COMP   CONSTANT_64BIT_FLAG (2)

COMP – Speech Compression

◆ RIG_FUNC_CSQL

#define RIG_FUNC_CSQL   CONSTANT_64BIT_FLAG (33)

CSQL – DCS Squelch setting

◆ RIG_FUNC_DIVERSITY

#define RIG_FUNC_DIVERSITY   CONSTANT_64BIT_FLAG (38)

DIVERSITY – Diversity receive

◆ RIG_FUNC_DSQL

#define RIG_FUNC_DSQL   CONSTANT_64BIT_FLAG (39)

DSQL – Digital modes squelch

◆ RIG_FUNC_DUAL_WATCH

#define RIG_FUNC_DUAL_WATCH   CONSTANT_64BIT_FLAG (37)

DUAL_WATCH – Dual Watch / Sub Receiver

◆ RIG_FUNC_FAGC

#define RIG_FUNC_FAGC   CONSTANT_64BIT_FLAG (0)

FAGC – Fast AGC

◆ RIG_FUNC_FBKIN

#define RIG_FUNC_FBKIN   CONSTANT_64BIT_FLAG (7)

FBKIN – Full Break-in (CW mode)

◆ RIG_FUNC_LOCK

#define RIG_FUNC_LOCK   CONSTANT_64BIT_FLAG (16)

LOCK – Lock

◆ RIG_FUNC_MBC

#define RIG_FUNC_MBC   CONSTANT_64BIT_FLAG (23)

MBC – Manual Beat Canceller

◆ RIG_FUNC_MN

#define RIG_FUNC_MN   CONSTANT_64BIT_FLAG (13)

MN – Manual Notch

◆ RIG_FUNC_MON

#define RIG_FUNC_MON   CONSTANT_64BIT_FLAG (12)

MON – Monitor transmitted signal

◆ RIG_FUNC_MUTE

#define RIG_FUNC_MUTE   CONSTANT_64BIT_FLAG (17)

MUTE – Mute

◆ RIG_FUNC_NB

#define RIG_FUNC_NB   CONSTANT_64BIT_FLAG (1)

NB – Noise Blanker

◆ RIG_FUNC_NB2

#define RIG_FUNC_NB2   CONSTANT_64BIT_FLAG (32)

NB2 – 2nd Noise Blanker

◆ RIG_FUNC_NONE

#define RIG_FUNC_NONE   0

Rig Function Settings.

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

See also
rig_parse_func(), rig_strfunc() '' – No Function

◆ RIG_FUNC_NR

#define RIG_FUNC_NR   CONSTANT_64BIT_FLAG (9)

NR – Noise Reduction (DSP)

◆ RIG_FUNC_RESUME

#define RIG_FUNC_RESUME   CONSTANT_64BIT_FLAG (28)

RESUME – Scan auto-resume

◆ RIG_FUNC_REV

#define RIG_FUNC_REV   CONSTANT_64BIT_FLAG (19)

REV – Reverse transmit and receive frequencies

◆ RIG_FUNC_RF

#define RIG_FUNC_RF   CONSTANT_64BIT_FLAG (14)

RF – RTTY Filter

◆ RIG_FUNC_RIT

#define RIG_FUNC_RIT   CONSTANT_64BIT_FLAG (24)

RIT – Receiver Incremental Tuning

Examples
/tests/testrig.c.

◆ RIG_FUNC_SATMODE

#define RIG_FUNC_SATMODE   CONSTANT_64BIT_FLAG (26)

SATMODE – Satellite mode ON/OFF

◆ RIG_FUNC_SBKIN

#define RIG_FUNC_SBKIN   CONSTANT_64BIT_FLAG (6)

SBKIN – Semi Break-in (CW mode)

◆ RIG_FUNC_SCEN

#define RIG_FUNC_SCEN   CONSTANT_64BIT_FLAG (40)

SCEN – scrambler/encryption

◆ RIG_FUNC_SCOPE

#define RIG_FUNC_SCOPE   CONSTANT_64BIT_FLAG (27)

SCOPE – Simple bandscope ON/OFF

◆ RIG_FUNC_SLICE

#define RIG_FUNC_SLICE   CONSTANT_64BIT_FLAG (41)

Rig slice selection – Flex

◆ RIG_FUNC_SPECTRUM

#define RIG_FUNC_SPECTRUM   CONSTANT_64BIT_FLAG (43)

SPECTRUM – Spectrum scope data output ON/OFF

◆ RIG_FUNC_SPECTRUM_HOLD

#define RIG_FUNC_SPECTRUM_HOLD   CONSTANT_64BIT_FLAG (44)

SPECTRUM_HOLD – Pause spectrum scope updates ON/OFF

◆ RIG_FUNC_SQL

#define RIG_FUNC_SQL   CONSTANT_64BIT_FLAG (20)

SQL – Turn Squelch Monitor on/off

◆ RIG_FUNC_TBURST

#define RIG_FUNC_TBURST   CONSTANT_64BIT_FLAG (29)

TBURST – 1750 Hz tone burst

◆ RIG_FUNC_TONE

#define RIG_FUNC_TONE   CONSTANT_64BIT_FLAG (4)

TONE – CTCSS Tone TX

◆ RIG_FUNC_TRANSCEIVE

#define RIG_FUNC_TRANSCEIVE   CONSTANT_64BIT_FLAG (42)

TRANSCEIVE – Send radio state changes automatically ON/OFF

◆ RIG_FUNC_TSQL

#define RIG_FUNC_TSQL   CONSTANT_64BIT_FLAG (5)

TSQL – CTCSS Activate/De-activate RX

◆ RIG_FUNC_TUNER

#define RIG_FUNC_TUNER   CONSTANT_64BIT_FLAG (30)

TUNER – Enable automatic tuner

◆ RIG_FUNC_VOX

#define RIG_FUNC_VOX   CONSTANT_64BIT_FLAG (3)

VOX – Voice Operated Relay

◆ RIG_FUNC_VSC

#define RIG_FUNC_VSC   CONSTANT_64BIT_FLAG (18)

VSC – Voice Scan Control

◆ RIG_FUNC_XIT

#define RIG_FUNC_XIT   CONSTANT_64BIT_FLAG (31)

XIT – Transmitter Incremental Tuning

Examples
/tests/testrig.c.

◆ RIG_IS_SOFT_ERRCODE

#define RIG_IS_SOFT_ERRCODE (   errcode)
Value:
(errcode == RIG_EINVAL || errcode == RIG_ENIMPL || errcode == RIG_ERJCTED \
|| errcode == RIG_ETRUNC || errcode == RIG_ENAVAIL || errcode == RIG_ENTARGET \
|| errcode == RIG_EVFO || errcode == RIG_EDOM)
@ RIG_ENIMPL
Definition: rig.h:136
@ RIG_ENAVAIL
Definition: rig.h:143
@ RIG_EDOM
Definition: rig.h:149
@ RIG_EVFO
Definition: rig.h:148
@ RIG_ERJCTED
Definition: rig.h:141
@ RIG_ENTARGET
Definition: rig.h:144
@ RIG_EINVAL
Definition: rig.h:133
@ RIG_ETRUNC
Definition: rig.h:142

Determines if the given error code indicates a "soft" error Soft errors are caused by invalid parameters and software/hardware features and cannot be fixed by retries or by re-initializing hardware.

◆ RIG_LEVEL_48

#define RIG_LEVEL_48   CONSTANT_64BIT_FLAG(48)

Future use

◆ RIG_LEVEL_49

#define RIG_LEVEL_49   CONSTANT_64BIT_FLAG(49)

Future use

◆ RIG_LEVEL_50

#define RIG_LEVEL_50   CONSTANT_64BIT_FLAG(50)

Future use

◆ RIG_LEVEL_51

#define RIG_LEVEL_51   CONSTANT_64BIT_FLAG(51)

Future use

◆ RIG_LEVEL_52

#define RIG_LEVEL_52   CONSTANT_64BIT_FLAG(52)

Future use

◆ RIG_LEVEL_53

#define RIG_LEVEL_53   CONSTANT_64BIT_FLAG(53)

Future use

◆ RIG_LEVEL_54

#define RIG_LEVEL_54   CONSTANT_64BIT_FLAG(54)

Future use

◆ RIG_LEVEL_55

#define RIG_LEVEL_55   CONSTANT_64BIT_FLAG(55)

Future use

◆ RIG_LEVEL_56

#define RIG_LEVEL_56   CONSTANT_64BIT_FLAG(56)

Future use

◆ RIG_LEVEL_57

#define RIG_LEVEL_57   CONSTANT_64BIT_FLAG(57)

Future use

◆ RIG_LEVEL_58

#define RIG_LEVEL_58   CONSTANT_64BIT_FLAG(58)

Future use

◆ RIG_LEVEL_59

#define RIG_LEVEL_59   CONSTANT_64BIT_FLAG(59)

Future use

◆ RIG_LEVEL_60

#define RIG_LEVEL_60   CONSTANT_64BIT_FLAG(60)

Future use

◆ RIG_LEVEL_61

#define RIG_LEVEL_61   CONSTANT_64BIT_FLAG(61)

Future use

◆ RIG_LEVEL_62

#define RIG_LEVEL_62   CONSTANT_64BIT_FLAG(62)

Future use

◆ RIG_LEVEL_63

#define RIG_LEVEL_63   CONSTANT_64BIT_FLAG(63)

Future use

◆ RIG_LEVEL_AF

#define RIG_LEVEL_AF   CONSTANT_64BIT_FLAG(3)

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

◆ RIG_LEVEL_AGC

#define RIG_LEVEL_AGC   CONSTANT_64BIT_FLAG(17)

AGC – AGC, arg int (see enum agc_level_e)

◆ RIG_LEVEL_ALC

#define RIG_LEVEL_ALC   CONSTANT_64BIT_FLAG(29)

ALC – ALC, arg float

◆ RIG_LEVEL_ANTIVOX

#define RIG_LEVEL_ANTIVOX   CONSTANT_64BIT_FLAG(22)

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

◆ RIG_LEVEL_APF

#define RIG_LEVEL_APF   CONSTANT_64BIT_FLAG(7)

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

◆ RIG_LEVEL_ATT

#define RIG_LEVEL_ATT   CONSTANT_64BIT_FLAG(1)

ATT – Attenuator, arg int (dB)

◆ RIG_LEVEL_BALANCE

#define RIG_LEVEL_BALANCE   CONSTANT_64BIT_FLAG(19)

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

◆ RIG_LEVEL_BKIN_DLYMS

#define RIG_LEVEL_BKIN_DLYMS   CONSTANT_64BIT_FLAG(25)

BKIN_DLYMS – BKin Delay, arg int Milliseconds These are not settable

◆ RIG_LEVEL_BKINDL

#define RIG_LEVEL_BKINDL   CONSTANT_64BIT_FLAG(18)

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

◆ RIG_LEVEL_COMP

#define RIG_LEVEL_COMP   CONSTANT_64BIT_FLAG(16)

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

◆ RIG_LEVEL_COMP_METER

#define RIG_LEVEL_COMP_METER   CONSTANT_64BIT_FLAG(33)

COMP_METER – Audio output level compression meter, arg float (dB)

◆ RIG_LEVEL_CWPITCH

#define RIG_LEVEL_CWPITCH   CONSTANT_64BIT_FLAG(11)

CWPITCH – CW pitch, arg int (Hz)

◆ RIG_LEVEL_ID_METER

#define RIG_LEVEL_ID_METER   CONSTANT_64BIT_FLAG(35)

ID_METER – Current draw meter, arg float (A, amperes)

◆ RIG_LEVEL_IF

#define RIG_LEVEL_IF   CONSTANT_64BIT_FLAG(6)

IF – IF, arg int (Hz)

◆ RIG_LEVEL_KEYSPD

#define RIG_LEVEL_KEYSPD   CONSTANT_64BIT_FLAG(14)

KEYSPD – Key Speed, arg int (WPM)

◆ RIG_LEVEL_METER

#define RIG_LEVEL_METER   CONSTANT_64BIT_FLAG(20)

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

◆ RIG_LEVEL_MICGAIN

#define RIG_LEVEL_MICGAIN   CONSTANT_64BIT_FLAG(13)

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

◆ RIG_LEVEL_MONITOR_GAIN

#define RIG_LEVEL_MONITOR_GAIN   CONSTANT_64BIT_FLAG(37)

MONITOR_GAIN – Monitor gain (level for monitoring of transmitted audio) arg float [0.0 ... 1.0]

◆ RIG_LEVEL_NB

#define RIG_LEVEL_NB   CONSTANT_64BIT_FLAG(38)

NB – Noise Blanker level, arg float [0.0 ... 1.0]

◆ RIG_LEVEL_NONE

#define RIG_LEVEL_NONE   0

'' – No Level

◆ RIG_LEVEL_NOTCHF

#define RIG_LEVEL_NOTCHF   CONSTANT_64BIT_FLAG(15)

NOTCHF – Notch Freq., arg int (Hz)

◆ RIG_LEVEL_NOTCHF_RAW

#define RIG_LEVEL_NOTCHF_RAW   CONSTANT_64BIT_FLAG(36)

NOTCHF_RAW – Notch Freq., arg float [0.0 ... 1.0]

◆ RIG_LEVEL_NR

#define RIG_LEVEL_NR   CONSTANT_64BIT_FLAG(8)

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

◆ RIG_LEVEL_PBT_IN

#define RIG_LEVEL_PBT_IN   CONSTANT_64BIT_FLAG(9)

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

◆ RIG_LEVEL_PBT_OUT

#define RIG_LEVEL_PBT_OUT   CONSTANT_64BIT_FLAG(10)

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

◆ RIG_LEVEL_PREAMP

#define RIG_LEVEL_PREAMP   CONSTANT_64BIT_FLAG(0)

PREAMP – Preamp, arg int (dB)

◆ RIG_LEVEL_RAWSTR

#define RIG_LEVEL_RAWSTR   CONSTANT_64BIT_FLAG(26)

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

◆ RIG_LEVEL_RF

#define RIG_LEVEL_RF   CONSTANT_64BIT_FLAG(4)

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

◆ RIG_LEVEL_RFPOWER

#define RIG_LEVEL_RFPOWER   CONSTANT_64BIT_FLAG(12)

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

◆ RIG_LEVEL_RFPOWER_METER

#define RIG_LEVEL_RFPOWER_METER   CONSTANT_64BIT_FLAG(32)

< Bandwidth Control, arg int (Hz) RFPOWER_METER – RF power output meter, arg float [0.0 ... 1.0] (percentage of maximum power)

◆ RIG_LEVEL_RFPOWER_METER_WATTS

#define RIG_LEVEL_RFPOWER_METER_WATTS   CONSTANT_64BIT_FLAG(39)

RFPOWER_METER_WATTS – RF power output meter, arg float [0.0 ... MAX] (output power in watts)

◆ RIG_LEVEL_SLOPE_HIGH

#define RIG_LEVEL_SLOPE_HIGH   CONSTANT_64BIT_FLAG(24)

SLOPE_HIGH – Slope tune, high frequency cut, arg int (Hz)

◆ RIG_LEVEL_SLOPE_LOW

#define RIG_LEVEL_SLOPE_LOW   CONSTANT_64BIT_FLAG(23)

SLOPE_LOW – Slope tune, low frequency cut, arg int (Hz)

◆ RIG_LEVEL_SPECTRUM_ATT

#define RIG_LEVEL_SPECTRUM_ATT   CONSTANT_64BIT_FLAG(47)

SPECTRUM_ATT – Spectrum scope attenuator, arg int (dB). Supported attenuator values defined in rig caps.

◆ RIG_LEVEL_SPECTRUM_AVG

#define RIG_LEVEL_SPECTRUM_AVG   CONSTANT_64BIT_FLAG(46)

SPECTRUM_AVG – Spectrum scope averaging mode, arg int (see struct rig_spectrum_avg_mode). Supported averaging modes defined in rig caps.

◆ RIG_LEVEL_SPECTRUM_EDGE_HIGH

#define RIG_LEVEL_SPECTRUM_EDGE_HIGH   CONSTANT_64BIT_FLAG(43)

SPECTRUM_EDGE_HIGH – Spectrum scope high edge in fixed mode, arg int (Hz)

◆ RIG_LEVEL_SPECTRUM_EDGE_LOW

#define RIG_LEVEL_SPECTRUM_EDGE_LOW   CONSTANT_64BIT_FLAG(42)

SPECTRUM_EDGE_LOW – Spectrum scope low edge in fixed mode, arg int (Hz)

◆ RIG_LEVEL_SPECTRUM_MODE

#define RIG_LEVEL_SPECTRUM_MODE   CONSTANT_64BIT_FLAG(40)

SPECTRUM_MODE – Spectrum scope mode, arg int (see enum rig_spectrum_mode_e). Supported modes defined in rig caps.

◆ RIG_LEVEL_SPECTRUM_REF

#define RIG_LEVEL_SPECTRUM_REF   CONSTANT_64BIT_FLAG(45)

SPECTRUM_REF – Spectrum scope reference display level, arg float (dB, define rig-specific granularity)

◆ RIG_LEVEL_SPECTRUM_SPAN

#define RIG_LEVEL_SPECTRUM_SPAN   CONSTANT_64BIT_FLAG(41)

SPECTRUM_SPAN – Spectrum scope span in center mode, arg int (Hz). Supported spans defined in rig caps.

◆ RIG_LEVEL_SPECTRUM_SPEED

#define RIG_LEVEL_SPECTRUM_SPEED   CONSTANT_64BIT_FLAG(44)

SPECTRUM_SPEED – Spectrum scope update speed, arg int (highest is fastest, define rig-specific granularity)

◆ RIG_LEVEL_SQL

#define RIG_LEVEL_SQL   CONSTANT_64BIT_FLAG(5)

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

◆ RIG_LEVEL_STRENGTH

#define RIG_LEVEL_STRENGTH   CONSTANT_64BIT_FLAG(30)

STRENGTH – Effective (calibrated) signal strength relative to S9, arg int (dB)

◆ RIG_LEVEL_SWR

#define RIG_LEVEL_SWR   CONSTANT_64BIT_FLAG(28)

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

◆ RIG_LEVEL_TEMP_METER

#define RIG_LEVEL_TEMP_METER   CONSTANT_64BIT_FLAG(48)

TEMP_METER – arg int (C, centigrade)

◆ RIG_LEVEL_VD_METER

#define RIG_LEVEL_VD_METER   CONSTANT_64BIT_FLAG(34)

VD_METER – Input voltage level meter, arg float (V, volts)

◆ RIG_LEVEL_VOXDELAY

#define RIG_LEVEL_VOXDELAY   CONSTANT_64BIT_FLAG(2)

VOXDELAY – VOX delay, arg int (tenth of seconds)

◆ RIG_LEVEL_VOXGAIN

#define RIG_LEVEL_VOXGAIN   CONSTANT_64BIT_FLAG(21)

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

◆ RIG_MODE_AM

#define RIG_MODE_AM   CONSTANT_64BIT_FLAG (0)

AM – Amplitude Modulation

Examples
/tests/testrig.c.

◆ RIG_MODE_AMN

#define RIG_MODE_AMN   CONSTANT_64BIT_FLAG (29)

AM-N – Narrow band AM mode IC-R30

◆ RIG_MODE_AMS

#define RIG_MODE_AMS   CONSTANT_64BIT_FLAG (9)

AMS – Amplitude Modulation Synchronous

◆ RIG_MODE_BIT37

#define RIG_MODE_BIT37   CONSTANT_64BIT_FLAG (37)

reserved for future expansion

◆ RIG_MODE_BIT38

#define RIG_MODE_BIT38   CONSTANT_64BIT_FLAG (38)

reserved for future expansion

◆ RIG_MODE_BIT39

#define RIG_MODE_BIT39   CONSTANT_64BIT_FLAG (39)

reserved for future expansion

◆ RIG_MODE_BIT40

#define RIG_MODE_BIT40   CONSTANT_64BIT_FLAG (40)

reserved for future expansion

◆ RIG_MODE_BIT41

#define RIG_MODE_BIT41   CONSTANT_64BIT_FLAG (41)

reserved for future expansion

◆ RIG_MODE_BIT42

#define RIG_MODE_BIT42   CONSTANT_64BIT_FLAG (42)

reserved for future expansion

◆ RIG_MODE_BIT43

#define RIG_MODE_BIT43   CONSTANT_64BIT_FLAG (43)

reserved for future expansion

◆ RIG_MODE_BIT44

#define RIG_MODE_BIT44   CONSTANT_64BIT_FLAG (44)

reserved for future expansion

◆ RIG_MODE_BIT45

#define RIG_MODE_BIT45   CONSTANT_64BIT_FLAG (45)

reserved for future expansion

◆ RIG_MODE_BIT46

#define RIG_MODE_BIT46   CONSTANT_64BIT_FLAG (46)

reserved for future expansion

◆ RIG_MODE_BIT47

#define RIG_MODE_BIT47   CONSTANT_64BIT_FLAG (47)

reserved for future expansion

◆ RIG_MODE_BIT48

#define RIG_MODE_BIT48   CONSTANT_64BIT_FLAG (48)

reserved for future expansion

◆ RIG_MODE_BIT49

#define RIG_MODE_BIT49   CONSTANT_64BIT_FLAG (49)

reserved for future expansion

◆ RIG_MODE_BIT50

#define RIG_MODE_BIT50   CONSTANT_64BIT_FLAG (50)

reserved for future expansion

◆ RIG_MODE_BIT51

#define RIG_MODE_BIT51   CONSTANT_64BIT_FLAG (51)

reserved for future expansion

◆ RIG_MODE_BIT52

#define RIG_MODE_BIT52   CONSTANT_64BIT_FLAG (52)

reserved for future expansion

◆ RIG_MODE_BIT53

#define RIG_MODE_BIT53   CONSTANT_64BIT_FLAG (53)

reserved for future expansion

◆ RIG_MODE_BIT54

#define RIG_MODE_BIT54   CONSTANT_64BIT_FLAG (54)

reserved for future expansion

◆ RIG_MODE_BIT55

#define RIG_MODE_BIT55   CONSTANT_64BIT_FLAG (55)

reserved for future expansion

◆ RIG_MODE_BIT56

#define RIG_MODE_BIT56   CONSTANT_64BIT_FLAG (56)

reserved for future expansion

◆ RIG_MODE_BIT57

#define RIG_MODE_BIT57   CONSTANT_64BIT_FLAG (57)

reserved for future expansion

◆ RIG_MODE_BIT58

#define RIG_MODE_BIT58   CONSTANT_64BIT_FLAG (58)

reserved for future expansion

◆ RIG_MODE_BIT59

#define RIG_MODE_BIT59   CONSTANT_64BIT_FLAG (59)

reserved for future expansion

◆ RIG_MODE_BIT60

#define RIG_MODE_BIT60   CONSTANT_64BIT_FLAG (60)

reserved for future expansion

◆ RIG_MODE_BIT61

#define RIG_MODE_BIT61   CONSTANT_64BIT_FLAG (61)

reserved for future expansion

◆ RIG_MODE_BIT62

#define RIG_MODE_BIT62   CONSTANT_64BIT_FLAG (62)

reserved for future expansion

◆ RIG_MODE_C4FM

#define RIG_MODE_C4FM   CONSTANT_64BIT_FLAG (33)

Yaesu C4FM mode

◆ RIG_MODE_CW

#define RIG_MODE_CW   CONSTANT_64BIT_FLAG (1)

CW – CW "normal" sideband

Examples
/tests/testrig.c.

◆ RIG_MODE_CWN

#define RIG_MODE_CWN   CONSTANT_64BIT_FLAG (36)

CWN – Narrow band CW (FT-736R)

◆ RIG_MODE_CWR

#define RIG_MODE_CWR   CONSTANT_64BIT_FLAG (7)

CWR – CW "reverse" sideband

◆ RIG_MODE_DCR

#define RIG_MODE_DCR   CONSTANT_64BIT_FLAG (28)

DCR – VHF,UHF digital mode IC-R8600

◆ RIG_MODE_DD

#define RIG_MODE_DD   CONSTANT_64BIT_FLAG (32)

DD Mode IC-9700

◆ RIG_MODE_DPMR

#define RIG_MODE_DPMR   CONSTANT_64BIT_FLAG (25)

dPMR – digital PMR, VHF,UHF digital mode IC-R8600

◆ RIG_MODE_DSB

#define RIG_MODE_DSB   CONSTANT_64BIT_FLAG (19)

DSB – Double sideband suppressed carrier

◆ RIG_MODE_DSTAR

#define RIG_MODE_DSTAR   CONSTANT_64BIT_FLAG (24)

D-Star – VHF,UHF digital mode IC-R8600

◆ RIG_MODE_ECSSLSB

#define RIG_MODE_ECSSLSB   CONSTANT_64BIT_FLAG (14)

ECSSLSB – Exalted Carrier Single Sideband LSB

◆ RIG_MODE_ECSSUSB

#define RIG_MODE_ECSSUSB   CONSTANT_64BIT_FLAG (13)

ECSSUSB – Exalted Carrier Single Sideband USB

◆ RIG_MODE_FAX

#define RIG_MODE_FAX   CONSTANT_64BIT_FLAG (15)

FAX – Facsimile Mode

◆ RIG_MODE_FM

#define RIG_MODE_FM   CONSTANT_64BIT_FLAG (5)

FM – "narrow" band FM

Examples
/tests/testrig.c.

◆ RIG_MODE_FMN

#define RIG_MODE_FMN   CONSTANT_64BIT_FLAG (21)

FMN – FM Narrow Kenwood ts990s

◆ RIG_MODE_LSB

#define RIG_MODE_LSB   CONSTANT_64BIT_FLAG (3)

LSB – Lower Side Band

Examples
/tests/testrig.c.

◆ RIG_MODE_NONE

#define RIG_MODE_NONE   0

'' – None

◆ RIG_MODE_NXDN_N

#define RIG_MODE_NXDN_N   CONSTANT_64BIT_FLAG (27)

NXDN-N – VHF,UHF digital mode IC-R8600

◆ RIG_MODE_NXDNVN

#define RIG_MODE_NXDNVN   CONSTANT_64BIT_FLAG (26)

NXDN-VN – VHF,UHF digital mode IC-R8600

◆ RIG_MODE_P25

#define RIG_MODE_P25   CONSTANT_64BIT_FLAG (23)

P25 – APCO/P25 VHF,UHF digital mode IC-R8600

◆ RIG_MODE_PKTAM

#define RIG_MODE_PKTAM   CONSTANT_64BIT_FLAG (22)

PKTAM – Packet/Digital AM mode e.g. IC7300

◆ RIG_MODE_PKTFM

#define RIG_MODE_PKTFM   CONSTANT_64BIT_FLAG (12)

PKTFM – Packet/Digital FM mode (dedicated port)

◆ RIG_MODE_PKTFMN

#define RIG_MODE_PKTFMN   CONSTANT_64BIT_FLAG (34)

Yaesu DATA-FM-N

◆ RIG_MODE_PKTLSB

#define RIG_MODE_PKTLSB   CONSTANT_64BIT_FLAG (10)

PKTLSB – Packet/Digital LSB mode (dedicated port)

◆ RIG_MODE_PKTUSB

#define RIG_MODE_PKTUSB   CONSTANT_64BIT_FLAG (11)

PKTUSB – Packet/Digital USB mode (dedicated port)

◆ RIG_MODE_PSK

#define RIG_MODE_PSK   CONSTANT_64BIT_FLAG (30)

PSK - Kenwood PSK and others

◆ RIG_MODE_PSKR

#define RIG_MODE_PSKR   CONSTANT_64BIT_FLAG (31)

PSKR - Kenwood PSKR and others

◆ RIG_MODE_RTTY

#define RIG_MODE_RTTY   CONSTANT_64BIT_FLAG (4)

RTTY – Radio Teletype

◆ RIG_MODE_RTTYR

#define RIG_MODE_RTTYR   CONSTANT_64BIT_FLAG (8)

RTTYR – RTTY "reverse" sideband

◆ RIG_MODE_SAH

#define RIG_MODE_SAH   CONSTANT_64BIT_FLAG (18)

SAH – Synchronous AM upper (higher) sideband

◆ RIG_MODE_SAL

#define RIG_MODE_SAL   CONSTANT_64BIT_FLAG (17)

SAL – Synchronous AM lower sideband

◆ RIG_MODE_SAM

#define RIG_MODE_SAM   CONSTANT_64BIT_FLAG (16)

SAM – Synchronous AM double sideband

◆ RIG_MODE_SPEC

#define RIG_MODE_SPEC   CONSTANT_64BIT_FLAG (35)

Unfiltered as in PowerSDR

◆ RIG_MODE_TESTS_MAX

#define RIG_MODE_TESTS_MAX   CONSTANT_64BIT_FLAG (63)

last bit available for 64-bit enum MUST ALWAYS BE LAST, Max Count for dumpcaps.c

◆ RIG_MODE_USB

#define RIG_MODE_USB   CONSTANT_64BIT_FLAG (2)

USB – Upper Side Band

Examples
/tests/testrig.c.

◆ RIG_MODE_WFM

#define RIG_MODE_WFM   CONSTANT_64BIT_FLAG (6)

WFM – broadcast wide FM

◆ RIG_TRN_OFF

#define RIG_TRN_OFF   0

Transceive mode The rig notifies the host of any event, like freq changed, mode changed, etc.Turn it off.

Transceive mode

◆ RIG_TRN_POLL

#define RIG_TRN_POLL   2

RIG_TRN_POLL means we have to poll the rig

◆ RIG_TRN_RIG

#define RIG_TRN_RIG   1

Transceive mode.

RIG_TRN_RIG means the rig acts asynchronously

◆ W

#define W (   p)    Watts(p)

power unit macros

Same as Watts for the person who is too lazy to type Watts :-)

◆ Watts

#define Watts (   p)    ((int)((p)*1000))

power unit macros

Converts a power level integer to watts. This is limited to 2 gigawatts on 32 bit systems.

Typedef Documentation

◆ cal_table_float_t

calibration table type for float values

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

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

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

◆ cal_table_t

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.

◆ freq_range_t

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.

◆ freq_t

typedef double freq_t

Frequency type,.

Frequency type unit in Hz, able to hold SHF frequencies.

◆ pbwidth_t

◆ port_t

typedef hamlib_port_t port_t

Rig data structure.

Basic rig type, can store some useful info about different radios. Each backend must be able to populate this structure, so we can make useful inquiries about capabilities.

The main idea of this struct is that it will be defined by the backend rig driver, and will remain readonly for the application. Fields that need to be modifiable by the application are copied into the struct rig_state, which is a kind of private storage of the RIG instance.

This way, you can have several rigs running within the same application, sharing the struct rig_caps of the backend, while keeping their own customized data.

mdblack: Don't move or add fields around without bumping the version numbers DLL or shared library replacement depends on order

Enumeration of all rig_ functions

◆ rig_level_e

typedef uint64_t rig_level_e

Rig Level Settings.

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

See also
rig_parse_level(), rig_strlevel()

◆ rmode_t

typedef uint64_t rmode_t

Radio mode.

Various modes supported by a rig.
STRING used in rigctl

See also
rig_parse_mode(), rig_strrmode() TODO: Add new 8600 modes to rig2icom_mode() and icom2rig_mode() in frame.c

◆ setting_t

typedef uint64_t setting_t

Setting.

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

◆ shortfreq_t

typedef signed long shortfreq_t

Short frequency type.

Frequency in Hz restricted to 31bits, suitable for offsets, shifts, etc..

◆ vfo_t

typedef unsigned 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_level_e

AGC delay settings.

Enumerator
RIG_AGC_USER 

user selectable

◆ ann_t

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

◆ chan_type_t

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

◆ cookie_e

enum cookie_e

Rig Cookie enumerations.

Cookies are used for a client to request exclusive control of the rig until the client releases the cookie Cookies will expire after 1 second unless renewed Normal flow would be cookie=rig_cookie(NULL, RIG_COOKIE_GET), rig op, rig_cookie(cookie, RIG_COOKIE_RENEW), rig op, etc....

◆ dcd_e

enum dcd_e

DCD status.

Enumerator
RIG_DCD_OFF 

Squelch closed

RIG_DCD_ON 

Squelch open

◆ dcd_type_t

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

RIG_DCD_GPIO 

DCD status from GPIO pin

RIG_DCD_GPION 

DCD status from inverted GPIO pin

◆ powerstat_t

Radio power state.

Enumerator
RIG_POWER_OFF 

Power off

RIG_POWER_ON 

Power on

RIG_POWER_STANDBY 

Standby

RIG_POWER_OPERATE 

Operate (from Standby)

RIG_POWER_UNKNOWN 

Unknown power status

◆ ptt_t

enum ptt_t

PTT status.

Enumerator
RIG_PTT_OFF 

PTT deactivated

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

◆ ptt_type_t

enum ptt_type_t

PTT type.

See also
rig_get_ptt()
Enumerator
RIG_PTT_NONE 

No PTT available

RIG_PTT_RIG 

Legacy PTT (CAT 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 (CAT PTT), supports RIG_PTT_ON_MIC/RIG_PTT_ON_DATA

RIG_PTT_CM108 

PTT control through CM108 GPIO pin

RIG_PTT_GPIO 

PTT control through GPIO pin

RIG_PTT_GPION 

PTT control through inverted GPIO pin

◆ reset_t

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

◆ rig_conf_e

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 BINARY: val.b

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

RIG_CONF_BINARY 

Binary buffer type

◆ rig_debug_level_e

Hamlib debug levels.

NOTE: 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

RIG_DEBUG_CACHE 

caching

◆ rig_errcode_e

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 

0 No error, operation completed successfully

RIG_EINVAL 

1 invalid parameter

RIG_ECONF 

2 invalid configuration (serial,..)

RIG_ENOMEM 

3 memory shortage

RIG_ENIMPL 

4 function not implemented, but will be

RIG_ETIMEOUT 

5 communication timed out

RIG_EIO 

6 IO error, including open failed

RIG_EINTERNAL 

7 Internal Hamlib error, huh!

RIG_EPROTO 

8 Protocol error

RIG_ERJCTED 

9 Command rejected by the rig

RIG_ETRUNC 

10 Command performed, but arg truncated

RIG_ENAVAIL 

11 Function not available

RIG_ENTARGET 

12 VFO not targetable

RIG_BUSERROR 

13 Error talking on the bus

RIG_BUSBUSY 

14 Collision on the bus

RIG_EARG 

15 NULL RIG handle or any invalid pointer parameter in get arg

RIG_EVFO 

16 Invalid VFO

RIG_EDOM 

17 Argument out of domain of func

◆ rig_parm_e

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

RIG_PARM_SCREENSAVER 

SCREENSAVER – rig specific timeouts

◆ rig_port_e

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

RIG_PORT_GPIO 

GPIO

RIG_PORT_GPION 

GPIO inverted

◆ rig_spectrum_mode_e

Spectrum scope modes.

Enumerator
RIG_SPECTRUM_MODE_CENTER 

Spectrum scope centered around the VFO frequency

RIG_SPECTRUM_MODE_FIXED 

Spectrum scope edge frequencies are fixed

RIG_SPECTRUM_MODE_CENTER_SCROLL 

Spectrum scope edge frequencies are fixed, but identical to what the center mode would use. Scrolling is enabled.

RIG_SPECTRUM_MODE_FIXED_SCROLL 

Spectrum scope edge frequencies are fixed with scrolling enabled

◆ rig_status_e

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!

◆ rig_type_t

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

◆ rptr_shift_t

Repeater shift type.

Enumerator
RIG_RPT_SHIFT_NONE 

No repeater shift

RIG_RPT_SHIFT_MINUS 

"-" shift

RIG_RPT_SHIFT_PLUS 

"+" shift

◆ scan_t

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-op value

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

RIG_SCAN_STOP 

STOP – Stop scanning

◆ serial_control_state_e

Serial control state.

Enumerator
RIG_SIGNAL_UNSET 

Unset or tri-state

RIG_SIGNAL_ON 

ON

RIG_SIGNAL_OFF 

OFF

◆ serial_handshake_e

Serial handshake.

Enumerator
RIG_HANDSHAKE_NONE 

No handshake

RIG_HANDSHAKE_XONXOFF 

Software XON/XOFF

RIG_HANDSHAKE_HARDWARE 

Hardware CTS/RTS

◆ serial_parity_e

Serial parity.

Enumerator
RIG_PARITY_NONE 

No parity

RIG_PARITY_ODD 

Odd

RIG_PARITY_EVEN 

Even

RIG_PARITY_MARK 

Mark

RIG_PARITY_SPACE 

Space

◆ split_t

enum split_t

Split mode.

Enumerator
RIG_SPLIT_OFF 

Split mode disabled

RIG_SPLIT_ON 

Split mode enabled

◆ vfo_op_t

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

◆ hl_usleep()

int hl_usleep ( rig_useconds_t  usec)

provide sleep and usleep replacements

Note
parameters are same as man page for each

◆ rig_cleanup()

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 eventually been closed already with rig_close().

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_init(), rig_close()
Examples
/tests/testrig.c.

◆ rig_close()

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().

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_cleanup(), rig_open()
Examples
/tests/testrig.c.

◆ rig_confparam_lookup()

const struct confparams* rig_confparam_lookup ( RIG rig,
const char *  name 
)

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.

◆ rig_cookie()

int rig_cookie ( RIG rig,
enum cookie_e  cookie_cmd,
char *  cookie,
int  cookie_len 
)

get a cookie to grab rig control

RIG_COOKIE_GET must have cookie=NULL or NULL returned RIG_COOKIE_RENEW must have cookie!=NULL or NULL returned RIG_COOKIE_RELEASE must have cookie!=NULL or NULL returned; Cookies should only be used when needed to keep commands sequenced correctly For example, when setting both VFOA and VFOB frequency and mode Example to wait for cookie, do rig commands, and release while((cookie=rig_cookie(NULL, RIG_COOKIE_GET)) == NULL) hl_usleep(10*1000); set_freq A;set mode A;set freq B;set modeB; rig_cookie(cookie,RIG_COOKIE_RELEASE); if wait!=0 rig_cookie with RIG_COOKIE_GET will wait for the cookie to become available

◆ rig_copy_channel()

int rig_copy_channel ( RIG rig,
channel_t dest,
const channel_t src 
)

copy channel structure to another channel structure

Parameters
rigThe rig handle
destThe destination location
srcThe source location

Copies the data associated with one channel structure to another

Returns
RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_get_chan_all_cb(), rig_set_chan_all()

◆ rig_debug()

void rig_debug ( enum rig_debug_level_e  debug_level,
const char *  fmt,
  ... 
)

Print debugging messages through stderr by default.

Parameters
debug_levelDebug level from none to most output.
fmtFormatted character string to print.

The formatted character string is passed to the frprintf(3) C library call and follows its format specification.

◆ rig_ext_func_foreach()

int rig_ext_func_foreach ( RIG rig,
int(*)(RIG *, const struct confparams *, rig_ptr_t)  cfunc,
rig_ptr_t  data 
)

Executes cfunc on all the elements stored in the extfuncs table.

Parameters
rigThe rig handle
cfunccallback function of each extfunc
datacookie to be passed to cfunc callback

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_func_foreach.

◆ rig_ext_level_foreach()

int rig_ext_level_foreach ( RIG rig,
int(*)(RIG *, const struct confparams *, rig_ptr_t)  cfunc,
rig_ptr_t  data 
)

Executes cfunc on all the elements stored in the extlevels table.

Parameters
rigThe rig handle
cfunccallback function of each extlevel
datacookie to be passed to cfunc callback

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.

◆ rig_ext_lookup()

const struct confparams* rig_ext_lookup ( RIG rig,
const char *  name 
)

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

Parameters
rig
name

Lookup extlevels table, then extfuncs, then extparms.

Returns NULL if nothing found

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

◆ rig_ext_lookup_tok()

const struct confparams* rig_ext_lookup_tok ( RIG rig,
token_t  token 
)

lookup ext token, return pointer to confparams struct.

Parameters
rig
token

lookup extlevels table first, then extfuncs, then fall back to extparms.

Returns NULL if nothing found

◆ rig_ext_parm_foreach()

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

Executes cfunc on all the elements stored in the extparms table.

Parameters
rigThe rig handle
cfunccallback function of each extparm
datacookie to be passed to cfunc callback

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.

◆ rig_ext_token_lookup()

token_t rig_ext_token_lookup ( RIG rig,
const char *  name 
)

Simple lookup returning token id associated with name.

Parameters
rig
name

◆ rig_get_ant()

int rig_get_ant ( RIG rig,
vfo_t  vfo,
ant_t  ant,
value_t option,
ant_t ant_curr,
ant_t ant_tx,
ant_t ant_rx 
)

get the current antenna

Parameters
rigThe rig handle
vfoThe target VFO
antThe antenna to query option for
optionThe option value for the antenna, rig specific.
ant_currThe currently selected antenna
ant_txThe currently selected TX antenna
ant_rxThe currently selected RX antenna

Retrieves the current antenna.

If ant_tx and/or ant_rx are unused by the rig they will be set to RIG_ANT_UNKNOWN and only ant_curr will be set.

Returns
RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_ant()

◆ rig_get_chan_all()

int rig_get_chan_all ( RIG rig,
vfo_t  vfo,
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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_get_chan_all_cb(), rig_set_chan_all()

◆ rig_get_chan_all_cb()

int rig_get_chan_all_cb ( RIG rig,
vfo_t  vfo,
chan_cb_t  chan_cb,
rig_ptr_t  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 preferred 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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_get_chan_all(), rig_set_chan_all_cb()

◆ rig_get_channel()

int rig_get_channel ( RIG rig,
vfo_t  vfox,
channel_t chan,
int  read_only 
)

get channel data

Parameters
rigThe rig handle
chanThe location where to store the channel data
read_onlyif true chan info will be filled but rig will not change, if false rig will update to chan info

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;
chan->read_only = 1;
err = rig_get_channel(rig, &chan);
if (err != RIG_OK)
error("get_channel failed: %s", rigerror(err));
#define RIG_VFO_MEM
MEM – means Memory mode, to be used with set_vfo
Definition: rig.h:476
int rig_get_channel(RIG *rig, vfo_t vfox, channel_t *chan, int read_only)
get channel data
Definition: mem.c:832
@ RIG_OK
Definition: rig.h:132
Channel structure.
Definition: rig.h:1395
vfo_t vfo
Definition: rig.h:1398
int channel_num
Definition: rig.h:1396
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 responsibility of the caller to manage and eventually
free it.
Returns
RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_channel()

◆ rig_get_conf()

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 parameter 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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_conf()

◆ rig_get_ctcss_sql()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_ctcss_sql(), rig_get_ctcss_tone()

◆ 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 for the transmitter only.

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_ctcss_tone(), rig_get_ctcss_sql()

◆ rig_get_dcd()

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?).

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

◆ rig_get_dcs_code()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_dcs_code(), rig_get_dcs_sql()

◆ 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 successful, ortherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_dcs_sql(), rig_get_dcs_code()

◆ rig_get_ext_func()

int rig_get_ext_func ( RIG rig,
vfo_t  vfo,
token_t  token,
int *  status 
)

get the value of a function extra parameter

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

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

Returns
RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_ext_func()

◆ rig_get_ext_level()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_ext_level()

◆ rig_get_ext_parm()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_ext_parm()

◆ rig_get_freq()

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).

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_freq()
Examples
/tests/testrig.c.

◆ rig_get_freqs()

int rig_get_freqs ( RIG rig,
freq_t freqA,
freq_t  freqB 
)

get the frequency of VFOA and VFOB

Parameters
rigThe rig handle
freqAThe location where to store the VFOA/Main frequency
freqBThe location where to store the VFOB/Sub frequency

Retrieves the frequency of VFOA/Main and VFOB/Sub The value stored at freq location equals RIG_FREQ_NONE when the current frequency of the VFO is not defined (e.g. blank memory).

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_freq()

◆ rig_get_func()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_func()
Examples
/tests/testrig.c.

◆ rig_get_info()

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 successful, otherwise NULL if an error occurred or get_info not part of capabilities.

◆ rig_get_level()

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: \a 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 responsibility
of the backend to return values calibrated for this scale.
Returns
RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_has_get_level(), rig_set_level()

< STRENGTH – Effective (calibrated) signal strength relative to S9, arg int (dB)

< STRENGTH – Effective (calibrated) signal strength relative to S9, arg int (dB)

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

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

◆ rig_get_mem()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_mem()

◆ rig_get_mem_all()

int rig_get_mem_all ( RIG rig,
vfo_t  vfo,
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 preferred method to support clonable rigs.

Returns
RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (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

◆ rig_get_mem_all_cb()

int rig_get_mem_all_cb ( RIG rig,
vfo_t  vfo,
chan_cb_t  chan_cb,
confval_cb_t  parm_cb,
rig_ptr_t  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 preferred method to support clonable rigs.

Returns
RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (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

◆ rig_get_mode()

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

< '' – None

< '' – None

< '' – None

Examples
/tests/testrig.c.

◆ rig_get_parm()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_has_get_parm(), rig_set_parm()

◆ rig_get_powerstat()

int rig_get_powerstat ( RIG rig,
powerstat_t status 
)

get the on/off status of the radio

Parameters
rigThe rig handle
statusThe location 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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_powerstat()

◆ rig_get_ptt()

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?).

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_ptt()

◆ rig_get_range()

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.

◆ rig_get_resolution()

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 successful, otherwise a negative value if an error occurred.

◆ rig_get_rig_info()

int rig_get_rig_info ( RIG rig,
char *  response,
int  max_response_len 
)

get freq/mode/width for requested VFO

Parameters
rigThe rig handle

returns a string for all known VFOs plus rig split status and satellite mode status

◆ rig_get_rit()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_rit()

◆ rig_get_rptr_offs()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_rptr_offs()

◆ rig_get_rptr_shift()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_rptr_shift()

◆ rig_get_split_freq()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_split_freq()

◆ rig_get_split_freq_mode()

int rig_get_split_freq_mode ( RIG rig,
vfo_t  vfo,
freq_t tx_freq,
rmode_t tx_mode,
pbwidth_t tx_width 
)

get the current split frequency and mode

Parameters
rigThe rig handle
vfoThe target VFO
tx_freqThe location where to store the current transmit frequency
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) frequency, 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).

This function maybe optimized on some rig back ends, where the TX VFO cannot be directly addressed, to reduce the number of times the rig VFOs have to be exchanged or swapped to complete this combined function.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_get_split_freq(), rig_get_split_mode(), rig_set_split_freq_mode()

◆ rig_get_split_mode()

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).

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_split_mode()

< '' – None

◆ rig_get_split_vfo()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_split_vfo()

◆ rig_get_trn()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_trn()

◆ rig_get_ts()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_ts()

◆ rig_get_twiddle()

int rig_get_twiddle ( RIG rig,
int *  seconds 
)

get the twiddle timeout value (secs)

Parameters
rigThe rig handle
secondsThe timeout value

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_twiddle()

◆ rig_get_vfo()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_vfo()
Examples
/tests/testrig.c.

◆ rig_get_vfo_info()

int rig_get_vfo_info ( RIG rig,
vfo_t  vfo,
freq_t freq,
rmode_t mode,
pbwidth_t width,
split_t split,
int *  satmode 
)

get freq/mode/width for requested VFO

Parameters
rigThe rig handle
vfoThe VFO to get
*freqfrequency answer
*modemode answer
*widthbandwidth answer

Gets the current VFO information. 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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case use rigerror(return) for error message).

< '' – None

◆ rig_get_vfo_list()

int rig_get_vfo_list ( RIG rig,
char *  buf,
int  buflen 
)

get list of available vfos

Parameters
rigThe rig handle
char*char buffer[SPRINTF_MAX_SIZE] to hold result
lenmax length of char buffer

Retrieves all usable vfo entries for the rig

Returns
a pointer to a string, e.g. "VFOA VFOB Mem" if the operation has been successful, otherwise NULL if an error occurred

◆ rig_get_xit()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_xit()

◆ rig_has_get_func()

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()
Examples
/tests/testrig.c.

◆ rig_has_get_level()

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()

◆ rig_has_get_parm()

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()

◆ rig_has_scan()

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()

◆ rig_has_set_func()

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()
Examples
/tests/testrig.c.

◆ rig_has_set_level()

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()

◆ rig_has_set_parm()

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()

◆ rig_has_vfo_op()

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_init()

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()

< STRENGTH – Effective (calibrated) signal strength relative to S9, arg int (dB)

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

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

< STRENGTH – Effective (calibrated) signal strength relative to S9, arg int (dB)

Examples
/tests/testrig.c.

◆ rig_lookup_mem_caps()

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 successful, otherwise a NULL pointer, most probably because of incorrect channel number or buggy backend.

◆ rig_mem_count()

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

◆ rig_mW2power()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_power2mW()

◆ rig_need_debug()

int rig_need_debug ( enum rig_debug_level_e  debug_level)

Test if a given debug level is active.

Parameters
debug_levelThe level to test.

May be used to determine if an action such as opening a dialog should happen only if a desired debug level is active.

Also useful for dump_hex(), etc.

◆ rig_open()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Return values
RIG_EINVALrig is NULL or inconsistent.
RIG_ENIMPLport type communication is not implemented yet.
See also
rig_init(), rig_close()
Examples
/tests/testrig.c.

◆ rig_passband_narrow()

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 successful, or a 0 if an error occurred (passband not found, whatever).
See also
rig_passband_normal(), rig_passband_wide()
Examples
/tests/testrig.c.

◆ rig_passband_normal()

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 successful, or a 0 if an error occurred (passband not found, whatever).
See also
rig_passband_narrow(), rig_passband_wide()

< CWR – CW "reverse" sideband

< CW – CW "normal" sideband

< RTTYR – RTTY "reverse" sideband

< RTTY – Radio Teletype

Examples
/tests/testrig.c.

◆ 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 successful, or a 0 if an error occurred (passband not found, whatever).
See also
rig_passband_narrow(), rig_passband_normal()

◆ rig_power2mW()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_mW2power()

◆ rig_probe()

rig_model_t rig_probe ( hamlib_port_t *  port)

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.

◆ rig_probe_all()

int rig_probe_all ( hamlib_port_t *  port,
rig_probe_func_t  cfunc,
rig_ptr_t  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

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

◆ rig_recv_dtmf()

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).

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

◆ rig_reset()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

◆ rig_scan()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_has_scan()

◆ rig_send_dtmf()

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).

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

◆ rig_send_morse()

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).

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

◆ rig_send_voice_mem()

int rig_send_voice_mem ( RIG rig,
vfo_t  vfo,
int  ch 
)

send voice memory content

Parameters
rigThe rig handle
vfoThe target VFO
chVoice memory number to be sent

Sends voice memory content.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

◆ rig_set_ant()

int rig_set_ant ( RIG rig,
vfo_t  vfo,
ant_t  ant,
value_t  option 
)

set the antenna

Parameters
rigThe rig handle
vfoThe target VFO
antThe anntena to select
optionAn option that the ant command for the rig recognizes

Select the antenna connector.

rig_set_ant(rig, RIG_VFO_CURR, RIG_ANT_1); // apply to both TX&RX
#define RIG_ANT_2
Macro for Ant#2.
Definition: rig.h:821
#define RIG_ANT_1
Macro for Ant#1.
Definition: rig.h:820
int rig_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
set the antenna
Definition: rig.c:5224
#define RIG_VFO_CURR
currVFO – current "tunable channel"/VFO
Definition: rig.h:479
#define RIG_VFO_RX
RX – alias for split rx or downlink
Definition: rig.h:498

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_get_ant()

◆ rig_set_bank()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_mem()

◆ rig_set_chan_all()

int rig_set_chan_all ( RIG rig,
vfo_t  vfo,
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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_chan_all_cb(), rig_get_chan_all()

◆ rig_set_chan_all_cb()

int rig_set_chan_all_cb ( RIG rig,
vfo_t  vfo,
chan_cb_t  chan_cb,
rig_ptr_t  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 preferred method to support clonable rigs.

Returns
RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_chan_all(), rig_get_chan_all_cb()

◆ rig_set_channel()

int rig_set_channel ( RIG rig,
vfo_t  vfo,
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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_get_channel()

◆ rig_set_conf()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_get_conf()

◆ rig_set_ctcss_sql()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_get_ctcss_sql(), rig_set_ctcss_tone()

◆ 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 for the transmitter only.

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_get_ctcss_tone(), rig_set_ctcss_sql()

◆ rig_set_dcd_callback()

int rig_set_dcd_callback ( RIG rig,
dcd_cb_t  cb,
rig_ptr_t  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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_trn()

◆ rig_set_dcs_code()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_get_dcs_code(), rig_set_dcs_sql()

◆ 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 successful, ortherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_get_dcs_sql(), rig_set_dcs_code()

◆ rig_set_debug()

void rig_set_debug ( enum rig_debug_level_e  debug_level)

Change the current debug level.

Parameters
debug_levelEquivalent to the -v option of the utilities.

Allows for dynamically changing the debugging output without reinitializing the library.

Useful for programs that want to enable and disable debugging output without restarting.

◆ rig_set_debug_callback()

vprintf_cb_t rig_set_debug_callback ( vprintf_cb_t  cb,
rig_ptr_t  arg 
)

Set callback to handle debugging messages.

Parameters
cbThe callback function to install.
argA Pointer to some private data to pass later on to the callback.

Install a callback for rig_debug() messages.

int
rig_message_cb(enum rig_debug_level_e debug_level,
rig_ptr_t user_data,
const char *fmt,
va_list ap)
{
char buf[1024];
sprintf (buf, "Message(%s) ", (char*)user_data);
syslog (LOG_USER, buf);
vsprintf (buf, fmt, ap);
syslog (LOG_USER, buf);
return RIG_OK;
}
. . .
char *cookie = "Foo";
rig_set_debug_callback (rig_message_cb, (rig_ptr_t)cookie);
vprintf_cb_t rig_set_debug_callback(vprintf_cb_t cb, rig_ptr_t arg)
Set callback to handle debugging messages.
Definition: debug.c:310
rig_debug_level_e
Hamlib debug levels.
Definition: rig.h:174
Returns
A pointer to the previous callback that was set, if any.
See also
rig_debug()

◆ rig_set_debug_file()

FILE* rig_set_debug_file ( FILE *  stream)

Change the output stream from stderr a different stream.

Parameters
streamThe stream to direct debugging output.
See also
FILE(3)

◆ rig_set_debug_time_stamp()

void rig_set_debug_time_stamp ( int  flag)

Enable or disable the time stamp on debugging output.

Parameters
flagTRUE or FALSE.

Sets or unsets the flag which controls whether debugging output includes a time stamp.

◆ rig_set_ext_func()

int rig_set_ext_func ( RIG rig,
vfo_t  vfo,
token_t  token,
int  status 
)

set a radio function extra parameter

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

Sets a function extra parameter.

Returns
RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_get_ext_func()

◆ rig_set_ext_level()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_get_ext_level()

◆ rig_set_ext_parm()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_get_ext_parm()

◆ rig_set_freq()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_get_freq()
Examples
/tests/testrig.c.

◆ rig_set_freq_callback()

int rig_set_freq_callback ( RIG rig,
freq_cb_t  cb,
rig_ptr_t  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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_trn()

◆ rig_set_func()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_get_func()
Examples
/tests/testrig.c.

◆ rig_set_level()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_has_set_level(), rig_get_level()

◆ rig_set_mem()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_get_mem()

◆ rig_set_mem_all()

int rig_set_mem_all ( RIG rig,
vfo_t  vfo,
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 successful, otherwise a negative value if an error occurred (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

◆ rig_set_mem_all_cb()

int rig_set_mem_all_cb ( RIG rig,
vfo_t  vfo,
chan_cb_t  chan_cb,
confval_cb_t  parm_cb,
rig_ptr_t  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 preferred method to support clonable rigs.

Returns
RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (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

◆ rig_set_mode()

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 or the special value RIG_PASSBAND_NOCHANGE which leaves the passband unchanged from the current value or default for the mode determined by the rig.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_get_mode()
Examples
/tests/testrig.c.

◆ rig_set_mode_callback()

int rig_set_mode_callback ( RIG rig,
mode_cb_t  cb,
rig_ptr_t  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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_trn()

◆ rig_set_parm()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_has_set_parm(), rig_get_parm()

◆ rig_set_pltune_callback()

int rig_set_pltune_callback ( RIG rig,
pltune_cb_t  cb,
rig_ptr_t  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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_trn()

◆ rig_set_powerstat()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, ortherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_get_powerstat()

◆ rig_set_ptt()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_get_ptt()
Examples
/tests/testrig.c.

◆ rig_set_ptt_callback()

int rig_set_ptt_callback ( RIG rig,
ptt_cb_t  cb,
rig_ptr_t  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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_trn()

◆ rig_set_rit()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_get_rit()

◆ rig_set_rptr_offs()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_get_rptr_offs()

◆ rig_set_rptr_shift()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_get_rptr_shift()

◆ rig_set_spectrum_callback()

int rig_set_spectrum_callback ( RIG rig,
spectrum_cb_t  cb,
rig_ptr_t  arg 
)

set the callback for spectrum line reception 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 spectrum line reception events, to be called when in transceive mode.

Returns
RIG_OK if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_trn()

◆ rig_set_split_freq()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_get_split_freq(), rig_set_split_vfo()

◆ rig_set_split_freq_mode()

int rig_set_split_freq_mode ( RIG rig,
vfo_t  vfo,
freq_t  tx_freq,
rmode_t  tx_mode,
pbwidth_t  tx_width 
)

set the split frequency and mode

Parameters
rigThe rig handle
vfoThe target VFO
tx_freqThe transmit frequency to set to
tx_modeThe transmit split mode to set to
tx_widthThe transmit split width to set to or the special value RIG_PASSBAND_NOCHANGE which leaves the passband unchanged from the current value or default for the mode determined by the rig.

Sets the split(TX) frequency and mode.

This function maybe optimized on some rig back ends, where the TX VFO cannot be directly addressed, to reduce the number of times the rig VFOs have to be exchanged or swapped to complete this combined function.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_split_freq(), rig_set_split_mode(), rig_get_split_freq_mode()

◆ rig_set_split_mode()

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 or the special value RIG_PASSBAND_NOCHANGE which leaves the passband unchanged from the current value or default for the mode determined by the rig.

Sets the split(TX) mode.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_get_split_mode()

◆ rig_set_split_vfo()

int rig_set_split_vfo ( RIG rig,
vfo_t  rx_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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_get_split_vfo()

◆ rig_set_trn()

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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_get_trn()

◆ rig_set_ts()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_get_ts()

◆ rig_set_twiddle()

int rig_set_twiddle ( RIG rig,
int  seconds 
)

timeout (secs) to stop rigctld when VFO is manually changed

Parameters
rigThe rig handle
secondsThe timeout to set to

timeout seconds to stop rigctld when VFO is manually changed turns on/off the radio.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_twiddle()

◆ rig_set_uplink()

int rig_set_uplink ( RIG rig,
int  val 
)

For GPredict to avoid reading frequency on uplink VFO.

Parameters
rigThe rig handle
seconds1=Ignore Sub, 2=Ignore Main

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_set_uplink()

◆ rig_set_vfo()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_get_vfo()
Examples
/tests/testrig.c.

◆ rig_set_vfo_callback()

int rig_set_vfo_callback ( RIG rig,
vfo_cb_t  cb,
rig_ptr_t  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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).
See also
rig_set_trn()

◆ rig_set_vfo_opt()

int rig_set_vfo_opt ( RIG rig,
int  status 
)

set the vfo option for rigctld

Parameters
status1=On, 0=Off

Returns RIG_OK or -RIG_EPROTO;

◆ rig_set_xit()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_get_xit()

◆ rig_setting2idx()

int rig_setting2idx ( setting_t  s)

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.

◆ rig_stop_morse()

int rig_stop_morse ( RIG rig,
vfo_t  vfo 
)

stop morse code

Parameters
rigThe rig handle
vfoThe target VFO

Stops the send morse message.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

◆ rig_token_foreach()

int rig_token_foreach ( RIG rig,
int(*)(const struct confparams *, rig_ptr_t)  cfunc,
rig_ptr_t  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 successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

◆ rig_token_lookup()

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

◆ rig_vfo_op()

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.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

See also
rig_has_vfo_op()

◆ rig_wait_morse()

int rig_wait_morse ( RIG rig,
vfo_t  vfo 
)

wait morse code

Parameters
rigThe rig handle
vfoThe target VFO

waits for the end of the morse message to be sent.

\RETURNFUNC(RIG_OK) if the operation has been successful, otherwise a negative value if an error occurred (in which case, cause is set appropriately).

Variable Documentation

◆ common_ctcss_list

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

◆ common_dcs_list

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

◆ debugmsgsave

char debugmsgsave[DEBUGMSGSAVE_SIZE] = "No message"

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

◆ full_ctcss_list

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

◆ full_dcs_list

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

◆ hamlib_copyright2

const char* hamlib_copyright2
Initial value:
=
"Copyright (C) 2000-2012 Stephane Fillod\n"
"Copyright (C) 2000-2003 Frank Singleton\n"
"Copyright (C) 2014-2020 Michael Black W9MDB\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."

Hamlib copyright notice.

◆ hamlib_license

const char* hamlib_license = "LGPL"

Hamlib release number.

The version number has the format x.y.z