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 764 #define mW(p) ((int)(p)) 765 #define Watts(p) ((int)((p)*1000)) 766 #define W(p) Watts(p) 767 #define kW(p) ((int)((p)*1000000L)) 804 #define RIG_MODE_SSB (RIG_MODE_USB|RIG_MODE_LSB) 807 #define RIG_MODE_ECSS (RIG_MODE_ECSSUSB|RIG_MODE_ECSSLSB) 810 #define RIG_DBLST_END 0 811 #define RIG_IS_DBLST_END(d) ((d)==0) 829 #define RIG_FRNG_END {Hz(0),Hz(0),RIG_MODE_NONE,0,0,RIG_VFO_NONE} 830 #define RIG_IS_FRNG_END(r) ((r).start == Hz(0) && (r).end == Hz(0)) 832 #define RIG_ITU_REGION1 1 833 #define RIG_ITU_REGION2 2 834 #define RIG_ITU_REGION3 3 861 #define RIG_TS_END {RIG_MODE_NONE,0} 862 #define RIG_IS_TS_END(t) ((t).modes == RIG_MODE_NONE && (t).ts == 0) 895 #define RIG_FLT_ANY 0 896 #define RIG_FLT_END {RIG_MODE_NONE,0} 897 #define RIG_IS_FLT_END(f) ((f).modes == RIG_MODE_NONE) 901 #define RIG_CHFLAG_NONE 0 903 #define RIG_CHFLAG_SKIP (1<<0) 905 #define RIG_CHFLAG_DATA (1<<1) 916 #define RIG_EXT_END {0, {.i=0}} 917 #define RIG_IS_EXT_END(x) ((x).token == 0) 955 char channel_desc[MAXCHANDESC];
980 unsigned rptr_shift:1;
981 unsigned rptr_offs:1;
982 unsigned tuning_step:1;
987 unsigned ctcss_tone:1;
988 unsigned ctcss_sql:1;
991 unsigned scan_group:1;
993 unsigned channel_desc:1;
994 unsigned ext_levels:1;
1042 #define RIG_CHAN_END {0,0,RIG_MTYPE_NONE} 1043 #define RIG_IS_CHAN_END(c) ((c).type == RIG_MTYPE_NONE) 1045 #define RIG_MEM_CAPS_ALL -1 1077 } table[MAX_CAL_LENGTH];
1094 #define EMPTY_STR_CAL { 0, { { 0, 0 }, } } 1098 typedef int (*confval_cb_t) (RIG *,
const struct confparams *,
value_t *, rig_ptr_t);
1159 int preamp[MAXDBLSTSIZ];
1160 int attenuator[MAXDBLSTSIZ];
1205 int (*set_freq) (RIG *
rig, vfo_t vfo, freq_t freq);
1206 int (*get_freq) (RIG * rig, vfo_t vfo, freq_t * freq);
1208 int (*set_mode) (RIG * rig, vfo_t vfo, rmode_t mode,
1210 int (*get_mode) (RIG * rig, vfo_t vfo, rmode_t * mode,
1213 int (*set_vfo) (RIG * rig, vfo_t vfo);
1214 int (*get_vfo) (RIG * rig, vfo_t * vfo);
1216 int (*set_ptt) (RIG * rig, vfo_t vfo, ptt_t ptt);
1217 int (*get_ptt) (RIG * rig, vfo_t vfo, ptt_t * ptt);
1218 int (*get_dcd) (RIG * rig, vfo_t vfo, dcd_t * dcd);
1220 int (*set_rptr_shift) (RIG * rig, vfo_t vfo,
1221 rptr_shift_t rptr_shift);
1222 int (*get_rptr_shift) (RIG * rig, vfo_t vfo,
1223 rptr_shift_t * rptr_shift);
1225 int (*set_rptr_offs) (RIG * rig, vfo_t vfo, shortfreq_t offs);
1226 int (*get_rptr_offs) (RIG * rig, vfo_t vfo, shortfreq_t * offs);
1228 int (*set_split_freq) (RIG * rig, vfo_t vfo, freq_t tx_freq);
1229 int (*get_split_freq) (RIG * rig, vfo_t vfo, freq_t * tx_freq);
1230 int (*set_split_mode) (RIG * rig, vfo_t vfo, rmode_t tx_mode,
1231 pbwidth_t tx_width);
1232 int (*get_split_mode) (RIG * rig, vfo_t vfo, rmode_t * tx_mode,
1233 pbwidth_t * tx_width);
1235 int (*set_split_vfo) (RIG * rig, vfo_t vfo, split_t split, vfo_t tx_vfo);
1236 int (*get_split_vfo) (RIG * rig, vfo_t vfo, split_t * split, vfo_t *tx_vfo);
1238 int (*set_rit) (RIG * rig, vfo_t vfo, shortfreq_t rit);
1239 int (*get_rit) (RIG * rig, vfo_t vfo, shortfreq_t * rit);
1240 int (*set_xit) (RIG * rig, vfo_t vfo, shortfreq_t xit);
1241 int (*get_xit) (RIG * rig, vfo_t vfo, shortfreq_t * xit);
1243 int (*set_ts) (RIG * rig, vfo_t vfo, shortfreq_t ts);
1244 int (*get_ts) (RIG * rig, vfo_t vfo, shortfreq_t * ts);
1246 int (*set_dcs_code) (RIG * rig, vfo_t vfo,
tone_t code);
1247 int (*get_dcs_code) (RIG * rig, vfo_t vfo,
tone_t * code);
1248 int (*set_tone) (RIG * rig, vfo_t vfo,
tone_t tone);
1249 int (*get_tone) (RIG * rig, vfo_t vfo,
tone_t * tone);
1250 int (*set_ctcss_tone) (RIG * rig, vfo_t vfo,
tone_t tone);
1251 int (*get_ctcss_tone) (RIG * rig, vfo_t vfo,
tone_t * tone);
1253 int (*set_dcs_sql) (RIG * rig, vfo_t vfo,
tone_t code);
1254 int (*get_dcs_sql) (RIG * rig, vfo_t vfo,
tone_t * code);
1255 int (*set_tone_sql) (RIG * rig, vfo_t vfo,
tone_t tone);
1256 int (*get_tone_sql) (RIG * rig, vfo_t vfo,
tone_t * tone);
1257 int (*set_ctcss_sql) (RIG * rig, vfo_t vfo,
tone_t tone);
1258 int (*get_ctcss_sql) (RIG * rig, vfo_t vfo,
tone_t * tone);
1260 int (*power2mW) (RIG * rig,
unsigned int *mwpower,
float power,
1261 freq_t freq, rmode_t mode);
1262 int (*mW2power) (RIG * rig,
float *power,
unsigned int mwpower,
1263 freq_t freq, rmode_t mode);
1265 int (*set_powerstat) (RIG * rig,
powerstat_t status);
1266 int (*get_powerstat) (RIG * rig,
powerstat_t * status);
1267 int (*reset) (RIG * rig,
reset_t reset);
1269 int (*set_ant) (RIG * rig, vfo_t vfo, ant_t ant);
1270 int (*get_ant) (RIG * rig, vfo_t vfo, ant_t * ant);
1272 int (*set_level) (RIG * rig, vfo_t vfo, setting_t level,
1274 int (*get_level) (RIG * rig, vfo_t vfo, setting_t level,
1277 int (*set_func) (RIG * rig, vfo_t vfo, setting_t func,
int status);
1278 int (*get_func) (RIG * rig, vfo_t vfo, setting_t func,
1281 int (*set_parm) (RIG * rig, setting_t parm, value_t val);
1282 int (*get_parm) (RIG * rig, setting_t parm, value_t * val);
1284 int (*set_ext_level)(RIG *rig, vfo_t vfo, token_t
token, value_t val);
1285 int (*get_ext_level)(RIG *rig, vfo_t vfo, token_t
token, value_t *val);
1287 int (*set_ext_parm)(RIG *rig, token_t
token, value_t val);
1288 int (*get_ext_parm)(RIG *rig, token_t
token, value_t *val);
1290 int (*set_conf) (RIG * rig, token_t
token,
const char *val);
1291 int (*get_conf) (RIG * rig, token_t
token,
char *val);
1293 int (*send_dtmf) (RIG * rig, vfo_t vfo,
const char *digits);
1294 int (*recv_dtmf) (RIG * rig, vfo_t vfo,
char *digits,
int *length);
1295 int (*send_morse) (RIG * rig, vfo_t vfo,
const char *msg);
1297 int (*set_bank) (RIG * rig, vfo_t vfo,
int bank);
1298 int (*set_mem) (RIG * rig, vfo_t vfo,
int ch);
1299 int (*get_mem) (RIG * rig, vfo_t vfo,
int *ch);
1300 int (*vfo_op) (RIG * rig, vfo_t vfo,
vfo_op_t op);
1301 int (*scan) (RIG * rig, vfo_t vfo,
scan_t scan,
int ch);
1303 int (*set_trn) (RIG * rig,
int trn);
1304 int (*get_trn) (RIG * rig,
int *trn);
1306 int (*decode_event) (RIG * rig);
1308 int (*set_channel) (RIG * rig,
const channel_t * chan);
1309 int (*get_channel) (RIG * rig, channel_t * chan);
1311 const char *(*get_info) (RIG * rig);
1313 int (*set_chan_all_cb) (RIG * rig, chan_cb_t chan_cb, rig_ptr_t);
1314 int (*get_chan_all_cb) (RIG * rig, chan_cb_t chan_cb, rig_ptr_t);
1316 int (*set_mem_all_cb) (RIG * rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t);
1317 int (*get_mem_all_cb) (RIG * rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t);
1339 struct {
int tv_sec,tv_usec; } post_write_date;
1343 char pathname[FILPATHLEN];
1372 #if !defined(__APPLE__) || !defined(__cplusplus) 1414 int preamp[MAXDBLSTSIZ];
1415 int attenuator[MAXDBLSTSIZ];
1450 typedef int (*vprintf_cb_t) (
enum rig_debug_level_e, rig_ptr_t,
const char *, va_list);
1452 typedef int (*freq_cb_t) (RIG *,
vfo_t,
freq_t, rig_ptr_t);
1454 typedef int (*vfo_cb_t) (RIG *,
vfo_t, rig_ptr_t);
1455 typedef int (*ptt_cb_t) (RIG *,
vfo_t,
ptt_t, rig_ptr_t);
1456 typedef int (*dcd_cb_t) (RIG *,
vfo_t,
dcd_t, rig_ptr_t);
1457 typedef int (*pltune_cb_t) (RIG *,
vfo_t, freq_t *, rmode_t *, pbwidth_t *, rig_ptr_t);
1512 extern HAMLIB_EXPORT(
int)
rig_open HAMLIB_PARAMS((RIG *
rig));
1519 extern HAMLIB_EXPORT(
int)
rig_set_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t freq));
1520 extern HAMLIB_EXPORT(
int)
rig_get_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t *freq));
1522 extern HAMLIB_EXPORT(
int)
rig_set_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width));
1523 extern HAMLIB_EXPORT(
int)
rig_get_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width));
1525 extern HAMLIB_EXPORT(
int)
rig_set_vfo HAMLIB_PARAMS((RIG *rig, vfo_t vfo));
1526 extern HAMLIB_EXPORT(
int)
rig_get_vfo HAMLIB_PARAMS((RIG *rig, vfo_t *vfo));
1528 extern HAMLIB_EXPORT(
int)
rig_set_ptt HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ptt_t ptt));
1529 extern HAMLIB_EXPORT(
int)
rig_get_ptt HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ptt_t *ptt));
1531 extern HAMLIB_EXPORT(
int)
rig_get_dcd HAMLIB_PARAMS((RIG *rig, vfo_t vfo, dcd_t *dcd));
1533 extern HAMLIB_EXPORT(
int)
rig_set_rptr_shift HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift));
1534 extern HAMLIB_EXPORT(
int)
rig_get_rptr_shift HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift));
1535 extern HAMLIB_EXPORT(
int)
rig_set_rptr_offs HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t rptr_offs));
1536 extern HAMLIB_EXPORT(
int)
rig_get_rptr_offs HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs));
1548 extern HAMLIB_EXPORT(
int)
rig_set_split_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t tx_freq));
1549 extern HAMLIB_EXPORT(
int)
rig_get_split_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t *tx_freq));
1550 extern HAMLIB_EXPORT(
int)
rig_set_split_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width));
1551 extern HAMLIB_EXPORT(
int)
rig_get_split_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width));
1552 extern HAMLIB_EXPORT(
int)
rig_set_split_vfo HAMLIB_PARAMS((RIG*, vfo_t rx_vfo, split_t split, vfo_t tx_vfo));
1553 extern HAMLIB_EXPORT(
int)
rig_get_split_vfo HAMLIB_PARAMS((RIG*, vfo_t rx_vfo, split_t *split, vfo_t *tx_vfo));
1554 #define rig_set_split(r,v,s) rig_set_split_vfo((r),(v),(s),RIG_VFO_CURR) 1555 #define rig_get_split(r,v,s) ({ vfo_t _tx_vfo; rig_get_split_vfo((r),(v),(s),&_tx_vfo); }) 1557 extern HAMLIB_EXPORT(
int)
rig_set_rit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t rit));
1558 extern HAMLIB_EXPORT(
int)
rig_get_rit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *rit));
1559 extern HAMLIB_EXPORT(
int)
rig_set_xit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t xit));
1560 extern HAMLIB_EXPORT(
int)
rig_get_xit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *xit));
1562 extern HAMLIB_EXPORT(
int)
rig_set_ts HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t ts));
1563 extern HAMLIB_EXPORT(
int)
rig_get_ts HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *ts));
1565 extern HAMLIB_EXPORT(
int)
rig_power2mW HAMLIB_PARAMS((RIG *rig,
unsigned int *mwpower,
float power, freq_t freq, rmode_t mode));
1566 extern HAMLIB_EXPORT(
int)
rig_mW2power HAMLIB_PARAMS((RIG *rig,
float *power,
unsigned int mwpower, freq_t freq, rmode_t mode));
1568 extern HAMLIB_EXPORT(shortfreq_t)
rig_get_resolution HAMLIB_PARAMS((RIG *rig, rmode_t mode));
1570 extern HAMLIB_EXPORT(
int)
rig_set_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t level, value_t val));
1571 extern HAMLIB_EXPORT(
int)
rig_get_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t level, value_t *val));
1573 #define rig_get_strength(r,v,s) rig_get_level((r),(v),RIG_LEVEL_STRENGTH, (value_t*)(s)) 1575 extern HAMLIB_EXPORT(
int)
rig_set_parm HAMLIB_PARAMS((RIG *rig, setting_t parm, value_t val));
1576 extern HAMLIB_EXPORT(
int)
rig_get_parm HAMLIB_PARAMS((RIG *rig, setting_t parm, value_t *val));
1578 extern HAMLIB_EXPORT(
int)
rig_set_conf HAMLIB_PARAMS((RIG *rig, token_t
token, const
char *val));
1579 extern HAMLIB_EXPORT(
int)
rig_get_conf HAMLIB_PARAMS((RIG *rig, token_t token,
char *val));
1584 extern HAMLIB_EXPORT(
int)
rig_reset HAMLIB_PARAMS((RIG *rig,
reset_t reset));
1587 token_t token, value_t val));
1589 token_t token, value_t *val));
1591 extern HAMLIB_EXPORT(
int)
rig_set_ext_parm HAMLIB_PARAMS((RIG *rig, token_t token, value_t val));
1592 extern HAMLIB_EXPORT(
int)
rig_get_ext_parm HAMLIB_PARAMS((RIG *rig, token_t token, value_t *val));
1595 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));
1596 extern HAMLIB_EXPORT(const struct confparams*)
rig_ext_lookup HAMLIB_PARAMS((RIG *rig, const
char *
name));
1597 extern HAMLIB_EXPORT(const struct confparams *)
rig_ext_lookup_tok HAMLIB_PARAMS((RIG *rig, token_t token));
1598 extern HAMLIB_EXPORT(token_t)
rig_ext_token_lookup HAMLIB_PARAMS((RIG *rig, const
char *name));
1601 extern HAMLIB_EXPORT(
int)
rig_token_foreach HAMLIB_PARAMS((RIG *rig,
int (*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data));
1602 extern HAMLIB_EXPORT(const struct confparams*)
rig_confparam_lookup HAMLIB_PARAMS((RIG *rig, const
char *name));
1603 extern HAMLIB_EXPORT(token_t)
rig_token_lookup HAMLIB_PARAMS((RIG *rig, const
char *name));
1605 extern HAMLIB_EXPORT(
int)
rig_close HAMLIB_PARAMS((RIG *rig));
1606 extern HAMLIB_EXPORT(
int)
rig_cleanup HAMLIB_PARAMS((RIG *rig));
1608 extern HAMLIB_EXPORT(
int)
rig_set_ant HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ant_t ant));
1609 extern HAMLIB_EXPORT(
int)
rig_get_ant HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ant_t *ant));
1611 extern HAMLIB_EXPORT(setting_t)
rig_has_get_level HAMLIB_PARAMS((RIG *rig, setting_t level));
1612 extern HAMLIB_EXPORT(setting_t)
rig_has_set_level HAMLIB_PARAMS((RIG *rig, setting_t level));
1614 extern HAMLIB_EXPORT(setting_t)
rig_has_get_parm HAMLIB_PARAMS((RIG *rig, setting_t parm));
1615 extern HAMLIB_EXPORT(setting_t)
rig_has_set_parm HAMLIB_PARAMS((RIG *rig, setting_t parm));
1617 extern HAMLIB_EXPORT(setting_t)
rig_has_get_func HAMLIB_PARAMS((RIG *rig, setting_t func));
1618 extern HAMLIB_EXPORT(setting_t)
rig_has_set_func HAMLIB_PARAMS((RIG *rig, setting_t func));
1620 extern HAMLIB_EXPORT(
int)
rig_set_func HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t func,
int status));
1621 extern HAMLIB_EXPORT(
int)
rig_get_func HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t func,
int *status));
1623 extern HAMLIB_EXPORT(
int)
rig_send_dtmf HAMLIB_PARAMS((RIG *rig, vfo_t vfo, const
char *digits));
1624 extern HAMLIB_EXPORT(
int)
rig_recv_dtmf HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
char *digits,
int *length));
1625 extern HAMLIB_EXPORT(
int)
rig_send_morse HAMLIB_PARAMS((RIG *rig, vfo_t vfo, const
char *msg));
1627 extern HAMLIB_EXPORT(
int)
rig_set_bank HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
int bank));
1628 extern HAMLIB_EXPORT(
int)
rig_set_mem HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
int ch));
1629 extern HAMLIB_EXPORT(
int)
rig_get_mem HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
int *ch));
1630 extern HAMLIB_EXPORT(
int)
rig_vfo_op HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
vfo_op_t op));
1632 extern HAMLIB_EXPORT(
int)
rig_scan HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
scan_t scan,
int ch));
1635 extern HAMLIB_EXPORT(
int)
rig_set_channel HAMLIB_PARAMS((RIG *rig, const channel_t *chan));
1636 extern HAMLIB_EXPORT(
int)
rig_get_channel HAMLIB_PARAMS((RIG *rig, channel_t *chan));
1638 extern HAMLIB_EXPORT(
int)
rig_set_chan_all HAMLIB_PARAMS((RIG *rig, const channel_t chans[]));
1639 extern HAMLIB_EXPORT(
int)
rig_get_chan_all HAMLIB_PARAMS((RIG *rig, channel_t chans[]));
1640 extern HAMLIB_EXPORT(
int)
rig_set_chan_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, rig_ptr_t));
1641 extern HAMLIB_EXPORT(
int)
rig_get_chan_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, rig_ptr_t));
1643 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));
1644 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));
1645 extern HAMLIB_EXPORT(
int)
rig_set_mem_all HAMLIB_PARAMS((RIG *rig, const channel_t *chan, const struct confparams *, const value_t *));
1646 extern HAMLIB_EXPORT(
int)
rig_get_mem_all HAMLIB_PARAMS((RIG *rig, channel_t *chan, const struct confparams *, value_t *));
1647 extern HAMLIB_EXPORT(const chan_t *)
rig_lookup_mem_caps HAMLIB_PARAMS((RIG *rig,
int ch));
1648 extern HAMLIB_EXPORT(
int)
rig_mem_count HAMLIB_PARAMS((RIG *rig));
1651 extern HAMLIB_EXPORT(
int)
rig_set_trn HAMLIB_PARAMS((RIG *rig,
int trn));
1652 extern HAMLIB_EXPORT(
int)
rig_get_trn HAMLIB_PARAMS((RIG *rig,
int *trn));
1660 extern HAMLIB_EXPORT(const
char *)
rig_get_info HAMLIB_PARAMS((RIG *rig));
1662 extern HAMLIB_EXPORT(const struct
rig_caps *) rig_get_caps HAMLIB_PARAMS((
rig_model_t rig_model));
1665 extern HAMLIB_EXPORT(pbwidth_t)
rig_passband_normal HAMLIB_PARAMS((RIG *rig, rmode_t mode));
1666 extern HAMLIB_EXPORT(pbwidth_t)
rig_passband_narrow HAMLIB_PARAMS((RIG *rig, rmode_t mode));
1667 extern HAMLIB_EXPORT(pbwidth_t)
rig_passband_wide HAMLIB_PARAMS((RIG *rig, rmode_t mode));
1669 extern HAMLIB_EXPORT(const
char *)
rigerror HAMLIB_PARAMS((
int errnum));
1671 extern HAMLIB_EXPORT(
int)
rig_setting2idx HAMLIB_PARAMS((setting_t s));
1672 #define rig_idx2setting(i) (1UL<<(i)) 1678 extern HAMLIB_EXPORT(
void)
rig_set_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
1679 #define rig_set_debug_level(level) rig_set_debug(level) 1680 extern HAMLIB_EXPORT(
int)
rig_need_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
1681 extern HAMLIB_EXPORT(
void)
rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level, const
char *fmt, ...));
1682 extern HAMLIB_EXPORT(vprintf_cb_t)
rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb, rig_ptr_t arg));
1685 extern HAMLIB_EXPORT(
int) rig_register HAMLIB_PARAMS((const struct
rig_caps *caps));
1686 extern HAMLIB_EXPORT(
int) rig_unregister HAMLIB_PARAMS((
rig_model_t rig_model));
1687 extern HAMLIB_EXPORT(
int) rig_list_foreach HAMLIB_PARAMS((
int (*cfunc)(const struct
rig_caps*, rig_ptr_t), rig_ptr_t data));
1688 extern HAMLIB_EXPORT(
int) rig_load_backend HAMLIB_PARAMS((const
char *be_name));
1689 extern HAMLIB_EXPORT(
int) rig_check_backend HAMLIB_PARAMS((
rig_model_t rig_model));
1690 extern HAMLIB_EXPORT(
int) rig_load_all_backends HAMLIB_PARAMS((
void));
1693 extern HAMLIB_EXPORT(
int)
rig_probe_all HAMLIB_PARAMS((hamlib_port_t *p, rig_probe_func_t, rig_ptr_t));
1694 extern HAMLIB_EXPORT(rig_model_t)
rig_probe HAMLIB_PARAMS((hamlib_port_t *p));
1698 extern HAMLIB_EXPORT(const
char *)
rig_strrmode(rmode_t mode);
1699 extern HAMLIB_EXPORT(const
char *)
rig_strvfo(vfo_t vfo);
1700 extern HAMLIB_EXPORT(const
char *)
rig_strfunc(setting_t);
1701 extern HAMLIB_EXPORT(const
char *)
rig_strlevel(setting_t);
1702 extern HAMLIB_EXPORT(const
char *)
rig_strparm(setting_t);
1707 extern HAMLIB_EXPORT(const
char *)
rig_strmtype(chan_type_t mtype);
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:2656
setting_t funcs
Definition: rig.h:985
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:1481
int vid
Definition: rig.h:1361
rig_debug_level_e
Hamlib debug levels.
Definition: rig.h:115
value_t step
Definition: rig.h:1064
unsigned long setting_t
Setting.
Definition: rig.h:706
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:1418
struct ext_list * ext_levels
Definition: rig.h:956
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:1075
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:1325
const char * rigerror(int errnum)
get string describing the error code
Definition: rig.c:248
void * handle
Definition: rig.h:1335
value_t min
Definition: rig.h:1062
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
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:890
vfo_t tx_vfo
Definition: rig.h:1444
float f
Definition: rig.h:613
int rig_set_vfo(RIG *rig, vfo_t vfo)
set the current VFO
Definition: rig.c:1100
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:946
const char * rig_strlevel(setting_t)
Convert enum RIG_LEVEL_... to alpha string.
Definition: misc.c:516
int rig_model_t
Convenience type definition for rig model.
Definition: riglist.h:530
pbwidth_t tx_width
Definition: rig.h:937
setting_t has_get_level
Definition: rig.h:1145
int low_power
Definition: rig.h:823
int post_write_delay
Definition: rig.h:1139
const char hamlib_version[]
Hamlib release number The version number has the format x.y.z.
Definition: rig.c:80
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
const char * dflt
Definition: rig.h:537
setting_t has_set_parm
Definition: rig.h:1148
int rig_send_morse(RIG *rig, vfo_t vfo, const char *msg)
send morse code
Definition: rig.c:2818
const char * cs
Definition: rig.h:615
rig_port_t rig
Definition: rig.h:1330
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:2385
shortfreq_t max_ifshift
Definition: rig.h:1410
rig_port_t port_type
Definition: rig.h:1129
char * dcd_arg
Definition: rig.h:1486
pbwidth_t rig_passband_wide(RIG *rig, rmode_t mode)
get the wide passband of a mode
Definition: rig.c:1057
vfo_t vfo
Definition: rig.h:929
int rig_set_bank(RIG *rig, vfo_t vfo, int bank)
set the current memory bank
Definition: mem.c:167
int rig_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
perform Memory/VFO operations
Definition: rig.c:2681
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:2863
int mode_list
Definition: rig.h:1445
int rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
get the frequency of the target VFO
Definition: rig.c:811
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:2344
rig_parm_e
Rig Parameters.
Definition: rig.h:682
Tuning step definition.
Definition: rig.h:855
int rig_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
get the current XIT offset
Definition: rig.c:2106
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:1319
vfo_op_t rig_has_vfo_op(RIG *rig, vfo_op_t op)
check retrieval ability of VFO operations
Definition: rig.c:2586
int rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
set PTT on/off
Definition: rig.c:1168
const char * rig_strfunc(setting_t)
Convert enum RIG_FUNC_... to alpha string.
Definition: misc.c:439
char * vfo_arg
Definition: rig.h:1482
int rig_set_trn(RIG *rig, int trn)
control the transceive mode
Definition: event.c:591
Frequency range.
Definition: rig.h:819
ann_t announces
Definition: rig.h:1412
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:1436
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:1165
int vfo_list
Definition: rig.h:1434
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:104
scan_t scan_ops
Definition: rig.h:1168
setting_t has_get_func
Definition: rig.h:1417
signed int i
Definition: rig.h:612
pbwidth_t current_width
Definition: rig.h:1443
setting_t has_get_parm
Definition: rig.h:1421
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:931
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:747
int conf
Definition: rig.h:1363
pbwidth_t width
Definition: rig.h:933
rmode_t mode
Definition: rig.h:932
shortfreq_t tuning_step
Definition: rig.h:944
unsigned int tone_t
CTCSS and DCS type definition.
Definition: rig.h:158
freq_t current_freq
Definition: rig.h:1441
ptt_type_t ptt_type
Definition: rig.h:1127
int rig_send_dtmf(RIG *rig, vfo_t vfo, const char *digits)
send DTMF digits
Definition: rig.c:2727
serial_handshake_e
Serial handshake.
Definition: rig.h:192
int high_power
Definition: rig.h:824
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:1721
shortfreq_t max_rit
Definition: rig.h:1161
int rig_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
activate/de-activate functions of radio
Definition: settings.c:397
shortfreq_t pbwidth_t
Passband width, in Hz.
Definition: rig.h:374
Channel capability definition.
Definition: rig.h:966
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:2423
Channel structure.
Definition: rig.h:926
vfo_op_t
VFO operation.
Definition: rig.h:460
rptr_shift_t
Repeater shift type.
Definition: rig.h:258
int size
Definition: rig.h:1073
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:911
const struct confparams * rig_ext_lookup_tok(RIG *rig, token_t token)
lookup ext token, return pointer to confparams struct.
Definition: ext.c:144
int pid
Definition: rig.h:1362
int rig_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit)
set the XIT
Definition: rig.c:2061
int rig_set_chan_all(RIG *rig, const channel_t chans[])
set all channel data
Definition: mem.c:899
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:1795
setting_t has_set_parm
Definition: rig.h:1422
int retry
Definition: rig.h:1141
int timeout
Definition: rig.h:1140
freq_cb_t freq_event
Definition: rig.h:1477
const tone_t * dcs_list
Definition: rig.h:1157
vfo_t current_vfo
Definition: rig.h:1433
Rig data structure.
Definition: rig.h:1118
int rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
get the status of the PTT
Definition: rig.c:1240
int rig_type
Definition: rig.h:1126
hamlib_port_t pttport
Definition: rig.h:1391
freq_t end
Definition: rig.h:821
dcd_type_t
DCD type.
Definition: rig.h:389
int rig_reset(RIG *rig, reset_t reset)
reset the radio
Definition: rig.c:2510
token_t token
Definition: rig.h:912
rmode_t modes
Definition: rig.h:822
pltune_cb_t pltune
Definition: rig.h:1487
int iface
Definition: rig.h:1364
Port definition.
Definition: rig.h:1328
setting_t rig_parse_parm(const char *s)
Convert alpha string to RIG_PARM_...
Definition: misc.c:551
tone_t dcs_code
Definition: rig.h:951
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:1011
setting_t has_set_level
Definition: rig.h:1420
int channel_num
Definition: rig.h:927
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:192
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
int timeout
Definition: rig.h:1340
shortfreq_t max_rit
Definition: rig.h:1408
const char * rig_strvfop(vfo_op_t op)
Convert enum RIG_OP_... to alpha string.
Definition: misc.c:628
setting_t rig_parse_level(const char *s)
Convert alpha string to enum RIG_LEVEL_...
Definition: misc.c:498
const tone_t * ctcss_list
Definition: rig.h:1156
rmode_t modes
Definition: rig.h:856
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:1396
int poll_interval
Definition: rig.h:1440
shortfreq_t max_xit
Definition: rig.h:1162
int rig_open(RIG *rig)
open the communication to the rig
Definition: rig.c:453
int serial_data_bits
Definition: rig.h:1133
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:766
agc_level_e
AGC delay settings.
Definition: rig.h:583
Rig state containing live data and customized fields.
Definition: rig.h:1386
shortfreq_t rit
Definition: rig.h:945
int hold_decode
Definition: rig.h:1432
int transceive
Definition: rig.h:1439
char * product
Definition: rig.h:1367
ann_t
Announce.
Definition: rig.h:555
const char * rig_strparm(setting_t)
Convert enum RIG_PARM_... to alpha string.
Definition: misc.c:569
int rig_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
get the current repeater shift
Definition: rig.c:1446
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:716
RIG * rig_init(rig_model_t rig_model)
allocate a new RIG handle
Definition: rig.c:269
int chan_desc_sz
Definition: rig.h:1173
pbwidth_t rig_passband_normal(RIG *rig, rmode_t mode)
get the normal passband of a mode
Definition: rig.c:981
const char hamlib_copyright[]
Hamlib copyright notice.
Definition: rig.c:85
dcd_type_t dcd_type
Definition: rig.h:1128
int rig_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
set the repeater shift
Definition: rig.c:1402
int serial_stop_bits
Definition: rig.h:1134
setting_t has_set_level
Definition: rig.h:1146
char * ptt_arg
Definition: rig.h:1484
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:953
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:1185
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:1536
setting_t rig_parse_func(const char *s)
Convert alpha string to enum RIG_FUNC_...
Definition: misc.c:421
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
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:926
Hamlib rig(radio) model definitions.
rig_conf_e
parameter types
Definition: rig.h:519
const char * mfg_name
Definition: rig.h:1121
freq_t start
Definition: rig.h:820
int rig_get_ant(RIG *rig, vfo_t vfo, ant_t *ant)
get the current antenna
Definition: rig.c:2292
const char * copyright
Definition: rig.h:1123
enum rig_port_e rig_port_t
Port type.
setting_t levels
Definition: rig.h:986
rmode_t tx_mode
Definition: rig.h:936
const char * rig_strstatus(enum rig_status_e status)
Convert enum RIG_STATUS_... to printable string.
Definition: misc.c:239
rig_func_e
Rig Function Settings.
Definition: rig.h:725
int rig_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
set the current DCS code
Definition: tones.c:386
const char * model_name
Definition: rig.h:1120
ptt_type_t
PTT type.
Definition: rig.h:414
setting_t funcs
Definition: rig.h:947
int write_delay
Definition: rig.h:1337
int rig_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length)
receive DTMF digits
Definition: rig.c:2773
Calibration table struct.
Definition: rig.h:1072
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
tone_t ctcss_tone
Definition: rig.h:949
value_t val
Definition: rig.h:913
setting_t has_get_level
Definition: rig.h:1419
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:1923
int alt
Definition: rig.h:1365
int end
Definition: rig.h:1037
rmode_t
Radio mode.
Definition: rig.h:777
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:857
int pin
Definition: rig.h:1355
hamlib_port_t rigport
Definition: rig.h:1390
rig_model_t rig_model
Definition: rig.h:1119
char * obj
Definition: rig.h:1437
rptr_shift_t rig_parse_rptr_shift(const char *s)
Convert alpha char to enum RIG_RPT_SHIFT_...
Definition: misc.c:716
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:1131
int rig_get_powerstat(RIG *rig, powerstat_t *status)
get the on/off status of the radio
Definition: rig.c:2484
pbwidth_t width
Definition: rig.h:892
int rig_probe_all(hamlib_port_t *port, rig_probe_func_t cfunc, char *data)
try to guess rigs
Definition: rig.c:2562
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
shortfreq_t max_ifshift
Definition: rig.h:1163
char * pltune_arg
Definition: rig.h:1488
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:756
chan_type_t type
Definition: rig.h:1038
scan_t rig_parse_scan(const char *s)
Convert alpha string to enum RIG_SCAN_...
Definition: misc.c:664
int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
get the current split frequencies
Definition: rig.c:1650
Callback functions and args for rig event.
Definition: rig.h:1476
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:1138
Memory channel list definition.
Definition: rig.h:1035
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:867
level/parm granularity definition
Definition: rig.h:1061
int stop_bits
Definition: rig.h:1348
rig_model_t rig_probe(hamlib_port_t *port)
try to guess a rig
Definition: rig.c:2537
int post_write_delay
Definition: rig.h:1338
int transceive
Definition: rig.h:1170
shortfreq_t rptr_offs
Definition: rig.h:943
int rig_set_ant(RIG *rig, vfo_t vfo, ant_t ant)
set the antenna
Definition: rig.c:2247
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:610
int rig_close(RIG *rig)
close the communication to the rig
Definition: rig.c:617
int bank_num
Definition: rig.h:928
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:1036
rmode_t modes
Definition: rig.h:891
struct freq_range_list freq_range_t
Frequency range.
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:954
char * freq_arg
Definition: rig.h:1478
FILE * rig_set_debug_file(FILE *stream)
change stderr to some different output
Definition: debug.c:206
ptt_type_t ptt
Definition: rig.h:1331
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
ptt_cb_t ptt_event
Definition: rig.h:1483
struct rig_caps * caps
Definition: rig.h:1502
int rig_need_debug(enum rig_debug_level_e debug_level)
Useful for dump_hex, etc.
Definition: debug.c:123
enum rig_conf_e type
Definition: rig.h:538
vfo_t vfo
Definition: rig.h:825
int rig_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code)
get the current encoding DCS code
Definition: tones.c:239
The Rig structure.
Definition: rig.h:1501
const char * rig_strptrshift(rptr_shift_t)
convert enum RIG_RPT_SHIFT_... to printable character
Definition: misc.c:701
freq_t tx_freq
Definition: rig.h:935
int data_bits
Definition: rig.h:1347
const struct confparams * cfgparams
Definition: rig.h:1187
vfo_t tx_vfo
Definition: rig.h:940
mode_cb_t mode_event
Definition: rig.h:1479
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:952
int rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
set a radio level setting
Definition: settings.c:76
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
cal_table_t str_cal
Definition: rig.h:1404
dcd_cb_t dcd_event
Definition: rig.h:1485
const struct confparams * extlevels
Definition: rig.h:1154
split_t split
Definition: rig.h:939
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:1169
serial_control_state_e
Serial control state.
Definition: rig.h:202
dcd_type_t dcd
Definition: rig.h:1332
pbwidth_t rig_passband_narrow(RIG *rig, rmode_t mode)
get the narrow passband of a mode
Definition: rig.c:1015
int rig_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
perform Memory/VFO operations
Definition: rig.c:2610
shortfreq_t max_xit
Definition: rig.h:1409
int retry
Definition: rig.h:1341
const char * combostr[8]
Definition: rig.h:546
int serial_rate_max
Definition: rig.h:1132
int rig_set_dcd_callback(RIG *rig, dcd_cb_t cb, char *arg)
set the callback for dcd events
Definition: event.c:538
value_t max
Definition: rig.h:1063
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:1143
int rig_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts)
get the current Tuning Step
Definition: rig.c:2198
int bank_qty
Definition: rig.h:1172
const char * rig_strscan(scan_t scan)
Convert enum RIG_SCAN_... to alpha string.
Definition: misc.c:683
int rig_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
set the split mode
Definition: rig.c:1869
int rig_set_powerstat(RIG *rig, powerstat_t status)
turn on/off the radio
Definition: rig.c:2458
char * vendor_name
Definition: rig.h:1366
int ant
Definition: rig.h:930
setting_t has_set_func
Definition: rig.h:1144
Configuration parameter structure.
Definition: rig.h:532
tone_t ctcss_sql
Definition: rig.h:950
int rig_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
set the Tuning Step
Definition: rig.c:2153
int fd
Definition: rig.h:1334
int rig_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
set the repeater offset
Definition: rig.c:1491
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:1076
int rig_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
set the RIT
Definition: rig.c:1971
vfo_op_t vfo_ops
Definition: rig.h:1167
ant_t ant
Definition: rig.h:826
struct confparams::@10::@12 c
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:1188
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:1582
hamlib_port_t dcdport
Definition: rig.h:1392
channel_cap_t mem_caps
Definition: rig.h:1039
int rig_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
get the current RIT offset
Definition: rig.c:2016
setting_t has_get_parm
Definition: rig.h:1147
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:1435
const char * rig_get_info(RIG *rig)
get general information from the radio
Definition: rig.c:2891
float max
Definition: rig.h:542
int rig_get_vfo(RIG *rig, vfo_t *vfo)
get the current VFO
Definition: rig.c:1135
void rig_debug(enum rig_debug_level_e debug_level, const char *fmt,...)
Default is debugging messages are done through stderr.
Definition: debug.c:133
const struct confparams * extparms
Definition: rig.h:1153
rmode_t current_mode
Definition: rig.h:1442
const char * clone_combo_get
Definition: rig.h:1320
char * mode_arg
Definition: rig.h:1480
const char * version
Definition: rig.h:1122
rptr_shift_t rptr_shift
Definition: rig.h:942
double vfo_comp
Definition: rig.h:1394
int rate
Definition: rig.h:1346