51 # define __BEGIN_DECLS extern "C" {
52 # define __END_DECLS }
54 # define __BEGIN_DECLS
62 #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(__CYGWIN__) || defined(_WIN32) || defined(__cplusplus)
63 # define HAMLIB_PARAMS(protos) protos
64 # define rig_ptr_t void*
66 # define HAMLIB_PARAMS(protos) ()
67 # define rig_ptr_t char*
70 #include <hamlib/rig_dll.h>
106 #define NETRIGCTL_RET "RPRT "
138 #define FILPATHLEN 100
139 #define FRQRANGESIZ 30
140 #define MAXCHANDESC 30
143 #define MAXDBLSTSIZ 8
144 #define CHANLSTSIZ 16
145 #define MAX_CAL_LENGTH 32
224 #define RIG_FLAG_TRANSCEIVER (RIG_FLAG_RECEIVER|RIG_FLAG_TRANSMITTER)
225 #define RIG_TYPE_MASK (RIG_FLAG_TRANSCEIVER|RIG_FLAG_SCANNER|RIG_FLAG_MOBILE|RIG_FLAG_HANDHELD|RIG_FLAG_COMPUTER|RIG_FLAG_TRUNKING|RIG_FLAG_TUNER)
227 #define RIG_TYPE_OTHER 0
228 #define RIG_TYPE_TRANSCEIVER RIG_FLAG_TRANSCEIVER
229 #define RIG_TYPE_HANDHELD (RIG_FLAG_TRANSCEIVER|RIG_FLAG_HANDHELD)
230 #define RIG_TYPE_MOBILE (RIG_FLAG_TRANSCEIVER|RIG_FLAG_MOBILE)
231 #define RIG_TYPE_RECEIVER RIG_FLAG_RECEIVER
232 #define RIG_TYPE_PCRECEIVER (RIG_FLAG_COMPUTER|RIG_FLAG_RECEIVER)
233 #define RIG_TYPE_SCANNER (RIG_FLAG_SCANNER|RIG_FLAG_RECEIVER)
234 #define RIG_TYPE_TRUNKSCANNER (RIG_TYPE_SCANNER|RIG_FLAG_TRUNKING)
235 #define RIG_TYPE_COMPUTER (RIG_FLAG_TRANSCEIVER|RIG_FLAG_COMPUTER)
236 #define RIG_TYPE_TUNER RIG_FLAG_TUNER
253 #define RIG_STATUS_NEW RIG_STATUS_UNTESTED
281 #define FREQFMT SCNfreq
289 #define Hz(f) ((freq_t)(f))
290 #define kHz(f) ((freq_t)((f)*(freq_t)1000))
291 #define MHz(f) ((freq_t)((f)*(freq_t)1000000))
292 #define GHz(f) ((freq_t)((f)*(freq_t)1000000000))
294 #define s_Hz(f) ((shortfreq_t)(f))
295 #define s_kHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000))
296 #define s_MHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000))
297 #define s_GHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000000))
299 #define RIG_FREQ_NONE Hz(0)
320 #define RIG_VFO_NONE 0
322 #define RIG_VFO_TX_FLAG (1<<30)
325 #define RIG_VFO_CURR (1<<29)
328 #define RIG_VFO_MEM (1<<28)
331 #define RIG_VFO_VFO (1<<27)
333 #define RIG_VFO_TX_VFO(v) ((v)|RIG_VFO_TX_FLAG)
336 #define RIG_VFO_TX RIG_VFO_TX_VFO(RIG_VFO_CURR)
339 #define RIG_VFO_RX RIG_VFO_CURR
342 #define RIG_VFO_MAIN (1<<26)
344 #define RIG_VFO_SUB (1<<25)
346 #define RIG_VFO_N(n) (1<<(n))
349 #define RIG_VFO_A RIG_VFO_N(0)
351 #define RIG_VFO_B RIG_VFO_N(1)
353 #define RIG_VFO_C RIG_VFO_N(2)
360 #define RIG_TARGETABLE_NONE 0
361 #define RIG_TARGETABLE_FREQ (1<<0)
362 #define RIG_TARGETABLE_MODE (1<<1)
363 #define RIG_TARGETABLE_PURE (1<<2)
364 #define RIG_TARGETABLE_TONE (1<<3)
365 #define RIG_TARGETABLE_FUNC (1<<4)
366 #define RIG_TARGETABLE_ALL 0x7fffffff
369 #define RIG_PASSBAND_NORMAL s_Hz(0)
503 #define RIG_CONF_END 0
527 #define RIG_COMBO_MAX 8
571 #define RIG_ANT_NONE 0
572 #define RIG_ANT_N(n) ((ant_t)1<<(n))
573 #define RIG_ANT_1 RIG_ANT_N(0)
574 #define RIG_ANT_2 RIG_ANT_N(1)
575 #define RIG_ANT_3 RIG_ANT_N(2)
576 #define RIG_ANT_4 RIG_ANT_N(3)
577 #define RIG_ANT_5 RIG_ANT_N(4)
598 RIG_METER_SWR = (1<<0),
599 RIG_METER_COMP = (1<<1),
600 RIG_METER_ALC = (1<<2),
601 RIG_METER_IC = (1<<3),
602 RIG_METER_DB = (1<<4),
603 RIG_METER_PO = (1<<5),
604 RIG_METER_VDD = (1<<6)
666 #define RIG_LEVEL_FLOAT_LIST (RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_APF|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_COMP|RIG_LEVEL_BALANCE|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_VOXGAIN|RIG_LEVEL_ANTIVOX)
668 #define RIG_LEVEL_READONLY_LIST (RIG_LEVEL_SQLSTAT|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_STRENGTH|RIG_LEVEL_RAWSTR)
670 #define RIG_LEVEL_IS_FLOAT(l) ((l)&RIG_LEVEL_FLOAT_LIST)
671 #define RIG_LEVEL_SET(l) ((l)&~RIG_LEVEL_READONLY_LIST)
693 #define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT)
694 #define RIG_PARM_READONLY_LIST (RIG_PARM_BAT)
696 #define RIG_PARM_IS_FLOAT(l) ((l)&RIG_PARM_FLOAT_LIST)
697 #define RIG_PARM_SET(l) ((l)&~RIG_PARM_READONLY_LIST)
699 #define RIG_SETTING_MAX 32
712 #define RIG_TRN_OFF 0
713 #define RIG_TRN_RIG 1
714 #define RIG_TRN_POLL 2
734 #define RIG_FUNC_NONE 0
735 #define RIG_FUNC_FAGC (1UL<<0)
736 #define RIG_FUNC_NB (1UL<<1)
737 #define RIG_FUNC_COMP (1UL<<2)
738 #define RIG_FUNC_VOX (1UL<<3)
739 #define RIG_FUNC_TONE (1UL<<4)
740 #define RIG_FUNC_TSQL (1UL<<5)
741 #define RIG_FUNC_SBKIN (1UL<<6)
742 #define RIG_FUNC_FBKIN (1UL<<7)
743 #define RIG_FUNC_ANF (1UL<<8)
744 #define RIG_FUNC_NR (1UL<<9)
745 #define RIG_FUNC_AIP (1UL<<10)
746 #define RIG_FUNC_APF (1UL<<11)
747 #define RIG_FUNC_MON (1UL<<12)
748 #define RIG_FUNC_MN (1UL<<13)
749 #define RIG_FUNC_RF (1UL<<14)
750 #define RIG_FUNC_ARO (1UL<<15)
751 #define RIG_FUNC_LOCK (1UL<<16)
752 #define RIG_FUNC_MUTE (1UL<<17)
753 #define RIG_FUNC_VSC (1UL<<18)
754 #define RIG_FUNC_REV (1UL<<19)
755 #define RIG_FUNC_SQL (1UL<<20)
756 #define RIG_FUNC_ABM (1UL<<21)
757 #define RIG_FUNC_BC (1UL<<22)
758 #define RIG_FUNC_MBC (1UL<<23)
759 #define RIG_FUNC_RIT (1UL<<24)
760 #define RIG_FUNC_AFC (1UL<<25)
761 #define RIG_FUNC_SATMODE (1UL<<26)
762 #define RIG_FUNC_SCOPE (1UL<<27)
763 #define RIG_FUNC_RESUME (1UL<<28)
764 #define RIG_FUNC_TBURST (1UL<<29)
765 #define RIG_FUNC_TUNER (1UL<<30)
766 #define RIG_FUNC_XIT (1UL<<31)
773 #define mW(p) ((int)(p))
774 #define Watts(p) ((int)((p)*1000))
775 #define W(p) Watts(p)
776 #define kW(p) ((int)((p)*1000000L))
814 #define RIG_MODE_SSB (RIG_MODE_USB|RIG_MODE_LSB)
817 #define RIG_MODE_ECSS (RIG_MODE_ECSSUSB|RIG_MODE_ECSSLSB)
820 #define RIG_DBLST_END 0
821 #define RIG_IS_DBLST_END(d) ((d)==0)
839 #define RIG_FRNG_END {Hz(0),Hz(0),RIG_MODE_NONE,0,0,RIG_VFO_NONE}
840 #define RIG_IS_FRNG_END(r) ((r).start == Hz(0) && (r).end == Hz(0))
842 #define RIG_ITU_REGION1 1
843 #define RIG_ITU_REGION2 2
844 #define RIG_ITU_REGION3 3
871 #define RIG_TS_END {RIG_MODE_NONE,0}
872 #define RIG_IS_TS_END(t) ((t).modes == RIG_MODE_NONE && (t).ts == 0)
905 #define RIG_FLT_ANY 0
906 #define RIG_FLT_END {RIG_MODE_NONE,0}
907 #define RIG_IS_FLT_END(f) ((f).modes == RIG_MODE_NONE)
911 #define RIG_CHFLAG_NONE 0
913 #define RIG_CHFLAG_SKIP (1<<0)
915 #define RIG_CHFLAG_DATA (1<<1)
926 #define RIG_EXT_END {0, {.i=0}}
927 #define RIG_IS_EXT_END(x) ((x).token == 0)
1052 #define RIG_CHAN_END {0,0,RIG_MTYPE_NONE}
1053 #define RIG_IS_CHAN_END(c) ((c).type == RIG_MTYPE_NONE)
1055 #define RIG_MEM_CAPS_ALL -1
1087 }
table[MAX_CAL_LENGTH];
1104 #define EMPTY_STR_CAL { 0, { { 0, 0 }, } }
1108 typedef int (*confval_cb_t) (RIG *,
const struct confparams *,
value_t *, rig_ptr_t);
1215 int (*set_freq) (RIG *
rig, vfo_t vfo, freq_t freq);
1216 int (*get_freq) (RIG * rig, vfo_t vfo, freq_t * freq);
1218 int (*set_mode) (RIG * rig, vfo_t vfo,
rmode_t mode,
1220 int (*get_mode) (RIG * rig, vfo_t vfo,
rmode_t * mode,
1223 int (*set_vfo) (RIG * rig, vfo_t vfo);
1224 int (*get_vfo) (RIG * rig, vfo_t * vfo);
1226 int (*set_ptt) (RIG * rig, vfo_t vfo,
ptt_t ptt);
1227 int (*get_ptt) (RIG * rig, vfo_t vfo,
ptt_t * ptt);
1228 int (*get_dcd) (RIG * rig, vfo_t vfo,
dcd_t * dcd);
1230 int (*set_rptr_shift) (RIG * rig, vfo_t vfo,
1232 int (*get_rptr_shift) (RIG * rig, vfo_t vfo,
1235 int (*set_rptr_offs) (RIG * rig, vfo_t vfo, shortfreq_t offs);
1236 int (*get_rptr_offs) (RIG * rig, vfo_t vfo, shortfreq_t * offs);
1238 int (*set_split_freq) (RIG * rig, vfo_t vfo, freq_t tx_freq);
1239 int (*get_split_freq) (RIG * rig, vfo_t vfo, freq_t * tx_freq);
1240 int (*set_split_mode) (RIG * rig, vfo_t vfo,
rmode_t tx_mode,
1241 pbwidth_t tx_width);
1242 int (*get_split_mode) (RIG * rig, vfo_t vfo,
rmode_t * tx_mode,
1243 pbwidth_t * tx_width);
1245 int (*set_split_vfo) (RIG * rig, vfo_t vfo,
split_t split, vfo_t tx_vfo);
1246 int (*get_split_vfo) (RIG * rig, vfo_t vfo,
split_t * split, vfo_t *tx_vfo);
1248 int (*set_rit) (RIG * rig, vfo_t vfo, shortfreq_t rit);
1249 int (*get_rit) (RIG * rig, vfo_t vfo, shortfreq_t * rit);
1250 int (*set_xit) (RIG * rig, vfo_t vfo, shortfreq_t xit);
1251 int (*get_xit) (RIG * rig, vfo_t vfo, shortfreq_t * xit);
1253 int (*set_ts) (RIG * rig, vfo_t vfo, shortfreq_t ts);
1254 int (*get_ts) (RIG * rig, vfo_t vfo, shortfreq_t * ts);
1256 int (*set_dcs_code) (RIG * rig, vfo_t vfo,
tone_t code);
1257 int (*get_dcs_code) (RIG * rig, vfo_t vfo,
tone_t * code);
1258 int (*set_tone) (RIG * rig, vfo_t vfo,
tone_t tone);
1259 int (*get_tone) (RIG * rig, vfo_t vfo,
tone_t * tone);
1260 int (*set_ctcss_tone) (RIG * rig, vfo_t vfo,
tone_t tone);
1261 int (*get_ctcss_tone) (RIG * rig, vfo_t vfo,
tone_t * tone);
1263 int (*set_dcs_sql) (RIG * rig, vfo_t vfo,
tone_t code);
1264 int (*get_dcs_sql) (RIG * rig, vfo_t vfo,
tone_t * code);
1265 int (*set_tone_sql) (RIG * rig, vfo_t vfo,
tone_t tone);
1266 int (*get_tone_sql) (RIG * rig, vfo_t vfo,
tone_t * tone);
1267 int (*set_ctcss_sql) (RIG * rig, vfo_t vfo,
tone_t tone);
1268 int (*get_ctcss_sql) (RIG * rig, vfo_t vfo,
tone_t * tone);
1270 int (*power2mW) (RIG * rig,
unsigned int *mwpower,
float power,
1272 int (*mW2power) (RIG * rig,
float *power,
unsigned int mwpower,
1277 int (*reset) (RIG * rig,
reset_t reset);
1279 int (*set_ant) (RIG * rig, vfo_t vfo, ant_t ant);
1280 int (*get_ant) (RIG * rig, vfo_t vfo, ant_t * ant);
1282 int (*set_level) (RIG * rig, vfo_t vfo, setting_t level,
1284 int (*get_level) (RIG * rig, vfo_t vfo, setting_t level,
1287 int (*set_func) (RIG * rig, vfo_t vfo, setting_t func,
int status);
1288 int (*get_func) (RIG * rig, vfo_t vfo, setting_t func,
1291 int (*set_parm) (RIG * rig, setting_t parm, value_t val);
1292 int (*get_parm) (RIG * rig, setting_t parm, value_t * val);
1294 int (*set_ext_level)(RIG *rig, vfo_t vfo, token_t
token, value_t val);
1295 int (*get_ext_level)(RIG *rig, vfo_t vfo, token_t
token, value_t *val);
1297 int (*set_ext_parm)(RIG *rig, token_t
token, value_t val);
1298 int (*get_ext_parm)(RIG *rig, token_t
token, value_t *val);
1300 int (*set_conf) (RIG * rig, token_t
token,
const char *val);
1301 int (*get_conf) (RIG * rig, token_t
token,
char *val);
1303 int (*send_dtmf) (RIG * rig, vfo_t vfo,
const char *digits);
1304 int (*recv_dtmf) (RIG * rig, vfo_t vfo,
char *digits,
int *length);
1305 int (*send_morse) (RIG * rig, vfo_t vfo,
const char *msg);
1307 int (*set_bank) (RIG * rig, vfo_t vfo,
int bank);
1308 int (*set_mem) (RIG * rig, vfo_t vfo,
int ch);
1309 int (*get_mem) (RIG * rig, vfo_t vfo,
int *ch);
1310 int (*vfo_op) (RIG * rig, vfo_t vfo,
vfo_op_t op);
1311 int (*scan) (RIG * rig, vfo_t vfo,
scan_t scan,
int ch);
1313 int (*set_trn) (RIG * rig,
int trn);
1314 int (*get_trn) (RIG * rig,
int *trn);
1316 int (*decode_event) (RIG * rig);
1318 int (*set_channel) (RIG * rig,
const channel_t * chan);
1319 int (*get_channel) (RIG * rig, channel_t * chan);
1321 const char *(*get_info) (RIG * rig);
1323 int (*set_chan_all_cb) (RIG * rig, chan_cb_t chan_cb, rig_ptr_t);
1324 int (*get_chan_all_cb) (RIG * rig, chan_cb_t chan_cb, rig_ptr_t);
1326 int (*set_mem_all_cb) (RIG * rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t);
1327 int (*get_mem_all_cb) (RIG * rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t);
1382 #if !defined(__APPLE__) || !defined(__cplusplus)
1460 typedef int (*vprintf_cb_t) (
enum rig_debug_level_e, rig_ptr_t,
const char *, va_list);
1462 typedef int (*freq_cb_t) (RIG *,
vfo_t,
freq_t, rig_ptr_t);
1464 typedef int (*vfo_cb_t) (RIG *,
vfo_t, rig_ptr_t);
1465 typedef int (*ptt_cb_t) (RIG *,
vfo_t,
ptt_t, rig_ptr_t);
1466 typedef int (*dcd_cb_t) (RIG *,
vfo_t,
dcd_t, rig_ptr_t);
1467 typedef int (*pltune_cb_t) (RIG *,
vfo_t, freq_t *, rmode_t *, pbwidth_t *, rig_ptr_t);
1522 extern HAMLIB_EXPORT(
int)
rig_open HAMLIB_PARAMS((RIG *
rig));
1529 extern HAMLIB_EXPORT(
int)
rig_set_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t freq));
1530 extern HAMLIB_EXPORT(
int)
rig_get_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t *freq));
1532 extern HAMLIB_EXPORT(
int)
rig_set_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width));
1533 extern HAMLIB_EXPORT(
int)
rig_get_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width));
1535 extern HAMLIB_EXPORT(
int)
rig_set_vfo HAMLIB_PARAMS((RIG *rig, vfo_t vfo));
1536 extern HAMLIB_EXPORT(
int)
rig_get_vfo HAMLIB_PARAMS((RIG *rig, vfo_t *vfo));
1538 extern HAMLIB_EXPORT(
int)
rig_set_ptt HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ptt_t ptt));
1539 extern HAMLIB_EXPORT(
int)
rig_get_ptt HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ptt_t *ptt));
1541 extern HAMLIB_EXPORT(
int)
rig_get_dcd HAMLIB_PARAMS((RIG *rig, vfo_t vfo, dcd_t *dcd));
1545 extern HAMLIB_EXPORT(
int)
rig_set_rptr_offs HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t rptr_offs));
1546 extern HAMLIB_EXPORT(
int)
rig_get_rptr_offs HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs));
1558 extern HAMLIB_EXPORT(
int)
rig_set_split_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t tx_freq));
1559 extern HAMLIB_EXPORT(
int)
rig_get_split_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t *tx_freq));
1560 extern HAMLIB_EXPORT(
int)
rig_set_split_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width));
1561 extern HAMLIB_EXPORT(
int)
rig_get_split_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width));
1564 #define rig_set_split(r,v,s) rig_set_split_vfo((r),(v),(s),RIG_VFO_CURR)
1565 #define rig_get_split(r,v,s) ({ vfo_t _tx_vfo; rig_get_split_vfo((r),(v),(s),&_tx_vfo); })
1567 extern HAMLIB_EXPORT(
int)
rig_set_rit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t rit));
1568 extern HAMLIB_EXPORT(
int)
rig_get_rit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *rit));
1569 extern HAMLIB_EXPORT(
int)
rig_set_xit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t xit));
1570 extern HAMLIB_EXPORT(
int)
rig_get_xit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *xit));
1572 extern HAMLIB_EXPORT(
int)
rig_set_ts HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t ts));
1573 extern HAMLIB_EXPORT(
int)
rig_get_ts HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *ts));
1575 extern HAMLIB_EXPORT(
int)
rig_power2mW HAMLIB_PARAMS((RIG *rig,
unsigned int *mwpower,
float power, freq_t freq, rmode_t mode));
1576 extern HAMLIB_EXPORT(
int)
rig_mW2power HAMLIB_PARAMS((RIG *rig,
float *power,
unsigned int mwpower, freq_t freq, rmode_t mode));
1578 extern HAMLIB_EXPORT(shortfreq_t)
rig_get_resolution HAMLIB_PARAMS((RIG *rig, rmode_t mode));
1580 extern HAMLIB_EXPORT(
int)
rig_set_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t level, value_t val));
1581 extern HAMLIB_EXPORT(
int)
rig_get_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t level, value_t *val));
1583 #define rig_get_strength(r,v,s) rig_get_level((r),(v),RIG_LEVEL_STRENGTH, (value_t*)(s))
1585 extern HAMLIB_EXPORT(
int)
rig_set_parm HAMLIB_PARAMS((RIG *rig, setting_t parm, value_t val));
1586 extern HAMLIB_EXPORT(
int)
rig_get_parm HAMLIB_PARAMS((RIG *rig, setting_t parm, value_t *val));
1588 extern HAMLIB_EXPORT(
int)
rig_set_conf HAMLIB_PARAMS((RIG *rig, token_t token, const
char *val));
1589 extern HAMLIB_EXPORT(
int)
rig_get_conf HAMLIB_PARAMS((RIG *rig, token_t token,
char *val));
1594 extern HAMLIB_EXPORT(
int)
rig_reset HAMLIB_PARAMS((RIG *rig,
reset_t reset));
1597 token_t token, value_t val));
1599 token_t token, value_t *val));
1601 extern HAMLIB_EXPORT(
int)
rig_set_ext_parm HAMLIB_PARAMS((RIG *rig, token_t token, value_t val));
1602 extern HAMLIB_EXPORT(
int)
rig_get_ext_parm HAMLIB_PARAMS((RIG *rig, token_t token, value_t *val));
1605 extern HAMLIB_EXPORT(
int)
rig_ext_parm_foreach HAMLIB_PARAMS((RIG *rig,
int (*cfunc)(RIG*, const struct confparams *, rig_ptr_t), rig_ptr_t data));
1606 extern HAMLIB_EXPORT(const struct confparams*)
rig_ext_lookup HAMLIB_PARAMS((RIG *rig, const
char *name));
1607 extern HAMLIB_EXPORT(const struct confparams *)
rig_ext_lookup_tok HAMLIB_PARAMS((RIG *rig, token_t token));
1608 extern HAMLIB_EXPORT(token_t)
rig_ext_token_lookup HAMLIB_PARAMS((RIG *rig, const
char *name));
1611 extern HAMLIB_EXPORT(
int)
rig_token_foreach HAMLIB_PARAMS((RIG *rig,
int (*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data));
1612 extern HAMLIB_EXPORT(const struct confparams*)
rig_confparam_lookup HAMLIB_PARAMS((RIG *rig, const
char *name));
1613 extern HAMLIB_EXPORT(token_t)
rig_token_lookup HAMLIB_PARAMS((RIG *rig, const
char *name));
1615 extern HAMLIB_EXPORT(
int)
rig_close HAMLIB_PARAMS((RIG *rig));
1616 extern HAMLIB_EXPORT(
int)
rig_cleanup HAMLIB_PARAMS((RIG *rig));
1618 extern HAMLIB_EXPORT(
int)
rig_set_ant HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ant_t ant));
1619 extern HAMLIB_EXPORT(
int)
rig_get_ant HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ant_t *ant));
1621 extern HAMLIB_EXPORT(setting_t)
rig_has_get_level HAMLIB_PARAMS((RIG *rig, setting_t level));
1622 extern HAMLIB_EXPORT(setting_t)
rig_has_set_level HAMLIB_PARAMS((RIG *rig, setting_t level));
1624 extern HAMLIB_EXPORT(setting_t)
rig_has_get_parm HAMLIB_PARAMS((RIG *rig, setting_t parm));
1625 extern HAMLIB_EXPORT(setting_t)
rig_has_set_parm HAMLIB_PARAMS((RIG *rig, setting_t parm));
1627 extern HAMLIB_EXPORT(setting_t)
rig_has_get_func HAMLIB_PARAMS((RIG *rig, setting_t func));
1628 extern HAMLIB_EXPORT(setting_t)
rig_has_set_func HAMLIB_PARAMS((RIG *rig, setting_t func));
1630 extern HAMLIB_EXPORT(
int)
rig_set_func HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t func,
int status));
1631 extern HAMLIB_EXPORT(
int)
rig_get_func HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t func,
int *status));
1633 extern HAMLIB_EXPORT(
int)
rig_send_dtmf HAMLIB_PARAMS((RIG *rig, vfo_t vfo, const
char *digits));
1634 extern HAMLIB_EXPORT(
int)
rig_recv_dtmf HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
char *digits,
int *length));
1635 extern HAMLIB_EXPORT(
int)
rig_send_morse HAMLIB_PARAMS((RIG *rig, vfo_t vfo, const
char *msg));
1637 extern HAMLIB_EXPORT(
int)
rig_set_bank HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
int bank));
1638 extern HAMLIB_EXPORT(
int)
rig_set_mem HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
int ch));
1639 extern HAMLIB_EXPORT(
int)
rig_get_mem HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
int *ch));
1640 extern HAMLIB_EXPORT(
int)
rig_vfo_op HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
vfo_op_t op));
1642 extern HAMLIB_EXPORT(
int)
rig_scan HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
scan_t scan,
int ch));
1645 extern HAMLIB_EXPORT(
int)
rig_set_channel HAMLIB_PARAMS((RIG *rig, const channel_t *chan));
1646 extern HAMLIB_EXPORT(
int)
rig_get_channel HAMLIB_PARAMS((RIG *rig, channel_t *chan));
1648 extern HAMLIB_EXPORT(
int)
rig_set_chan_all HAMLIB_PARAMS((RIG *rig, const channel_t chans[]));
1649 extern HAMLIB_EXPORT(
int)
rig_get_chan_all HAMLIB_PARAMS((RIG *rig, channel_t chans[]));
1650 extern HAMLIB_EXPORT(
int)
rig_set_chan_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, rig_ptr_t));
1651 extern HAMLIB_EXPORT(
int)
rig_get_chan_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, rig_ptr_t));
1653 extern HAMLIB_EXPORT(
int)
rig_set_mem_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t));
1654 extern HAMLIB_EXPORT(
int)
rig_get_mem_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t));
1655 extern HAMLIB_EXPORT(
int)
rig_set_mem_all HAMLIB_PARAMS((RIG *rig, const channel_t *chan, const struct confparams *, const value_t *));
1656 extern HAMLIB_EXPORT(
int)
rig_get_mem_all HAMLIB_PARAMS((RIG *rig, channel_t *chan, const struct confparams *, value_t *));
1657 extern HAMLIB_EXPORT(const chan_t *)
rig_lookup_mem_caps HAMLIB_PARAMS((RIG *rig,
int ch));
1658 extern HAMLIB_EXPORT(
int)
rig_mem_count HAMLIB_PARAMS((RIG *rig));
1661 extern HAMLIB_EXPORT(
int)
rig_set_trn HAMLIB_PARAMS((RIG *rig,
int trn));
1662 extern HAMLIB_EXPORT(
int)
rig_get_trn HAMLIB_PARAMS((RIG *rig,
int *trn));
1670 extern HAMLIB_EXPORT(const
char *)
rig_get_info HAMLIB_PARAMS((RIG *rig));
1672 extern HAMLIB_EXPORT(const struct
rig_caps *) rig_get_caps HAMLIB_PARAMS((
rig_model_t rig_model));
1675 extern HAMLIB_EXPORT(pbwidth_t)
rig_passband_normal HAMLIB_PARAMS((RIG *rig, rmode_t mode));
1676 extern HAMLIB_EXPORT(pbwidth_t)
rig_passband_narrow HAMLIB_PARAMS((RIG *rig, rmode_t mode));
1677 extern HAMLIB_EXPORT(pbwidth_t)
rig_passband_wide HAMLIB_PARAMS((RIG *rig, rmode_t mode));
1679 extern HAMLIB_EXPORT(const
char *)
rigerror HAMLIB_PARAMS((
int errnum));
1681 extern HAMLIB_EXPORT(
int)
rig_setting2idx HAMLIB_PARAMS((setting_t s));
1682 #define rig_idx2setting(i) (1UL<<(i))
1688 extern HAMLIB_EXPORT(
void)
rig_set_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
1689 #define rig_set_debug_level(level) rig_set_debug(level)
1690 extern HAMLIB_EXPORT(
int)
rig_need_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
1691 extern HAMLIB_EXPORT(
void)
rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level, const
char *fmt, ...));
1692 extern HAMLIB_EXPORT(vprintf_cb_t)
rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb, rig_ptr_t arg));
1695 extern HAMLIB_EXPORT(
int) rig_register HAMLIB_PARAMS((const struct
rig_caps *caps));
1696 extern HAMLIB_EXPORT(
int) rig_unregister HAMLIB_PARAMS((
rig_model_t rig_model));
1697 extern HAMLIB_EXPORT(
int) rig_list_foreach HAMLIB_PARAMS((
int (*cfunc)(const struct
rig_caps*, rig_ptr_t), rig_ptr_t data));
1698 extern HAMLIB_EXPORT(
int) rig_load_backend HAMLIB_PARAMS((const
char *be_name));
1699 extern HAMLIB_EXPORT(
int) rig_check_backend HAMLIB_PARAMS((
rig_model_t rig_model));
1700 extern HAMLIB_EXPORT(
int) rig_load_all_backends HAMLIB_PARAMS((
void));
1703 extern HAMLIB_EXPORT(
int)
rig_probe_all HAMLIB_PARAMS((hamlib_port_t *p, rig_probe_func_t, rig_ptr_t));
1704 extern HAMLIB_EXPORT(rig_model_t)
rig_probe HAMLIB_PARAMS((hamlib_port_t *p));
1708 extern HAMLIB_EXPORT(const
char *)
rig_strrmode(rmode_t mode);
1709 extern HAMLIB_EXPORT(const
char *)
rig_strvfo(vfo_t vfo);
1710 extern HAMLIB_EXPORT(const
char *)
rig_strfunc(setting_t);
1711 extern HAMLIB_EXPORT(const
char *)
rig_strlevel(setting_t);
1712 extern HAMLIB_EXPORT(const
char *)
rig_strparm(setting_t);
int rig_get_conf(RIG *rig, token_t token, char *val)
get the value of a configuration parameter
Definition: conf.c:612
scan_t rig_has_scan(RIG *rig, scan_t scan)
check availability of scanning functions
Definition: rig.c:2862
setting_t funcs
Definition: rig.h:995
int rig_get_mem(RIG *rig, vfo_t vfo, int *ch)
get the current memory channel number
Definition: mem.c:119
int rig_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
get the status of functions of the radio
Definition: settings.c:446
vfo_cb_t vfo_event
Definition: rig.h:1491
rig_debug_level_e
Hamlib debug levels.
Definition: rig.h:115
value_t step
Definition: rig.h:1074
int fd
Definition: rig.h:1344
unsigned tuning_step
Definition: rig.h:992
unsigned channel_desc
Definition: rig.h:1003
unsigned long setting_t
Setting.
Definition: rig.h:706
unsigned tx_vfo
Definition: rig.h:989
struct hamlib_port::@15 post_write_date
token_t rig_ext_token_lookup(RIG *rig, const char *name)
Simple lookup returning token id assicated with name.
Definition: ext.c:165
setting_t rig_has_get_level(RIG *rig, setting_t level)
check retrieval ability of level settings
Definition: settings.c:248
setting_t has_set_func
Definition: rig.h:1428
struct ext_list * ext_levels
Definition: rig.h:966
int rig_token_foreach(RIG *rig, int(*cfunc)(const struct confparams *, char *), char *data)
call a function against each configuration token of a rig
Definition: conf.c:477
int raw
Definition: rig.h:1085
double freq_t
Frequency type, Frequency type unit in Hz, able to hold SHF frequencies.
Definition: rig.h:276
int rig_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
get the status of the DCD
Definition: rig.c:1416
const char * rigerror(int errnum)
get string describing the error code
Definition: rig.c:250
value_t min
Definition: rig.h:1072
int rig_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
set a radio level extra parameter
Definition: settings.c:491
unsigned bank_num
Definition: rig.h:977
int rig_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code)
set the current encoding DCS code
Definition: tones.c:195
Filter definition.
Definition: rig.h:900
vfo_t tx_vfo
Definition: rig.h:1454
float f
Definition: rig.h:613
gran_t level_gran[32]
Definition: rig.h:1434
int rig_set_vfo(RIG *rig, vfo_t vfo)
set the current VFO
Definition: rig.c:1181
long token_t
configuration token
Definition: rig.h:501
scan_t
Rig Scan operation.
Definition: rig.h:486
int rig_get_mem_all_cb(RIG *rig, chan_cb_t chan_cb, confval_cb_t parm_cb, char *arg)
get all channel and non-channel data by call-back
Definition: mem.c:1067
float step
Definition: rig.h:543
shortfreq_t xit
Definition: rig.h:956
const char * rig_strlevel(setting_t)
Convert enum RIG_LEVEL_... to alpha string.
Definition: misc.c:518
int rig_model_t
Convenience type definition for rig model.
Definition: riglist.h:540
unsigned tx_width
Definition: rig.h:986
gran_t level_gran[32]
Definition: rig.h:1160
pbwidth_t tx_width
Definition: rig.h:947
struct rig_callbacks callbacks
Definition: rig.h:1514
setting_t has_get_level
Definition: rig.h:1155
int low_power
Definition: rig.h:833
int post_write_delay
Definition: rig.h:1149
const char hamlib_version[]
Hamlib release number The version number has the format x.y.z.
Definition: rig.c:80
char pathname[100]
Definition: rig.h:1353
int attenuator[8]
Definition: rig.h:1425
int rig_ext_parm_foreach(RIG *rig, int(*cfunc)(RIG *, const struct confparams *, char *), char *data)
Executes cfunc on all the elements stored in the extparms table The callback cfunc is called until it...
Definition: ext.c:89
int vid
Definition: rig.h:1371
const char * dflt
Definition: rig.h:537
setting_t has_set_parm
Definition: rig.h:1158
int rig_send_morse(RIG *rig, vfo_t vfo, const char *msg)
send morse code
Definition: rig.c:3042
const char * cs
Definition: rig.h:615
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
Definition: rig.c:2585
shortfreq_t max_ifshift
Definition: rig.h:1420
enum serial_parity_e parity
Definition: rig.h:1359
enum rig_status_e status
Definition: rig.h:1134
rig_port_t port_type
Definition: rig.h:1139
char * dcd_arg
Definition: rig.h:1496
pbwidth_t rig_passband_wide(RIG *rig, rmode_t mode)
get the wide passband of a mode
Definition: rig.c:1138
vfo_t vfo
Definition: rig.h:939
unsigned rptr_offs
Definition: rig.h:991
int rig_set_bank(RIG *rig, vfo_t vfo, int bank)
set the current memory bank
Definition: mem.c:167
freq_range_t tx_range_list1[30]
Definition: rig.h:1188
int rig_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
perform Memory/VFO operations
Definition: rig.c:2887
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
Definition: rig.c:3093
int mode_list
Definition: rig.h:1455
int rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
get the frequency of the target VFO
Definition: rig.c:877
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
Definition: rig.c:2544
rig_parm_e
Rig Parameters.
Definition: rig.h:682
Tuning step definition.
Definition: rig.h:865
dcd_type_t dcd
Definition: rig.h:1342
int pid
Definition: rig.h:1372
int rig_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
get the current XIT offset
Definition: rig.c:2276
setting_t rig_has_set_level(RIG *rig, setting_t level)
check settable ability of level settings
Definition: settings.c:273
const char * clone_combo_set
Definition: rig.h:1329
vfo_op_t rig_has_vfo_op(RIG *rig, vfo_op_t op)
check retrieval ability of VFO operations
Definition: rig.c:2786
int rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
set PTT on/off
Definition: rig.c:1249
const char * rig_strfunc(setting_t)
Convert enum RIG_FUNC_... to alpha string.
Definition: misc.c:441
char * vfo_arg
Definition: rig.h:1492
int rig_set_trn(RIG *rig, int trn)
control the transceive mode
Definition: event.c:591
Frequency range.
Definition: rig.h:829
ann_t announces
Definition: rig.h:1422
struct cal_table::@13 table[32/*max calibration plots in cal_table_t */]
int rig_set_conf(RIG *rig, token_t token, const char *val)
set a radio configuration parameter
Definition: conf.c:573
powerstat_t
Radio power state.
Definition: rig.h:427
char * priv
Definition: rig.h:1446
int rig_set_vfo_callback(RIG *rig, vfo_cb_t cb, char *arg)
set the callback for vfo events
Definition: event.c:486
ann_t announces
Definition: rig.h:1175
int vfo_list
Definition: rig.h:1444
struct confparams::@10::@11 n
signed long shortfreq_t
Short frequency type Frequency in Hz restricted to 31bits, suitable for offsets, shifts, etc..
Definition: rig.h:287
int ant_t
Antenna number.
Definition: rig.h:569
void rig_set_debug(enum rig_debug_level_e debug_level)
Change the current debug level.
Definition: debug.c:108
freq_range_t rx_range_list[30]
Definition: rig.h:1407
unsigned flags
Definition: rig.h:1002
scan_t scan_ops
Definition: rig.h:1178
setting_t has_get_func
Definition: rig.h:1427
signed int i
Definition: rig.h:612
pbwidth_t current_width
Definition: rig.h:1453
setting_t has_get_parm
Definition: rig.h:1431
int rig_get_ext_parm(RIG *rig, token_t token, value_t *val)
get the value of a parm extra parameter
Definition: settings.c:605
const chan_t * rig_lookup_mem_caps(RIG *rig, int ch)
lookup the memory type and capabilities
Definition: mem.c:1215
freq_t freq
Definition: rig.h:941
setting_t rig_has_set_func(RIG *rig, setting_t func)
check ability of radio functions
Definition: settings.c:370
chan_type_t rig_parse_mtype(const char *s)
Convert alpha string to enum RIG_MTYPE_...
Definition: misc.c:749
enum serial_handshake_e handshake
Definition: rig.h:1360
struct hamlib_port::@16::@17 serial
pbwidth_t width
Definition: rig.h:943
rmode_t mode
Definition: rig.h:942
shortfreq_t tuning_step
Definition: rig.h:954
unsigned int tone_t
CTCSS and DCS type definition.
Definition: rig.h:158
freq_t current_freq
Definition: rig.h:1451
ptt_type_t ptt_type
Definition: rig.h:1137
int stop_bits
Definition: rig.h:1358
int rig_send_dtmf(RIG *rig, vfo_t vfo, const char *digits)
send DTMF digits
Definition: rig.c:2939
serial_handshake_e
Serial handshake.
Definition: rig.h:192
int high_power
Definition: rig.h:834
int rig_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)
set the split modes
Definition: rig.c:1852
ptt_type_t ptt
Definition: rig.h:1341
shortfreq_t max_rit
Definition: rig.h:1171
int rig_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
activate/de-activate functions of radio
Definition: settings.c:397
unsigned vfo
Definition: rig.h:978
unsigned mode
Definition: rig.h:981
shortfreq_t pbwidth_t
Passband width, in Hz.
Definition: rig.h:374
union hamlib_port::@16 parm
Channel capability definition.
Definition: rig.h:976
int rig_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
set CTCSS squelch
Definition: tones.c:292
shortfreq_t rig_get_resolution(RIG *rig, rmode_t mode)
get the best frequency resolution of the rig
Definition: rig.c:2623
Channel structure.
Definition: rig.h:936
vfo_op_t
VFO operation.
Definition: rig.h:460
rptr_shift_t
Repeater shift type.
Definition: rig.h:258
int size
Definition: rig.h:1083
int rig_setting2idx(setting_t s)
basically convert setting_t expressed 2^n to n
Definition: settings.c:626
Extension attribute definition.
Definition: rig.h:921
const struct confparams * rig_ext_lookup_tok(RIG *rig, token_t token)
lookup ext token, return pointer to confparams struct.
Definition: ext.c:144
value_t levels[32]
Definition: rig.h:958
int rig_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit)
set the XIT
Definition: rig.c:2225
int rig_set_chan_all(RIG *rig, const channel_t chans[])
set all channel data
Definition: mem.c:899
int alt
Definition: rig.h:1375
int attenuator[8]
Definition: rig.h:1170
setting_t rig_has_get_parm(RIG *rig, setting_t parm)
check retrieval ability of parameter settings
Definition: settings.c:297
Universal approach for passing values.
Definition: rig.h:611
int rig_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width)
get the current split modes
Definition: rig.c:1931
setting_t has_set_parm
Definition: rig.h:1432
int retry
Definition: rig.h:1151
unsigned ant
Definition: rig.h:979
int timeout
Definition: rig.h:1150
freq_cb_t freq_event
Definition: rig.h:1487
const tone_t * dcs_list
Definition: rig.h:1167
vfo_t current_vfo
Definition: rig.h:1443
struct rig_state state
Definition: rig.h:1513
Rig data structure.
Definition: rig.h:1128
int rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
get the status of the PTT
Definition: rig.c:1325
int rig_type
Definition: rig.h:1136
void * handle
Definition: rig.h:1345
hamlib_port_t pttport
Definition: rig.h:1401
struct hamlib_port hamlib_port_t
Port definition.
freq_t end
Definition: rig.h:831
int post_write_delay
Definition: rig.h:1348
dcd_type_t
DCD type.
Definition: rig.h:389
int rig_reset(RIG *rig, reset_t reset)
reset the radio
Definition: rig.c:2710
token_t token
Definition: rig.h:922
rmode_t modes
Definition: rig.h:832
pltune_cb_t pltune
Definition: rig.h:1497
setting_t rig_parse_parm(const char *s)
Convert alpha string to RIG_PARM_...
Definition: misc.c:553
tone_t dcs_code
Definition: rig.h:961
char * s
Definition: rig.h:614
setting_t rig_has_set_parm(RIG *rig, setting_t parm)
check settable ability of parameter settings
Definition: settings.c:322
meter_level_e
Level display meters.
Definition: rig.h:596
chan_type_t
Memory channel type definition.
Definition: rig.h:1021
setting_t has_set_level
Definition: rig.h:1430
int channel_num
Definition: rig.h:937
setting_t rig_has_get_func(RIG *rig, setting_t func)
check ability of radio functions
Definition: settings.c:346
rig_status_e
Development status of the backend.
Definition: rig.h:242
int rig_set_ext_parm(RIG *rig, token_t token, value_t val)
set a radio parm extra parameter
Definition: settings.c:580
vprintf_cb_t rig_set_debug_callback(vprintf_cb_t cb, char *arg)
set callback to handle debug messages
Definition: debug.c:209
const struct confparams * rig_confparam_lookup(RIG *rig, const char *name)
lookup a confparam struct
Definition: conf.c:511
int rig_set_mem_all(RIG *rig, const channel_t chans[], const struct confparams cfgps[], const value_t vals[])
set all channel and non-channel data
Definition: mem.c:1116
shortfreq_t max_rit
Definition: rig.h:1418
const char * rig_strvfop(vfo_op_t op)
Convert enum RIG_OP_... to alpha string.
Definition: misc.c:630
freq_range_t rx_range_list2[30]
Definition: rig.h:1189
setting_t rig_parse_level(const char *s)
Convert alpha string to enum RIG_LEVEL_...
Definition: misc.c:500
const tone_t * ctcss_list
Definition: rig.h:1166
enum serial_control_state_e dtr_state
Definition: rig.h:1362
rmode_t modes
Definition: rig.h:866
int rig_set_mem(RIG *rig, vfo_t vfo, int ch)
set the current memory channel number
Definition: mem.c:73
int itu_region
Definition: rig.h:1406
int poll_interval
Definition: rig.h:1450
shortfreq_t max_xit
Definition: rig.h:1172
unsigned split
Definition: rig.h:988
int rig_open(RIG *rig)
open the communication to the rig
Definition: rig.c:455
int serial_data_bits
Definition: rig.h:1143
unsigned rit
Definition: rig.h:993
int rig_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code)
get the current DCS code
Definition: tones.c:430
const char * rig_strmtype(chan_type_t mtype)
Convert enum RIG_MTYPE_... to alpha string.
Definition: misc.c:768
struct tuning_step_list tuning_steps[20]
Definition: rig.h:1192
agc_level_e
AGC delay settings.
Definition: rig.h:583
Rig state containing live data and customized fields.
Definition: rig.h:1396
shortfreq_t rit
Definition: rig.h:955
int hold_decode
Definition: rig.h:1442
int transceive
Definition: rig.h:1449
ann_t
Announce.
Definition: rig.h:555
const char * rig_strparm(setting_t)
Convert enum RIG_PARM_... to alpha string.
Definition: misc.c:571
int rig_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
get the current repeater shift
Definition: rig.c:1549
rig_level_e
Rig Level Settings.
Definition: rig.h:626
int rig_cleanup(RIG *rig)
release a rig handle and free associated memory
Definition: rig.c:777
RIG * rig_init(rig_model_t rig_model)
allocate a new RIG handle
Definition: rig.c:271
int chan_desc_sz
Definition: rig.h:1183
pbwidth_t rig_passband_normal(RIG *rig, rmode_t mode)
get the normal passband of a mode
Definition: rig.c:1062
const char hamlib_copyright[]
Hamlib copyright notice.
Definition: rig.c:85
unsigned xit
Definition: rig.h:994
dcd_type_t dcd_type
Definition: rig.h:1138
int rig_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
set the repeater shift
Definition: rig.c:1499
int serial_stop_bits
Definition: rig.h:1144
int pin
Definition: rig.h:1365
char * product
Definition: rig.h:1377
setting_t has_set_level
Definition: rig.h:1156
char * ptt_arg
Definition: rig.h:1494
int rig_set_pltune_callback(RIG *rig, pltune_cb_t cb, char *arg)
set the callback for pipelined tuning module
Definition: event.c:566
const char * name
Definition: rig.h:534
int scan_group
Definition: rig.h:963
rig_port_t rig
Definition: rig.h:1340
int rig_ext_level_foreach(RIG *rig, int(*cfunc)(RIG *, const struct confparams *, char *), char *data)
Executes cfunc on all the elements stored in the extlevels table The callback cfunc is called until i...
Definition: ext.c:61
int rig_set_parm(RIG *rig, setting_t parm, value_t val)
set a radio parameter
Definition: settings.c:194
cal_table_t str_cal
Definition: rig.h:1195
reset_t
Reset operation.
Definition: rig.h:436
int rig_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs)
get the current repeater offset
Definition: rig.c:1651
setting_t rig_parse_func(const char *s)
Convert alpha string to enum RIG_FUNC_...
Definition: misc.c:423
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.
Definition: rig.h:84
int rate
Definition: rig.h:1356
token_t token
Definition: rig.h:533
int rig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
get the mode of the target VFO
Definition: rig.c:1002
Hamlib rig(radio) model definitions.
rig_conf_e
parameter types
Definition: rig.h:519
const char * mfg_name
Definition: rig.h:1131
freq_t start
Definition: rig.h:830
int rig_get_ant(RIG *rig, vfo_t vfo, ant_t *ant)
get the current antenna
Definition: rig.c:2486
const char * copyright
Definition: rig.h:1133
enum rig_port_e rig_port_t
Port type.
setting_t levels
Definition: rig.h:996
rmode_t tx_mode
Definition: rig.h:946
freq_range_t tx_range_list[30]
Definition: rig.h:1408
const char * rig_strstatus(enum rig_status_e status)
Convert enum RIG_STATUS_... to printable string.
Definition: misc.c:239
int rig_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
set the current DCS code
Definition: tones.c:386
unsigned ctcss_tone
Definition: rig.h:997
const char * model_name
Definition: rig.h:1130
ptt_type_t
PTT type.
Definition: rig.h:414
setting_t funcs
Definition: rig.h:957
int rig_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length)
receive DTMF digits
Definition: rig.c:2991
Calibration table struct.
Definition: rig.h:1082
serial_parity_e
Serial parity.
Definition: rig.h:181
int rig_set_mode_callback(RIG *rig, mode_cb_t cb, char *arg)
set the callback for mode events
Definition: event.c:460
int rig_get_parm(RIG *rig, setting_t parm, value_t *val)
get the value of a parameter
Definition: settings.c:221
freq_range_t rx_range_list1[30]
Definition: rig.h:1187
tone_t ctcss_tone
Definition: rig.h:959
value_t val
Definition: rig.h:923
setting_t has_get_level
Definition: rig.h:1429
gran_t parm_gran[32]
Definition: rig.h:1435
int rig_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo)
get the current split mode
Definition: rig.c:2069
int end
Definition: rig.h:1047
rmode_t
Radio mode.
Definition: rig.h:786
rmode_t rig_parse_mode(const char *s)
Convert alpha string to enum RIG_MODE.
Definition: misc.c:291
int rig_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone)
get the current CTCSS squelch
Definition: tones.c:341
shortfreq_t ts
Definition: rig.h:867
hamlib_port_t rigport
Definition: rig.h:1400
rig_model_t rig_model
Definition: rig.h:1129
char * obj
Definition: rig.h:1447
rptr_shift_t rig_parse_rptr_shift(const char *s)
Convert alpha char to enum RIG_RPT_SHIFT_...
Definition: misc.c:718
int rig_get_chan_all_cb(RIG *rig, chan_cb_t chan_cb, char *arg)
get all channel data, by callback
Definition: mem.c:865
int serial_rate_min
Definition: rig.h:1141
unsigned tx_mode
Definition: rig.h:985
int rig_get_powerstat(RIG *rig, powerstat_t *status)
get the on/off status of the radio
Definition: rig.c:2684
pbwidth_t width
Definition: rig.h:902
int rig_probe_all(hamlib_port_t *port, rig_probe_func_t cfunc, char *data)
try to guess rigs
Definition: rig.c:2762
const char * rig_strrmode(rmode_t mode)
Convert enum RIG_MODE to alpha string.
Definition: misc.c:308
int rig_get_trn(RIG *rig, int *trn)
get the current transceive mode
Definition: event.c:705
unsigned rptr_shift
Definition: rig.h:990
shortfreq_t max_ifshift
Definition: rig.h:1173
char * pltune_arg
Definition: rig.h:1498
int rig_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
get the current CTCSS sub-tone frequency
Definition: tones.c:150
const char * rig_strvfo(vfo_t vfo)
Convert enum RIG_VFO_... to alpha string.
Definition: misc.c:363
split_t
Split mode.
Definition: rig.h:267
int rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
set the frequency of the target VFO
Definition: rig.c:817
chan_type_t type
Definition: rig.h:1048
scan_t rig_parse_scan(const char *s)
Convert alpha string to enum RIG_SCAN_...
Definition: misc.c:666
int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
get the current split frequencies
Definition: rig.c:1776
Callback functions and args for rig event.
Definition: rig.h:1486
const char * tooltip
Definition: rig.h:536
int rig_mem_count(RIG *rig)
get memory channel count
Definition: mem.c:1267
int write_delay
Definition: rig.h:1148
Memory channel list definition.
Definition: rig.h:1045
int rig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
set the mode of the target VFO
Definition: rig.c:938
unsigned ctcss_sql
Definition: rig.h:998
level/parm granularity definition
Definition: rig.h:1071
rig_model_t rig_probe(hamlib_port_t *port)
try to guess a rig
Definition: rig.c:2737
int transceive
Definition: rig.h:1180
shortfreq_t rptr_offs
Definition: rig.h:953
unsigned freq
Definition: rig.h:980
int rig_set_ant(RIG *rig, vfo_t vfo, ant_t ant)
set the antenna
Definition: rig.c:2435
ptt_t
PTT status.
Definition: rig.h:403
float min
Definition: rig.h:541
vfo_op_t rig_parse_vfo_op(const char *s)
Convert alpha string to enum RIG_OP_...
Definition: misc.c:612
int rig_close(RIG *rig)
close the communication to the rig
Definition: rig.c:672
int bank_num
Definition: rig.h:938
int write_delay
Definition: rig.h:1347
unsigned tx_freq
Definition: rig.h:984
int timeout
Definition: rig.h:1350
int rig_set_freq_callback(RIG *rig, freq_cb_t cb, char *arg)
set the callback for freq events
Definition: event.c:434
int start
Definition: rig.h:1046
rmode_t modes
Definition: rig.h:901
unsigned dcs_code
Definition: rig.h:999
struct freq_range_list freq_range_t
Frequency range.
struct tuning_step_list tuning_steps[20]
Definition: rig.h:1410
dcd_e
DCD status.
Definition: rig.h:380
vfo_t rig_parse_vfo(const char *s)
Convert alpha string to enum RIG_VFO_...
Definition: misc.c:346
rig_type_t
Rig type flags.
Definition: rig.h:209
int flags
Definition: rig.h:964
char * freq_arg
Definition: rig.h:1488
char channel_desc[30]
Definition: rig.h:965
FILE * rig_set_debug_file(FILE *stream)
change stderr to some different output
Definition: debug.c:223
int preamp[8]
Definition: rig.h:1169
int vfo_t
VFO definition.
Definition: rig.h:317
int rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
get the value of a level
Definition: settings.c:130
token_t rig_token_lookup(RIG *rig, const char *name)
lookup a token id
Definition: conf.c:548
unsigned width
Definition: rig.h:982
int conf
Definition: rig.h:1373
ptt_cb_t ptt_event
Definition: rig.h:1493
struct rig_caps * caps
Definition: rig.h:1512
int rig_need_debug(enum rig_debug_level_e debug_level)
Useful for dump_hex, etc.
Definition: debug.c:117
enum rig_conf_e type
Definition: rig.h:538
vfo_t vfo
Definition: rig.h:835
int rig_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code)
get the current encoding DCS code
Definition: tones.c:239
int data_bits
Definition: rig.h:1357
The Rig structure.
Definition: rig.h:1511
const char * rig_strptrshift(rptr_shift_t)
convert enum RIG_RPT_SHIFT_... to printable character
Definition: misc.c:703
freq_t tx_freq
Definition: rig.h:945
gran_t parm_gran[32]
Definition: rig.h:1161
const struct confparams * cfgparams
Definition: rig.h:1197
vfo_t tx_vfo
Definition: rig.h:950
mode_cb_t mode_event
Definition: rig.h:1489
int rig_get_chan_all(RIG *rig, channel_t chans[])
get all channel data
Definition: mem.c:935
int rig_set_mem_all_cb(RIG *rig, chan_cb_t chan_cb, confval_cb_t parm_cb, char *arg)
set all channel and non-channel data by call-back
Definition: mem.c:1017
tone_t dcs_sql
Definition: rig.h:962
int rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
set a radio level setting
Definition: settings.c:76
struct hamlib_port::@16::@20 usb
int rig_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
get the value of a level extra parameter
Definition: settings.c:536
enum serial_handshake_e serial_handshake
Definition: rig.h:1146
cal_table_t str_cal
Definition: rig.h:1414
dcd_cb_t dcd_event
Definition: rig.h:1495
int iface
Definition: rig.h:1374
struct filter_list filters[60]
Definition: rig.h:1193
int retry
Definition: rig.h:1351
const struct confparams * extlevels
Definition: rig.h:1164
unsigned ext_levels
Definition: rig.h:1004
split_t split
Definition: rig.h:949
int rig_get_mem_all(RIG *rig, channel_t chans[], const struct confparams cfgps[], value_t vals[])
get all channel and non-channel data
Definition: mem.c:1168
enum dcd_e dcd_t
DCD status.
int targetable_vfo
Definition: rig.h:1179
serial_control_state_e
Serial control state.
Definition: rig.h:202
freq_range_t tx_range_list2[30]
Definition: rig.h:1190
pbwidth_t rig_passband_narrow(RIG *rig, rmode_t mode)
get the narrow passband of a mode
Definition: rig.c:1096
int rig_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
perform Memory/VFO operations
Definition: rig.c:2810
struct filter_list filters[60]
Definition: rig.h:1412
shortfreq_t max_xit
Definition: rig.h:1419
const char * combostr[8]
Definition: rig.h:546
int serial_rate_max
Definition: rig.h:1142
int rig_set_dcd_callback(RIG *rig, dcd_cb_t cb, char *arg)
set the callback for dcd events
Definition: event.c:538
Port definition.
Definition: rig.h:1338
value_t max
Definition: rig.h:1073
int preamp[8]
Definition: rig.h:1424
unsigned scan_group
Definition: rig.h:1001
int rig_set_chan_all_cb(RIG *rig, chan_cb_t chan_cb, char *arg)
set all channel data, by callback
Definition: mem.c:825
setting_t has_get_func
Definition: rig.h:1153
int rig_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts)
get the current Tuning Step
Definition: rig.c:2380
struct hamlib_port::@16::@19 cm108
int bank_qty
Definition: rig.h:1182
const char * rig_strscan(scan_t scan)
Convert enum RIG_SCAN_... to alpha string.
Definition: misc.c:685
int rig_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
set the split mode
Definition: rig.c:2010
int rig_set_powerstat(RIG *rig, powerstat_t status)
turn on/off the radio
Definition: rig.c:2658
int ant
Definition: rig.h:940
setting_t has_set_func
Definition: rig.h:1154
Configuration parameter structure.
Definition: rig.h:532
tone_t ctcss_sql
Definition: rig.h:960
int rig_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
set the Tuning Step
Definition: rig.c:2329
int rig_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
set the repeater offset
Definition: rig.c:1600
int rig_set_channel(RIG *rig, const channel_t *chan)
set channel data
Definition: mem.c:503
const char * label
Definition: rig.h:535
int val
Definition: rig.h:1086
int rig_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
set the RIT
Definition: rig.c:2123
vfo_op_t vfo_ops
Definition: rig.h:1177
ant_t ant
Definition: rig.h:836
struct confparams::@10::@12 c
enum serial_control_state_e rts_state
Definition: rig.h:1361
int rig_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
set CTCSS sub-tone frequency
Definition: tones.c:101
const char * priv
Definition: rig.h:1198
rig_port_e
Port type.
Definition: rig.h:163
int rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
set the split frequencies
Definition: rig.c:1703
hamlib_port_t dcdport
Definition: rig.h:1402
channel_cap_t mem_caps
Definition: rig.h:1049
enum serial_parity_e serial_parity
Definition: rig.h:1145
int rig_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
get the current RIT offset
Definition: rig.c:2174
setting_t has_get_parm
Definition: rig.h:1157
int rig_get_channel(RIG *rig, channel_t *chan)
get channel data
Definition: mem.c:626
int rig_set_ptt_callback(RIG *rig, ptt_cb_t cb, char *arg)
set the callback for ptt events
Definition: event.c:512
const struct confparams * rig_ext_lookup(RIG *rig, const char *name)
lookup ext token by its name, return pointer to confparams struct.
Definition: ext.c:119
int comm_state
Definition: rig.h:1445
const char * rig_get_info(RIG *rig)
get general information from the radio
Definition: rig.c:3121
float max
Definition: rig.h:542
int rig_get_vfo(RIG *rig, vfo_t *vfo)
get the current VFO
Definition: rig.c:1216
void rig_debug(enum rig_debug_level_e debug_level, const char *fmt,...)
Default is debugging messages are done through stderr.
Definition: debug.c:127
const struct confparams * extparms
Definition: rig.h:1163
struct hamlib_port::@16::@18 parallel
rmode_t current_mode
Definition: rig.h:1452
unsigned dcs_sql
Definition: rig.h:1000
const char * clone_combo_get
Definition: rig.h:1330
char * mode_arg
Definition: rig.h:1490
const char * version
Definition: rig.h:1132
char * vendor_name
Definition: rig.h:1376
rptr_shift_t rptr_shift
Definition: rig.h:952
double vfo_comp
Definition: rig.h:1404