Hamlib  3.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rig.h
Go to the documentation of this file.
1 /*
2  * Hamlib Interface - API header
3  * Copyright (c) 2000-2003 by Frank Singleton
4  * Copyright (c) 2000-2012 by Stephane Fillod
5  *
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  *
21  */
22 
23 
24 #ifndef _RIG_H
25 #define _RIG_H 1
26 
27 #include <stdio.h>
28 #include <stdarg.h>
29 
30 #include <hamlib/riglist.h> /* list in another file to not mess up w/ this one */
31 
45 /* __BEGIN_DECLS should be used at the beginning of your declarations,
46  * so that C++ compilers don't mangle their names. Use __END_DECLS at
47  * the end of C declarations. */
48 #undef __BEGIN_DECLS
49 #undef __END_DECLS
50 #ifdef __cplusplus
51 # define __BEGIN_DECLS extern "C" {
52 # define __END_DECLS }
53 #else
54 # define __BEGIN_DECLS /* empty */
55 # define __END_DECLS /* empty */
56 #endif
57 
58 /* HAMLIB_PARAMS is a macro used to wrap function prototypes, so that compilers
59  * that don't understand ANSI C prototypes still work, and ANSI C
60  * compilers can issue warnings about type mismatches. */
61 #undef HAMLIB_PARAMS
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*
65 #else
66 # define HAMLIB_PARAMS(protos) ()
67 # define rig_ptr_t char*
68 #endif
69 
70 #include <hamlib/rig_dll.h>
71 
72 
73 __BEGIN_DECLS
74 
75 extern HAMLIB_EXPORT_VAR(const char) hamlib_version[];
76 extern HAMLIB_EXPORT_VAR(const char) hamlib_copyright[];
77 extern HAMLIB_EXPORT_VAR(const char *) hamlib_version2;
78 extern HAMLIB_EXPORT_VAR(const char *) hamlib_copyright2;
79 
87  RIG_OK=0,
105 };
106 
108 #define NETRIGCTL_RET "RPRT "
109 
124 };
125 
126 /* --------------- Rig capabilities -----------------*/
127 
128 /* Forward struct references */
129 
130 struct rig;
131 struct rig_state;
132 
136 typedef struct rig RIG;
137 
138 #define RIGNAMSIZ 30
139 #define RIGVERSIZ 8
140 #define FILPATHLEN 100
141 #define FRQRANGESIZ 30
142 #define MAXCHANDESC 30 /* describe channel eg: "WWV 5Mhz" */
143 #define TSLSTSIZ 20 /* max tuning step list size, zero ended */
144 #define FLTLSTSIZ 60 /* max mode/filter list size, zero ended */
145 #define MAXDBLSTSIZ 8 /* max preamp/att levels supported, zero ended */
146 #define CHANLSTSIZ 16 /* max mem_list size, zero ended */
147 #define MAX_CAL_LENGTH 32 /* max calibration plots in cal_table_t */
148 
149 
160 typedef unsigned int tone_t;
161 
165 typedef enum rig_port_e {
180 } rig_port_t;
181 
191 };
192 
200 };
201 
202 
210 };
211 
213 typedef enum {
214  RIG_FLAG_RECEIVER = (1<<1),
216  RIG_FLAG_SCANNER = (1<<3),
218  RIG_FLAG_MOBILE = (1<<4),
219  RIG_FLAG_HANDHELD = (1<<5),
220  RIG_FLAG_COMPUTER = (1<<6),
221  RIG_FLAG_TRUNKING = (1<<7),
222  RIG_FLAG_APRS = (1<<8),
223  RIG_FLAG_TNC = (1<<9),
224  RIG_FLAG_DXCLUSTER = (1<<10),
225  RIG_FLAG_TUNER = (1<<11)
226 } rig_type_t;
227 
228 #define RIG_FLAG_TRANSCEIVER (RIG_FLAG_RECEIVER|RIG_FLAG_TRANSMITTER)
229 #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)
230 
231 #define RIG_TYPE_OTHER 0
232 #define RIG_TYPE_TRANSCEIVER RIG_FLAG_TRANSCEIVER
233 #define RIG_TYPE_HANDHELD (RIG_FLAG_TRANSCEIVER|RIG_FLAG_HANDHELD)
234 #define RIG_TYPE_MOBILE (RIG_FLAG_TRANSCEIVER|RIG_FLAG_MOBILE)
235 #define RIG_TYPE_RECEIVER RIG_FLAG_RECEIVER
236 #define RIG_TYPE_PCRECEIVER (RIG_FLAG_COMPUTER|RIG_FLAG_RECEIVER)
237 #define RIG_TYPE_SCANNER (RIG_FLAG_SCANNER|RIG_FLAG_RECEIVER)
238 #define RIG_TYPE_TRUNKSCANNER (RIG_TYPE_SCANNER|RIG_FLAG_TRUNKING)
239 #define RIG_TYPE_COMPUTER (RIG_FLAG_TRANSCEIVER|RIG_FLAG_COMPUTER)
240 #define RIG_TYPE_TUNER RIG_FLAG_TUNER
241 
242 
252 /* RIG_STATUS_NEW * *!< Initial release of code
253  * !! Use of RIG_STATUS_NEW is deprecated. Do not use it anymore */
254 };
255 
257 #define RIG_STATUS_NEW RIG_STATUS_UNTESTED
258 
262 typedef enum {
266 } rptr_shift_t;
267 
271 typedef enum {
274 } split_t;
275 
280 typedef double freq_t;
282 #define PRIfreq "f"
283 
284 #define SCNfreq "lf"
285 #define FREQFMT SCNfreq
286 
291 typedef signed long shortfreq_t;
292 
293 #define Hz(f) ((freq_t)(f))
294 #define kHz(f) ((freq_t)((f)*(freq_t)1000))
295 #define MHz(f) ((freq_t)((f)*(freq_t)1000000))
296 #define GHz(f) ((freq_t)((f)*(freq_t)1000000000))
297 
298 #define s_Hz(f) ((shortfreq_t)(f))
299 #define s_kHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000))
300 #define s_MHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000))
301 #define s_GHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000000))
302 
303 #define RIG_FREQ_NONE Hz(0)
304 
305 
321 typedef int vfo_t;
322 
324 #define RIG_VFO_NONE 0
325 
326 #define RIG_VFO_TX_FLAG (1<<30)
327 
329 #define RIG_VFO_CURR (1<<29)
330 
332 #define RIG_VFO_MEM (1<<28)
333 
335 #define RIG_VFO_VFO (1<<27)
336 
337 #define RIG_VFO_TX_VFO(v) ((v)|RIG_VFO_TX_FLAG)
338 
340 #define RIG_VFO_TX RIG_VFO_TX_VFO(RIG_VFO_CURR)
341 
343 #define RIG_VFO_RX RIG_VFO_CURR
344 
346 #define RIG_VFO_MAIN (1<<26)
347 
348 #define RIG_VFO_SUB (1<<25)
349 
350 #define RIG_VFO_N(n) (1<<(n))
351 
353 #define RIG_VFO_A RIG_VFO_N(0)
354 
355 #define RIG_VFO_B RIG_VFO_N(1)
356 
357 #define RIG_VFO_C RIG_VFO_N(2)
358 
359 
360 /*
361  * targetable bitfields, for internal use.
362  * RIG_TARGETABLE_PURE means a pure targetable radio on every command
363  */
364 #define RIG_TARGETABLE_NONE 0
365 #define RIG_TARGETABLE_FREQ (1<<0)
366 #define RIG_TARGETABLE_MODE (1<<1)
367 #define RIG_TARGETABLE_PURE (1<<2)
368 #define RIG_TARGETABLE_TONE (1<<3)
369 #define RIG_TARGETABLE_FUNC (1<<4)
370 #define RIG_TARGETABLE_ALL 0x7fffffff
371 
372 
373 #define RIG_PASSBAND_NORMAL s_Hz(0)
374 #define RIG_PASSBAND_NOCHANGE s_Hz(-1)
375 
379 typedef shortfreq_t pbwidth_t;
380 
381 
385 typedef enum dcd_e {
388 } dcd_t;
389 
394 typedef enum {
402 } dcd_type_t;
403 
404 
408 typedef enum {
413 } ptt_t;
414 
419 typedef enum {
429 } ptt_type_t;
430 
434 typedef enum {
436  RIG_POWER_ON = (1<<0),
438 } powerstat_t;
439 
443 typedef enum {
445  RIG_RESET_SOFT = (1<<0),
446  RIG_RESET_VFO = (1<<1),
447  RIG_RESET_MCALL = (1<<2),
449 } reset_t;
450 
451 
467 typedef enum {
469  RIG_OP_CPY = (1<<0),
470  RIG_OP_XCHG = (1<<1),
471  RIG_OP_FROM_VFO = (1<<2),
472  RIG_OP_TO_VFO = (1<<3),
473  RIG_OP_MCL = (1<<4),
474  RIG_OP_UP = (1<<5),
475  RIG_OP_DOWN = (1<<6),
476  RIG_OP_BAND_UP = (1<<7),
477  RIG_OP_BAND_DOWN = (1<<8),
478  RIG_OP_LEFT = (1<<9),
479  RIG_OP_RIGHT = (1<<10),
480  RIG_OP_TUNE = (1<<11),
481  RIG_OP_TOGGLE = (1<<12)
482 } vfo_op_t;
483 
484 
493 typedef enum {
495  RIG_SCAN_MEM = (1<<0),
496  RIG_SCAN_SLCT = (1<<1),
497  RIG_SCAN_PRIO = (1<<2),
498  RIG_SCAN_PROG = (1<<3),
499  RIG_SCAN_DELTA = (1<<4),
500  RIG_SCAN_VFO = (1<<5),
501  RIG_SCAN_PLT = (1<<6),
502  RIG_SCAN_STOP = (1<<7)
503 } scan_t;
504 
508 typedef long token_t;
509 
510 #define RIG_CONF_END 0
511 
524 /* strongly inspired from soundmodem. Thanks Thomas! */
525 
532 };
533 
534 #define RIG_COMBO_MAX 8
535 
539 struct confparams {
540  token_t token;
541  const char *name;
542  const char *label;
543  const char *tooltip;
544  const char *dflt;
546  union {
547  struct {
548  float min;
549  float max;
550  float step;
551  } n;
552  struct {
553  const char *combostr[RIG_COMBO_MAX];
554  } c;
555  } u;
556 };
557 
562 typedef enum {
565  RIG_ANN_FREQ = (1<<0),
566  RIG_ANN_RXMODE = (1<<1),
567  RIG_ANN_CW = (1<<2),
568  RIG_ANN_ENG = (1<<3),
569  RIG_ANN_JAP = (1<<4)
570 } ann_t;
571 
572 
576 typedef int ant_t;
577 
578 #define RIG_ANT_NONE 0
579 #define RIG_ANT_N(n) ((ant_t)1<<(n))
580 #define RIG_ANT_1 RIG_ANT_N(0)
581 #define RIG_ANT_2 RIG_ANT_N(1)
582 #define RIG_ANT_3 RIG_ANT_N(2)
583 #define RIG_ANT_4 RIG_ANT_N(3)
584 #define RIG_ANT_5 RIG_ANT_N(4)
585 
589 /* TODO: kill me, and replace by real AGC delay */
591  RIG_AGC_OFF = 0,
592  RIG_AGC_SUPERFAST,
593  RIG_AGC_FAST,
594  RIG_AGC_SLOW,
596  RIG_AGC_MEDIUM,
597  RIG_AGC_AUTO
598 };
599 
604  RIG_METER_NONE = 0, /*< No display meter */
605  RIG_METER_SWR = (1<<0), /*< Stationary Wave Ratio */
606  RIG_METER_COMP = (1<<1), /*< Compression level */
607  RIG_METER_ALC = (1<<2), /*< ALC */
608  RIG_METER_IC = (1<<3), /*< IC */
609  RIG_METER_DB = (1<<4), /*< DB */
610  RIG_METER_PO = (1<<5), /*< Power Out */
611  RIG_METER_VDD = (1<<6) /*< Final Amp Voltage */
612 };
613 
618 typedef union {
619  signed int i;
620  float f;
621  char *s;
622  const char *cs;
623 } value_t;
624 
635  RIG_LEVEL_PREAMP = (1<<0),
636  RIG_LEVEL_ATT = (1<<1),
637  RIG_LEVEL_VOX = (1<<2),
638  RIG_LEVEL_AF = (1<<3),
639  RIG_LEVEL_RF = (1<<4),
640  RIG_LEVEL_SQL = (1<<5),
641  RIG_LEVEL_IF = (1<<6),
642  RIG_LEVEL_APF = (1<<7),
643  RIG_LEVEL_NR = (1<<8),
644  RIG_LEVEL_PBT_IN = (1<<9),
645  RIG_LEVEL_PBT_OUT = (1<<10),
646  RIG_LEVEL_CWPITCH = (1<<11),
647  RIG_LEVEL_RFPOWER = (1<<12),
648  RIG_LEVEL_MICGAIN = (1<<13),
649  RIG_LEVEL_KEYSPD = (1<<14),
650  RIG_LEVEL_NOTCHF = (1<<15),
651  RIG_LEVEL_COMP = (1<<16),
652  RIG_LEVEL_AGC = (1<<17),
653  RIG_LEVEL_BKINDL = (1<<18),
654  RIG_LEVEL_BALANCE = (1<<19),
655  RIG_LEVEL_METER = (1<<20),
657  RIG_LEVEL_VOXGAIN = (1<<21),
659  RIG_LEVEL_ANTIVOX = (1<<22),
665  RIG_LEVEL_RAWSTR = (1<<26),
666  RIG_LEVEL_SQLSTAT = (1<<27),
667  RIG_LEVEL_SWR = (1<<28),
668  RIG_LEVEL_ALC = (1<<29),
670  /*RIG_LEVEL_BWC = (1<<31)*/
671 };
672 
673 #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)
674 
675 #define RIG_LEVEL_READONLY_LIST (RIG_LEVEL_SQLSTAT|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_STRENGTH|RIG_LEVEL_RAWSTR)
676 
677 #define RIG_LEVEL_IS_FLOAT(l) ((l)&RIG_LEVEL_FLOAT_LIST)
678 #define RIG_LEVEL_SET(l) ((l)&~RIG_LEVEL_READONLY_LIST)
679 
680 
691  RIG_PARM_ANN = (1<<0),
692  RIG_PARM_APO = (1<<1),
694  RIG_PARM_BEEP = (1<<4),
695  RIG_PARM_TIME = (1<<5),
696  RIG_PARM_BAT = (1<<6),
698 };
699 
700 #define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT)
701 #define RIG_PARM_READONLY_LIST (RIG_PARM_BAT)
702 
703 #define RIG_PARM_IS_FLOAT(l) ((l)&RIG_PARM_FLOAT_LIST)
704 #define RIG_PARM_SET(l) ((l)&~RIG_PARM_READONLY_LIST)
705 
706 #define RIG_SETTING_MAX 32
707 
713 typedef unsigned long setting_t;
714 
715 /*
716  * tranceive mode, ie. the rig notify the host of any event,
717  * like freq changed, mode changed, etc.
718  */
719 #define RIG_TRN_OFF 0
720 #define RIG_TRN_RIG 1
721 #define RIG_TRN_POLL 2
722 
723 
732 /*
733  * The C standard dictates that an enum constant is a 32 bit signed integer.
734  * Setting a constant's bit 31 created a negative value that on amd64 had the
735  * upper 32 bits set as well when assigned to the misc.c:func_str structure.
736  * This caused misc.c:rig_strfunc() to fail its comparison for RIG_FUNC_XIT
737  * on amd64 (x86_64). To use bit 31 as an unsigned long, preprocessor macros
738  * have been used instead as a 'const unsigned long' which cannot be used to
739  * initialize the func_str.func members. TNX KA6MAL, AC6SL. - N0NB
740  */
741 #define RIG_FUNC_NONE 0
742 #define RIG_FUNC_FAGC (1UL<<0)
743 #define RIG_FUNC_NB (1UL<<1)
744 #define RIG_FUNC_COMP (1UL<<2)
745 #define RIG_FUNC_VOX (1UL<<3)
746 #define RIG_FUNC_TONE (1UL<<4)
747 #define RIG_FUNC_TSQL (1UL<<5)
748 #define RIG_FUNC_SBKIN (1UL<<6)
749 #define RIG_FUNC_FBKIN (1UL<<7)
750 #define RIG_FUNC_ANF (1UL<<8)
751 #define RIG_FUNC_NR (1UL<<9)
752 #define RIG_FUNC_AIP (1UL<<10)
753 #define RIG_FUNC_APF (1UL<<11)
754 #define RIG_FUNC_MON (1UL<<12)
755 #define RIG_FUNC_MN (1UL<<13)
756 #define RIG_FUNC_RF (1UL<<14)
757 #define RIG_FUNC_ARO (1UL<<15)
758 #define RIG_FUNC_LOCK (1UL<<16)
759 #define RIG_FUNC_MUTE (1UL<<17)
760 #define RIG_FUNC_VSC (1UL<<18)
761 #define RIG_FUNC_REV (1UL<<19)
762 #define RIG_FUNC_SQL (1UL<<20)
763 #define RIG_FUNC_ABM (1UL<<21)
764 #define RIG_FUNC_BC (1UL<<22)
765 #define RIG_FUNC_MBC (1UL<<23)
766 #define RIG_FUNC_RIT (1UL<<24)
767 #define RIG_FUNC_AFC (1UL<<25)
768 #define RIG_FUNC_SATMODE (1UL<<26)
769 #define RIG_FUNC_SCOPE (1UL<<27)
770 #define RIG_FUNC_RESUME (1UL<<28)
771 #define RIG_FUNC_TBURST (1UL<<29)
772 #define RIG_FUNC_TUNER (1UL<<30)
773 #define RIG_FUNC_XIT (1UL<<31)
776 /*
777  * power unit macros, converts to mW
778  * This is limited to 2MW on 32 bits systems.
779  */
780 #define mW(p) ((int)(p))
781 #define Watts(p) ((int)((p)*1000))
782 #define W(p) Watts(p)
783 #define kW(p) ((int)((p)*1000000L))
784 
793 typedef enum {
795  RIG_MODE_AM = (1<<0),
796  RIG_MODE_CW = (1<<1),
797  RIG_MODE_USB = (1<<2),
798  RIG_MODE_LSB = (1<<3),
799  RIG_MODE_RTTY = (1<<4),
800  RIG_MODE_FM = (1<<5),
801  RIG_MODE_WFM = (1<<6),
802  RIG_MODE_CWR = (1<<7),
803  RIG_MODE_RTTYR = (1<<8),
804  RIG_MODE_AMS = (1<<9),
805  RIG_MODE_PKTLSB = (1<<10),
806  RIG_MODE_PKTUSB = (1<<11),
807  RIG_MODE_PKTFM = (1<<12),
808  RIG_MODE_ECSSUSB = (1<<13),
809  RIG_MODE_ECSSLSB = (1<<14),
810  RIG_MODE_FAX = (1<<15),
811  RIG_MODE_SAM = (1<<16),
812  RIG_MODE_SAL = (1<<17),
813  RIG_MODE_SAH = (1<<18),
814  RIG_MODE_DSB = (1<<19),
815  RIG_MODE_FMN = (1<<21),
817 } rmode_t;
818 
819 
821 #define RIG_MODE_SSB (RIG_MODE_USB|RIG_MODE_LSB)
822 
824 #define RIG_MODE_ECSS (RIG_MODE_ECSSUSB|RIG_MODE_ECSSLSB)
825 
826 
827 #define RIG_DBLST_END 0 /* end marker in a preamp/att level list */
828 #define RIG_IS_DBLST_END(d) ((d)==0)
829 
836 typedef struct freq_range_list {
837  freq_t start;
838  freq_t end;
840  int low_power;
842  vfo_t vfo;
843  ant_t ant;
844 } freq_range_t;
845 
846 #define RIG_FRNG_END {Hz(0),Hz(0),RIG_MODE_NONE,0,0,RIG_VFO_NONE}
847 #define RIG_IS_FRNG_END(r) ((r).start == Hz(0) && (r).end == Hz(0))
848 
849 #define RIG_ITU_REGION1 1
850 #define RIG_ITU_REGION2 2
851 #define RIG_ITU_REGION3 3
852 
874  shortfreq_t ts;
875 };
876 
877 #define RIG_TS_ANY 0
878 #define RIG_TS_END {RIG_MODE_NONE,0}
879 #define RIG_IS_TS_END(t) ((t).modes == RIG_MODE_NONE && (t).ts == 0)
880 
907 struct filter_list {
909  pbwidth_t width;
910 };
911 
912 #define RIG_FLT_ANY 0
913 #define RIG_FLT_END {RIG_MODE_NONE,0}
914 #define RIG_IS_FLT_END(f) ((f).modes == RIG_MODE_NONE)
915 
916 
918 #define RIG_CHFLAG_NONE 0
919 
920 #define RIG_CHFLAG_SKIP (1<<0)
921 
922 #define RIG_CHFLAG_DATA (1<<1)
923 
928 struct ext_list {
929  token_t token;
931 };
932 
933 #define RIG_EXT_END {0, {.i=0}}
934 #define RIG_IS_EXT_END(x) ((x).token == 0)
935 
943 struct channel {
945  int bank_num;
946  vfo_t vfo;
947  int ant;
948  freq_t freq;
950  pbwidth_t width;
952  freq_t tx_freq;
954  pbwidth_t tx_width;
957  vfo_t tx_vfo;
960  shortfreq_t rptr_offs;
961  shortfreq_t tuning_step;
962  shortfreq_t rit;
963  shortfreq_t xit;
964  setting_t funcs;
965  value_t levels[RIG_SETTING_MAX];
971  int flags;
972  char channel_desc[MAXCHANDESC];
974 };
976 typedef struct channel channel_t;
977 
983 struct channel_cap {
984  unsigned bank_num:1;
985  unsigned vfo:1;
986  unsigned ant:1;
987  unsigned freq:1;
988  unsigned mode:1;
989  unsigned width:1;
991  unsigned tx_freq:1;
992  unsigned tx_mode:1;
993  unsigned tx_width:1;
995  unsigned split:1;
996  unsigned tx_vfo:1;
997  unsigned rptr_shift:1;
998  unsigned rptr_offs:1;
999  unsigned tuning_step:1;
1000  unsigned rit:1;
1001  unsigned xit:1;
1002  setting_t funcs;
1003  setting_t levels;
1004  unsigned ctcss_tone:1;
1005  unsigned ctcss_sql:1;
1006  unsigned dcs_code:1;
1007  unsigned dcs_sql:1;
1008  unsigned scan_group:1;
1009  unsigned flags:1;
1010  unsigned channel_desc:1;
1011  unsigned ext_levels:1;
1012 };
1013 
1016 
1017 
1028 typedef enum {
1037 } chan_type_t;
1038 
1052 struct chan_list {
1053  int start;
1054  int end;
1057 };
1058 
1059 #define RIG_CHAN_END {0,0,RIG_MTYPE_NONE}
1060 #define RIG_IS_CHAN_END(c) ((c).type == RIG_MTYPE_NONE)
1061 
1062 #define RIG_MEM_CAPS_ALL -1
1063 
1065 typedef struct chan_list chan_t;
1066 
1078 struct gran {
1082 };
1083 
1085 typedef struct gran gran_t;
1086 
1087 
1089 struct cal_table {
1090  int size;
1091  struct {
1092  int raw;
1093  int val;
1094  } table[MAX_CAL_LENGTH];
1095 };
1096 
1109 typedef struct cal_table cal_table_t;
1110 
1111 #define EMPTY_STR_CAL { 0, { { 0, 0 }, } }
1112 
1113 
1114 typedef int (*chan_cb_t) (RIG *, channel_t**, int, const chan_t*, rig_ptr_t);
1115 typedef int (*confval_cb_t) (RIG *, const struct confparams *, value_t *, rig_ptr_t);
1116 
1135 struct rig_caps {
1137  const char *model_name;
1138  const char *mfg_name;
1139  const char *version;
1140  const char *copyright;
1143  int rig_type;
1157  int timeout;
1158  int retry;
1160  setting_t has_get_func;
1161  setting_t has_set_func;
1162  setting_t has_get_level;
1163  setting_t has_set_level;
1164  setting_t has_get_parm;
1165  setting_t has_set_parm;
1167  gran_t level_gran[RIG_SETTING_MAX];
1168  gran_t parm_gran[RIG_SETTING_MAX];
1170  const struct confparams *extparms;
1171  const struct confparams *extlevels;
1174  const tone_t *dcs_list;
1176  int preamp[MAXDBLSTSIZ];
1177  int attenuator[MAXDBLSTSIZ];
1178  shortfreq_t max_rit;
1179  shortfreq_t max_xit;
1180  shortfreq_t max_ifshift;
1189  int bank_qty;
1192  chan_t chan_list[CHANLSTSIZ];
1199  struct tuning_step_list tuning_steps[TSLSTSIZ];
1200  struct filter_list filters[FLTLSTSIZ];
1204  const struct confparams *cfgparams;
1205  const rig_ptr_t priv;
1207  /*
1208  * Rig API
1209  *
1210  */
1211 
1212  int (*rig_init) (RIG * rig);
1213  int (*rig_cleanup) (RIG * rig);
1214  int (*rig_open) (RIG * rig);
1215  int (*rig_close) (RIG * rig);
1216 
1217  /*
1218  * General API commands, from most primitive to least.. :()
1219  * List Set/Get functions pairs
1220  */
1221 
1222  int (*set_freq) (RIG * rig, vfo_t vfo, freq_t freq);
1223  int (*get_freq) (RIG * rig, vfo_t vfo, freq_t * freq);
1224 
1225  int (*set_mode) (RIG * rig, vfo_t vfo, rmode_t mode,
1226  pbwidth_t width);
1227  int (*get_mode) (RIG * rig, vfo_t vfo, rmode_t * mode,
1228  pbwidth_t * width);
1229 
1230  int (*set_vfo) (RIG * rig, vfo_t vfo);
1231  int (*get_vfo) (RIG * rig, vfo_t * vfo);
1232 
1233  int (*set_ptt) (RIG * rig, vfo_t vfo, ptt_t ptt);
1234  int (*get_ptt) (RIG * rig, vfo_t vfo, ptt_t * ptt);
1235  int (*get_dcd) (RIG * rig, vfo_t vfo, dcd_t * dcd);
1236 
1237  int (*set_rptr_shift) (RIG * rig, vfo_t vfo,
1238  rptr_shift_t rptr_shift);
1239  int (*get_rptr_shift) (RIG * rig, vfo_t vfo,
1240  rptr_shift_t * rptr_shift);
1241 
1242  int (*set_rptr_offs) (RIG * rig, vfo_t vfo, shortfreq_t offs);
1243  int (*get_rptr_offs) (RIG * rig, vfo_t vfo, shortfreq_t * offs);
1244 
1245  int (*set_split_freq) (RIG * rig, vfo_t vfo, freq_t tx_freq);
1246  int (*get_split_freq) (RIG * rig, vfo_t vfo, freq_t * tx_freq);
1247  int (*set_split_mode) (RIG * rig, vfo_t vfo, rmode_t tx_mode,
1248  pbwidth_t tx_width);
1249  int (*get_split_mode) (RIG * rig, vfo_t vfo, rmode_t * tx_mode,
1250  pbwidth_t * tx_width);
1251  int (*set_split_freq_mode) (RIG * rig, vfo_t vfo, freq_t tx_freq,
1252  rmode_t tx_mode, pbwidth_t tx_width);
1253  int (*get_split_freq_mode) (RIG * rig, vfo_t vfo, freq_t * tx_freq,
1254  rmode_t * tx_mode, pbwidth_t * tx_width);
1255 
1256  int (*set_split_vfo) (RIG * rig, vfo_t vfo, split_t split, vfo_t tx_vfo);
1257  int (*get_split_vfo) (RIG * rig, vfo_t vfo, split_t * split, vfo_t *tx_vfo);
1258 
1259  int (*set_rit) (RIG * rig, vfo_t vfo, shortfreq_t rit);
1260  int (*get_rit) (RIG * rig, vfo_t vfo, shortfreq_t * rit);
1261  int (*set_xit) (RIG * rig, vfo_t vfo, shortfreq_t xit);
1262  int (*get_xit) (RIG * rig, vfo_t vfo, shortfreq_t * xit);
1263 
1264  int (*set_ts) (RIG * rig, vfo_t vfo, shortfreq_t ts);
1265  int (*get_ts) (RIG * rig, vfo_t vfo, shortfreq_t * ts);
1266 
1267  int (*set_dcs_code) (RIG * rig, vfo_t vfo, tone_t code);
1268  int (*get_dcs_code) (RIG * rig, vfo_t vfo, tone_t * code);
1269  int (*set_tone) (RIG * rig, vfo_t vfo, tone_t tone);
1270  int (*get_tone) (RIG * rig, vfo_t vfo, tone_t * tone);
1271  int (*set_ctcss_tone) (RIG * rig, vfo_t vfo, tone_t tone);
1272  int (*get_ctcss_tone) (RIG * rig, vfo_t vfo, tone_t * tone);
1273 
1274  int (*set_dcs_sql) (RIG * rig, vfo_t vfo, tone_t code);
1275  int (*get_dcs_sql) (RIG * rig, vfo_t vfo, tone_t * code);
1276  int (*set_tone_sql) (RIG * rig, vfo_t vfo, tone_t tone);
1277  int (*get_tone_sql) (RIG * rig, vfo_t vfo, tone_t * tone);
1278  int (*set_ctcss_sql) (RIG * rig, vfo_t vfo, tone_t tone);
1279  int (*get_ctcss_sql) (RIG * rig, vfo_t vfo, tone_t * tone);
1280 
1281  int (*power2mW) (RIG * rig, unsigned int *mwpower, float power,
1282  freq_t freq, rmode_t mode);
1283  int (*mW2power) (RIG * rig, float *power, unsigned int mwpower,
1284  freq_t freq, rmode_t mode);
1285 
1286  int (*set_powerstat) (RIG * rig, powerstat_t status);
1287  int (*get_powerstat) (RIG * rig, powerstat_t * status);
1288  int (*reset) (RIG * rig, reset_t reset);
1289 
1290  int (*set_ant) (RIG * rig, vfo_t vfo, ant_t ant);
1291  int (*get_ant) (RIG * rig, vfo_t vfo, ant_t * ant);
1292 
1293  int (*set_level) (RIG * rig, vfo_t vfo, setting_t level,
1294  value_t val);
1295  int (*get_level) (RIG * rig, vfo_t vfo, setting_t level,
1296  value_t * val);
1297 
1298  int (*set_func) (RIG * rig, vfo_t vfo, setting_t func, int status);
1299  int (*get_func) (RIG * rig, vfo_t vfo, setting_t func,
1300  int *status);
1301 
1302  int (*set_parm) (RIG * rig, setting_t parm, value_t val);
1303  int (*get_parm) (RIG * rig, setting_t parm, value_t * val);
1304 
1305  int (*set_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t val);
1306  int (*get_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t *val);
1307 
1308  int (*set_ext_parm)(RIG *rig, token_t token, value_t val);
1309  int (*get_ext_parm)(RIG *rig, token_t token, value_t *val);
1310 
1311  int (*set_conf) (RIG * rig, token_t token, const char *val);
1312  int (*get_conf) (RIG * rig, token_t token, char *val);
1313 
1314  int (*send_dtmf) (RIG * rig, vfo_t vfo, const char *digits);
1315  int (*recv_dtmf) (RIG * rig, vfo_t vfo, char *digits, int *length);
1316  int (*send_morse) (RIG * rig, vfo_t vfo, const char *msg);
1317 
1318  int (*set_bank) (RIG * rig, vfo_t vfo, int bank);
1319  int (*set_mem) (RIG * rig, vfo_t vfo, int ch);
1320  int (*get_mem) (RIG * rig, vfo_t vfo, int *ch);
1321  int (*vfo_op) (RIG * rig, vfo_t vfo, vfo_op_t op);
1322  int (*scan) (RIG * rig, vfo_t vfo, scan_t scan, int ch);
1323 
1324  int (*set_trn) (RIG * rig, int trn);
1325  int (*get_trn) (RIG * rig, int *trn);
1326 
1327  int (*decode_event) (RIG * rig);
1328 
1329  int (*set_channel) (RIG * rig, const channel_t * chan);
1330  int (*get_channel) (RIG * rig, channel_t * chan);
1331 
1332  const char *(*get_info) (RIG * rig);
1333 
1334  int (*set_chan_all_cb) (RIG * rig, chan_cb_t chan_cb, rig_ptr_t);
1335  int (*get_chan_all_cb) (RIG * rig, chan_cb_t chan_cb, rig_ptr_t);
1336 
1337  int (*set_mem_all_cb) (RIG * rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t);
1338  int (*get_mem_all_cb) (RIG * rig, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t);
1339 
1340  const char *clone_combo_set;
1341  const char *clone_combo_get;
1342 };
1343 
1349 typedef struct hamlib_port {
1350  union {
1354  } type;
1355  int fd;
1356  void* handle;
1360  struct { int tv_sec,tv_usec; } post_write_date;
1361  int timeout;
1362  int retry;
1364  char pathname[FILPATHLEN];
1365  union {
1366  struct {
1367  int rate;
1374  } serial;
1375  struct {
1376  int pin;
1377  } parallel;
1378  struct {
1379  int ptt_bitnum; /*< Bit number for CM108 GPIO PTT */
1380  } cm108;
1381  struct {
1382  int vid;
1383  int pid;
1384  int conf;
1385  int iface;
1386  int alt;
1387  char *vendor_name;
1388  char *product;
1389  } usb;
1390  struct {
1391  int on_value;
1392  int value;
1393  } gpio;
1394  } parm;
1395 } hamlib_port_t;
1396 
1397 #if !defined(__APPLE__) || !defined(__cplusplus)
1398 typedef hamlib_port_t port_t;
1399 #endif
1400 
1401 
1411 struct rig_state {
1412  /*
1413  * overridable fields
1414  */
1419  double vfo_comp;
1425  struct tuning_step_list tuning_steps[TSLSTSIZ];
1427  struct filter_list filters[FLTLSTSIZ];
1431  chan_t chan_list[CHANLSTSIZ];
1433  shortfreq_t max_rit;
1434  shortfreq_t max_xit;
1435  shortfreq_t max_ifshift;
1439  int preamp[MAXDBLSTSIZ];
1440  int attenuator[MAXDBLSTSIZ];
1442  setting_t has_get_func;
1443  setting_t has_set_func;
1444  setting_t has_get_level;
1445  setting_t has_set_level;
1446  setting_t has_get_parm;
1447  setting_t has_set_parm;
1449  gran_t level_gran[RIG_SETTING_MAX];
1450  gran_t parm_gran[RIG_SETTING_MAX];
1453  /*
1454  * non overridable fields, internal use
1455  */
1456 
1458  vfo_t current_vfo;
1459  int vfo_list;
1461  rig_ptr_t priv;
1462  rig_ptr_t obj;
1466  freq_t current_freq;
1468  pbwidth_t current_width;
1469  vfo_t tx_vfo;
1472 };
1473 
1474 
1475 typedef int (*vprintf_cb_t) (enum rig_debug_level_e, rig_ptr_t, const char *, va_list);
1476 
1477 typedef int (*freq_cb_t) (RIG *, vfo_t, freq_t, rig_ptr_t);
1478 typedef int (*mode_cb_t) (RIG *, vfo_t, rmode_t, pbwidth_t, rig_ptr_t);
1479 typedef int (*vfo_cb_t) (RIG *, vfo_t, rig_ptr_t);
1480 typedef int (*ptt_cb_t) (RIG *, vfo_t, ptt_t, rig_ptr_t);
1481 typedef int (*dcd_cb_t) (RIG *, vfo_t, dcd_t, rig_ptr_t);
1482 typedef int (*pltune_cb_t) (RIG *, vfo_t, freq_t *, rmode_t *, pbwidth_t *, rig_ptr_t);
1483 
1502  freq_cb_t freq_event;
1503  rig_ptr_t freq_arg;
1504  mode_cb_t mode_event;
1505  rig_ptr_t mode_arg;
1506  vfo_cb_t vfo_event;
1507  rig_ptr_t vfo_arg;
1508  ptt_cb_t ptt_event;
1509  rig_ptr_t ptt_arg;
1510  dcd_cb_t dcd_event;
1511  rig_ptr_t dcd_arg;
1512  pltune_cb_t pltune;
1513  rig_ptr_t pltune_arg;
1514  /* etc.. */
1515 };
1516 
1526 struct rig {
1527  struct rig_caps *caps;
1528  struct rig_state state;
1530 };
1531 
1532 
1533 
1534 /* --------------- API function prototypes -----------------*/
1535 
1536 extern HAMLIB_EXPORT(RIG *) rig_init HAMLIB_PARAMS((rig_model_t rig_model));
1537 extern HAMLIB_EXPORT(int) rig_open HAMLIB_PARAMS((RIG *rig));
1538 
1539  /*
1540  * General API commands, from most primitive to least.. :()
1541  * List Set/Get functions pairs
1542  */
1543 
1544 extern HAMLIB_EXPORT(int) rig_set_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t freq));
1545 extern HAMLIB_EXPORT(int) rig_get_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t *freq));
1546 
1547 extern HAMLIB_EXPORT(int) rig_set_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width));
1548 extern HAMLIB_EXPORT(int) rig_get_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width));
1549 
1550 extern HAMLIB_EXPORT(int) rig_set_vfo HAMLIB_PARAMS((RIG *rig, vfo_t vfo));
1551 extern HAMLIB_EXPORT(int) rig_get_vfo HAMLIB_PARAMS((RIG *rig, vfo_t *vfo));
1552 
1553 extern HAMLIB_EXPORT(int) rig_set_ptt HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ptt_t ptt));
1554 extern HAMLIB_EXPORT(int) rig_get_ptt HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ptt_t *ptt));
1555 
1556 extern HAMLIB_EXPORT(int) rig_get_dcd HAMLIB_PARAMS((RIG *rig, vfo_t vfo, dcd_t *dcd));
1557 
1558 extern HAMLIB_EXPORT(int) rig_set_rptr_shift HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift));
1559 extern HAMLIB_EXPORT(int) rig_get_rptr_shift HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift));
1560 extern HAMLIB_EXPORT(int) rig_set_rptr_offs HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t rptr_offs));
1561 extern HAMLIB_EXPORT(int) rig_get_rptr_offs HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs));
1562 
1563 extern HAMLIB_EXPORT(int) rig_set_ctcss_tone HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t tone));
1564 extern HAMLIB_EXPORT(int) rig_get_ctcss_tone HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *tone));
1565 extern HAMLIB_EXPORT(int) rig_set_dcs_code HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t code));
1566 extern HAMLIB_EXPORT(int) rig_get_dcs_code HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *code));
1567 
1568 extern HAMLIB_EXPORT(int) rig_set_ctcss_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t tone));
1569 extern HAMLIB_EXPORT(int) rig_get_ctcss_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *tone));
1570 extern HAMLIB_EXPORT(int) rig_set_dcs_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t code));
1571 extern HAMLIB_EXPORT(int) rig_get_dcs_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *code));
1572 
1573 extern HAMLIB_EXPORT(int) rig_set_split_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t tx_freq));
1574 extern HAMLIB_EXPORT(int) rig_get_split_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t *tx_freq));
1575 extern HAMLIB_EXPORT(int) rig_set_split_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width));
1576 extern HAMLIB_EXPORT(int) rig_get_split_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width));
1577 extern HAMLIB_EXPORT(int) rig_set_split_freq_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t tx_freq, rmode_t tx_mode, pbwidth_t tx_width));
1578 extern HAMLIB_EXPORT(int) rig_get_split_freq_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t * tx_freq, rmode_t *tx_mode, pbwidth_t *tx_width));
1579 extern HAMLIB_EXPORT(int) rig_set_split_vfo HAMLIB_PARAMS((RIG*, vfo_t rx_vfo, split_t split, vfo_t tx_vfo));
1580 extern HAMLIB_EXPORT(int) rig_get_split_vfo HAMLIB_PARAMS((RIG*, vfo_t rx_vfo, split_t *split, vfo_t *tx_vfo));
1581 #define rig_set_split(r,v,s) rig_set_split_vfo((r),(v),(s),RIG_VFO_CURR)
1582 #define rig_get_split(r,v,s) ({ vfo_t _tx_vfo; rig_get_split_vfo((r),(v),(s),&_tx_vfo); })
1583 
1584 extern HAMLIB_EXPORT(int) rig_set_rit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t rit));
1585 extern HAMLIB_EXPORT(int) rig_get_rit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *rit));
1586 extern HAMLIB_EXPORT(int) rig_set_xit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t xit));
1587 extern HAMLIB_EXPORT(int) rig_get_xit HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *xit));
1588 
1589 extern HAMLIB_EXPORT(int) rig_set_ts HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t ts));
1590 extern HAMLIB_EXPORT(int) rig_get_ts HAMLIB_PARAMS((RIG *rig, vfo_t vfo, shortfreq_t *ts));
1591 
1592 extern HAMLIB_EXPORT(int) rig_power2mW HAMLIB_PARAMS((RIG *rig, unsigned int *mwpower, float power, freq_t freq, rmode_t mode));
1593 extern HAMLIB_EXPORT(int) rig_mW2power HAMLIB_PARAMS((RIG *rig, float *power, unsigned int mwpower, freq_t freq, rmode_t mode));
1594 
1595 extern HAMLIB_EXPORT(shortfreq_t) rig_get_resolution HAMLIB_PARAMS((RIG *rig, rmode_t mode));
1596 
1597 extern HAMLIB_EXPORT(int) rig_set_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t level, value_t val));
1598 extern HAMLIB_EXPORT(int) rig_get_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t level, value_t *val));
1599 
1600 #define rig_get_strength(r,v,s) rig_get_level((r),(v),RIG_LEVEL_STRENGTH, (value_t*)(s))
1601 
1602 extern HAMLIB_EXPORT(int) rig_set_parm HAMLIB_PARAMS((RIG *rig, setting_t parm, value_t val));
1603 extern HAMLIB_EXPORT(int) rig_get_parm HAMLIB_PARAMS((RIG *rig, setting_t parm, value_t *val));
1604 
1605 extern HAMLIB_EXPORT(int) rig_set_conf HAMLIB_PARAMS((RIG *rig, token_t token, const char *val));
1606 extern HAMLIB_EXPORT(int) rig_get_conf HAMLIB_PARAMS((RIG *rig, token_t token, char *val));
1607 
1608 extern HAMLIB_EXPORT(int) rig_set_powerstat HAMLIB_PARAMS((RIG *rig, powerstat_t status));
1609 extern HAMLIB_EXPORT(int) rig_get_powerstat HAMLIB_PARAMS((RIG *rig, powerstat_t *status));
1610 
1611 extern HAMLIB_EXPORT(int) rig_reset HAMLIB_PARAMS((RIG *rig, reset_t reset)); /* dangerous! */
1612 
1613 extern HAMLIB_EXPORT(int) rig_set_ext_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
1614  token_t token, value_t val));
1615 extern HAMLIB_EXPORT(int) rig_get_ext_level HAMLIB_PARAMS((RIG *rig, vfo_t vfo,
1616  token_t token, value_t *val));
1617 
1618 extern HAMLIB_EXPORT(int) rig_set_ext_parm HAMLIB_PARAMS((RIG *rig, token_t token, value_t val));
1619 extern HAMLIB_EXPORT(int) rig_get_ext_parm HAMLIB_PARAMS((RIG *rig, token_t token, value_t *val));
1620 
1621 extern HAMLIB_EXPORT(int) rig_ext_level_foreach HAMLIB_PARAMS((RIG *rig, int (*cfunc)(RIG*, const struct confparams *, rig_ptr_t), rig_ptr_t data));
1622 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));
1623 extern HAMLIB_EXPORT(const struct confparams*) rig_ext_lookup HAMLIB_PARAMS((RIG *rig, const char *name));
1624 extern HAMLIB_EXPORT(const struct confparams *) rig_ext_lookup_tok HAMLIB_PARAMS((RIG *rig, token_t token));
1625 extern HAMLIB_EXPORT(token_t) rig_ext_token_lookup HAMLIB_PARAMS((RIG *rig, const char *name));
1626 
1627 
1628 extern HAMLIB_EXPORT(int) rig_token_foreach HAMLIB_PARAMS((RIG *rig, int (*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data));
1629 extern HAMLIB_EXPORT(const struct confparams*) rig_confparam_lookup HAMLIB_PARAMS((RIG *rig, const char *name));
1630 extern HAMLIB_EXPORT(token_t) rig_token_lookup HAMLIB_PARAMS((RIG *rig, const char *name));
1631 
1632 extern HAMLIB_EXPORT(int) rig_close HAMLIB_PARAMS((RIG *rig));
1633 extern HAMLIB_EXPORT(int) rig_cleanup HAMLIB_PARAMS((RIG *rig));
1634 
1635 extern HAMLIB_EXPORT(int) rig_set_ant HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ant_t ant)); /* antenna */
1636 extern HAMLIB_EXPORT(int) rig_get_ant HAMLIB_PARAMS((RIG *rig, vfo_t vfo, ant_t *ant));
1637 
1638 extern HAMLIB_EXPORT(setting_t) rig_has_get_level HAMLIB_PARAMS((RIG *rig, setting_t level));
1639 extern HAMLIB_EXPORT(setting_t) rig_has_set_level HAMLIB_PARAMS((RIG *rig, setting_t level));
1640 
1641 extern HAMLIB_EXPORT(setting_t) rig_has_get_parm HAMLIB_PARAMS((RIG *rig, setting_t parm));
1642 extern HAMLIB_EXPORT(setting_t) rig_has_set_parm HAMLIB_PARAMS((RIG *rig, setting_t parm));
1643 
1644 extern HAMLIB_EXPORT(setting_t) rig_has_get_func HAMLIB_PARAMS((RIG *rig, setting_t func));
1645 extern HAMLIB_EXPORT(setting_t) rig_has_set_func HAMLIB_PARAMS((RIG *rig, setting_t func));
1646 
1647 extern HAMLIB_EXPORT(int) rig_set_func HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t func, int status));
1648 extern HAMLIB_EXPORT(int) rig_get_func HAMLIB_PARAMS((RIG *rig, vfo_t vfo, setting_t func, int *status));
1649 
1650 extern HAMLIB_EXPORT(int) rig_send_dtmf HAMLIB_PARAMS((RIG *rig, vfo_t vfo, const char *digits));
1651 extern HAMLIB_EXPORT(int) rig_recv_dtmf HAMLIB_PARAMS((RIG *rig, vfo_t vfo, char *digits, int *length));
1652 extern HAMLIB_EXPORT(int) rig_send_morse HAMLIB_PARAMS((RIG *rig, vfo_t vfo, const char *msg));
1653 
1654 extern HAMLIB_EXPORT(int) rig_set_bank HAMLIB_PARAMS((RIG *rig, vfo_t vfo, int bank));
1655 extern HAMLIB_EXPORT(int) rig_set_mem HAMLIB_PARAMS((RIG *rig, vfo_t vfo, int ch));
1656 extern HAMLIB_EXPORT(int) rig_get_mem HAMLIB_PARAMS((RIG *rig, vfo_t vfo, int *ch));
1657 extern HAMLIB_EXPORT(int) rig_vfo_op HAMLIB_PARAMS((RIG *rig, vfo_t vfo, vfo_op_t op));
1658 extern HAMLIB_EXPORT(vfo_op_t) rig_has_vfo_op HAMLIB_PARAMS((RIG *rig, vfo_op_t op));
1659 extern HAMLIB_EXPORT(int) rig_scan HAMLIB_PARAMS((RIG *rig, vfo_t vfo, scan_t scan, int ch));
1660 extern HAMLIB_EXPORT(scan_t) rig_has_scan HAMLIB_PARAMS((RIG *rig, scan_t scan));
1661 
1662 extern HAMLIB_EXPORT(int) rig_set_channel HAMLIB_PARAMS((RIG *rig, const channel_t *chan)); /* mem */
1663 extern HAMLIB_EXPORT(int) rig_get_channel HAMLIB_PARAMS((RIG *rig, channel_t *chan));
1664 
1665 extern HAMLIB_EXPORT(int) rig_set_chan_all HAMLIB_PARAMS((RIG *rig, const channel_t chans[]));
1666 extern HAMLIB_EXPORT(int) rig_get_chan_all HAMLIB_PARAMS((RIG *rig, channel_t chans[]));
1667 extern HAMLIB_EXPORT(int) rig_set_chan_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, rig_ptr_t));
1668 extern HAMLIB_EXPORT(int) rig_get_chan_all_cb HAMLIB_PARAMS((RIG *rig, chan_cb_t chan_cb, rig_ptr_t));
1669 
1670 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));
1671 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));
1672 extern HAMLIB_EXPORT(int) rig_set_mem_all HAMLIB_PARAMS((RIG *rig, const channel_t *chan, const struct confparams *, const value_t *));
1673 extern HAMLIB_EXPORT(int) rig_get_mem_all HAMLIB_PARAMS((RIG *rig, channel_t *chan, const struct confparams *, value_t *));
1674 extern HAMLIB_EXPORT(const chan_t *) rig_lookup_mem_caps HAMLIB_PARAMS((RIG *rig, int ch));
1675 extern HAMLIB_EXPORT(int) rig_mem_count HAMLIB_PARAMS((RIG *rig));
1676 
1677 
1678 extern HAMLIB_EXPORT(int) rig_set_trn HAMLIB_PARAMS((RIG *rig, int trn));
1679 extern HAMLIB_EXPORT(int) rig_get_trn HAMLIB_PARAMS((RIG *rig, int *trn));
1680 extern HAMLIB_EXPORT(int) rig_set_freq_callback HAMLIB_PARAMS((RIG *, freq_cb_t, rig_ptr_t));
1681 extern HAMLIB_EXPORT(int) rig_set_mode_callback HAMLIB_PARAMS((RIG *, mode_cb_t, rig_ptr_t));
1682 extern HAMLIB_EXPORT(int) rig_set_vfo_callback HAMLIB_PARAMS((RIG *, vfo_cb_t, rig_ptr_t));
1683 extern HAMLIB_EXPORT(int) rig_set_ptt_callback HAMLIB_PARAMS((RIG *, ptt_cb_t, rig_ptr_t));
1684 extern HAMLIB_EXPORT(int) rig_set_dcd_callback HAMLIB_PARAMS((RIG *, dcd_cb_t, rig_ptr_t));
1685 extern HAMLIB_EXPORT(int) rig_set_pltune_callback HAMLIB_PARAMS((RIG *, pltune_cb_t, rig_ptr_t));
1686 
1687 extern HAMLIB_EXPORT(const char *) rig_get_info HAMLIB_PARAMS((RIG *rig));
1688 
1689 extern HAMLIB_EXPORT(const struct rig_caps *) rig_get_caps HAMLIB_PARAMS((rig_model_t rig_model));
1690 extern HAMLIB_EXPORT(const freq_range_t *) rig_get_range HAMLIB_PARAMS((const freq_range_t range_list[], freq_t freq, rmode_t mode));
1691 
1692 extern HAMLIB_EXPORT(pbwidth_t) rig_passband_normal HAMLIB_PARAMS((RIG *rig, rmode_t mode));
1693 extern HAMLIB_EXPORT(pbwidth_t) rig_passband_narrow HAMLIB_PARAMS((RIG *rig, rmode_t mode));
1694 extern HAMLIB_EXPORT(pbwidth_t) rig_passband_wide HAMLIB_PARAMS((RIG *rig, rmode_t mode));
1695 
1696 extern HAMLIB_EXPORT(const char *) rigerror HAMLIB_PARAMS((int errnum));
1697 
1698 extern HAMLIB_EXPORT(int) rig_setting2idx HAMLIB_PARAMS((setting_t s));
1699 #define rig_idx2setting(i) (1UL<<(i))
1700 
1701 /*
1702  * Even if these functions are prefixed with "rig_", they are not rig specific
1703  * Maybe "hamlib_" would have been better. Let me know. --SF
1704  */
1705 extern HAMLIB_EXPORT(void) rig_set_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
1706 #define rig_set_debug_level(level) rig_set_debug(level)
1707 extern HAMLIB_EXPORT(int) rig_need_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
1708 extern HAMLIB_EXPORT(void) rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level, const char *fmt, ...));
1709 extern HAMLIB_EXPORT(vprintf_cb_t) rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb, rig_ptr_t arg));
1710 extern HAMLIB_EXPORT(FILE*) rig_set_debug_file HAMLIB_PARAMS((FILE *stream));
1711 
1712 extern HAMLIB_EXPORT(int) rig_register HAMLIB_PARAMS((const struct rig_caps *caps));
1713 extern HAMLIB_EXPORT(int) rig_unregister HAMLIB_PARAMS((rig_model_t rig_model));
1714 extern HAMLIB_EXPORT(int) rig_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rig_caps*, rig_ptr_t), rig_ptr_t data));
1715 extern HAMLIB_EXPORT(int) rig_load_backend HAMLIB_PARAMS((const char *be_name));
1716 extern HAMLIB_EXPORT(int) rig_check_backend HAMLIB_PARAMS((rig_model_t rig_model));
1717 extern HAMLIB_EXPORT(int) rig_load_all_backends HAMLIB_PARAMS((void));
1718 
1719 typedef int (*rig_probe_func_t)(const hamlib_port_t *, rig_model_t, rig_ptr_t);
1720 extern HAMLIB_EXPORT(int) rig_probe_all HAMLIB_PARAMS((hamlib_port_t *p, rig_probe_func_t, rig_ptr_t));
1721 extern HAMLIB_EXPORT(rig_model_t) rig_probe HAMLIB_PARAMS((hamlib_port_t *p));
1722 
1723 
1724 /* Misc calls */
1725 extern HAMLIB_EXPORT(const char *) rig_strrmode(rmode_t mode);
1726 extern HAMLIB_EXPORT(const char *) rig_strvfo(vfo_t vfo);
1727 extern HAMLIB_EXPORT(const char *) rig_strfunc(setting_t);
1728 extern HAMLIB_EXPORT(const char *) rig_strlevel(setting_t);
1729 extern HAMLIB_EXPORT(const char *) rig_strparm(setting_t);
1730 extern HAMLIB_EXPORT(const char *) rig_strptrshift(rptr_shift_t);
1731 extern HAMLIB_EXPORT(const char *) rig_strvfop(vfo_op_t op);
1732 extern HAMLIB_EXPORT(const char *) rig_strscan(scan_t scan);
1733 extern HAMLIB_EXPORT(const char *) rig_strstatus(enum rig_status_e status);
1734 extern HAMLIB_EXPORT(const char *) rig_strmtype(chan_type_t mtype);
1735 
1736 extern HAMLIB_EXPORT(rmode_t) rig_parse_mode(const char *s);
1737 extern HAMLIB_EXPORT(vfo_t) rig_parse_vfo(const char *s);
1738 extern HAMLIB_EXPORT(setting_t) rig_parse_func(const char *s);
1739 extern HAMLIB_EXPORT(setting_t) rig_parse_level(const char *s);
1740 extern HAMLIB_EXPORT(setting_t) rig_parse_parm(const char *s);
1741 extern HAMLIB_EXPORT(vfo_op_t) rig_parse_vfo_op(const char *s);
1742 extern HAMLIB_EXPORT(scan_t) rig_parse_scan(const char *s);
1743 extern HAMLIB_EXPORT(rptr_shift_t) rig_parse_rptr_shift(const char *s);
1744 extern HAMLIB_EXPORT(chan_type_t) rig_parse_mtype(const char *s);
1745 
1746 extern HAMLIB_EXPORT(const char *) rig_license HAMLIB_PARAMS(());
1747 extern HAMLIB_EXPORT(const char *) rig_version HAMLIB_PARAMS(());
1748 extern HAMLIB_EXPORT(const char *) rig_copyright HAMLIB_PARAMS(());
1749 
1750 HAMLIB_EXPORT(void) rig_no_restore_ai();
1751 
1752 __END_DECLS
1753 
1754 #endif /* _RIG_H */
1755 
Definition: rig.h:811
Definition: rig.h:444
const char * rig_strstatus(enum rig_status_e status)
Convert enum RIG_STATUS_... to printable string.
Definition: misc.c:239
int rig_get_conf(RIG *rig, token_t token, char *val)
get the value of a configuration parameter
Definition: conf.c:652
scan_t rig_has_scan(RIG *rig, scan_t scan)
check availability of scanning functions
Definition: rig.c:3081
setting_t funcs
Definition: rig.h:1002
Definition: rig.h:437
Definition: rig.h:797
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:1506
rig_debug_level_e
Hamlib debug levels.
Definition: rig.h:117
value_t step
Definition: rig.h:1081
int fd
Definition: rig.h:1355
unsigned tuning_step
Definition: rig.h:999
Definition: rig.h:697
unsigned channel_desc
Definition: rig.h:1010
unsigned long setting_t
Setting.
Definition: rig.h:713
Definition: rig.h:396
Definition: rig.h:652
unsigned tx_vfo
Definition: rig.h:996
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
struct confparams * extlevels
Definition: rig.h:1171
setting_t rig_has_get_level(RIG *rig, setting_t level)
check retrieval ability of level settings
Definition: settings.c:248
Definition: rig.h:272
setting_t has_set_func
Definition: rig.h:1443
struct ext_list * ext_levels
Definition: rig.h:973
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:517
int raw
Definition: rig.h:1092
double freq_t
Frequency type, Frequency type unit in Hz, able to hold SHF frequencies.
Definition: rig.h:280
Definition: rig.h:119
int rig_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
get the status of the DCD
Definition: rig.c:1538
const char * rigerror(int errnum)
get string describing the error code
Definition: rig.c:259
value_t min
Definition: rig.h:1079
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:984
Definition: rig.h:399
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:907
vfo_t tx_vfo
Definition: rig.h:1469
float f
Definition: rig.h:620
gran_t level_gran[32]
Definition: rig.h:1449
int rig_set_vfo(RIG *rig, vfo_t vfo)
set the current VFO
Definition: rig.c:1225
long token_t
configuration token
Definition: rig.h:508
scan_t
Rig Scan operation.
Definition: rig.h:493
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:550
shortfreq_t xit
Definition: rig.h:963
Definition: rig.h:1031
int rig_model_t
Convenience type definition for rig model.
Definition: riglist.h:543
Definition: rig.h:216
unsigned tx_width
Definition: rig.h:993
gran_t level_gran[32]
Definition: rig.h:1167
pbwidth_t tx_width
Definition: rig.h:954
struct rig_callbacks callbacks
Definition: rig.h:1529
Definition: rig.h:468
Definition: rig.h:421
Definition: rig.h:174
setting_t has_get_level
Definition: rig.h:1162
int low_power
Definition: rig.h:840
int post_write_delay
Definition: rig.h:1156
Definition: rig.h:694
char pathname[100]
Definition: rig.h:1364
int attenuator[8]
Definition: rig.h:1440
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:1382
const char * dflt
Definition: rig.h:544
setting_t has_set_parm
Definition: rig.h:1165
int rig_send_morse(RIG *rig, vfo_t vfo, const char *msg)
send morse code
Definition: rig.c:3261
const char * cs
Definition: rig.h:622
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:2804
shortfreq_t max_ifshift
Definition: rig.h:1435
enum serial_parity_e parity
Definition: rig.h:1370
enum rig_status_e status
Definition: rig.h:1141
Definition: rig.h:812
Definition: rig.h:90
rig_port_t port_type
Definition: rig.h:1146
char * dcd_arg
Definition: rig.h:1511
pbwidth_t rig_passband_wide(RIG *rig, rmode_t mode)
get the wide passband of a mode
Definition: rig.c:1182
Definition: rig.h:662
vfo_t vfo
Definition: rig.h:946
Definition: rig.h:189
Definition: rig.h:655
Definition: rig.h:796
Definition: rig.h:251
unsigned rptr_offs
Definition: rig.h:998
const char * rig_strlevel(setting_t level)
Convert enum RIG_LEVEL_... to alpha string.
Definition: misc.c:518
Definition: rig.h:97
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:1195
int rig_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
perform Memory/VFO operations
Definition: rig.c:3106
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:3312
Definition: rig.h:249
int mode_list
Definition: rig.h:1470
Definition: rig.h:634
Definition: rig.h:409
struct confparams * rig_ext_lookup_tok(RIG *rig, token_t token)
lookup ext token, return pointer to confparams struct.
Definition: ext.c:144
int rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
get the frequency of the target VFO
Definition: rig.c:918
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:2763
Definition: rig.h:669
rig_parm_e
Rig Parameters.
Definition: rig.h:689
Tuning step definition.
Definition: rig.h:872
dcd_type_t dcd
Definition: rig.h:1353
int pid
Definition: rig.h:1383
Definition: rig.h:248
int rig_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
get the current XIT offset
Definition: rig.c:2495
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:1340
vfo_op_t rig_has_vfo_op(RIG *rig, vfo_op_t op)
check retrieval ability of VFO operations
Definition: rig.c:3005
Definition: rig.h:814
int rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
set PTT on/off
Definition: rig.c:1293
Definition: rig.h:527
char * vfo_arg
Definition: rig.h:1507
int rig_set_trn(RIG *rig, int trn)
control the transceive mode
Definition: event.c:591
Frequency range.
Definition: rig.h:836
ann_t announces
Definition: rig.h:1437
Definition: rig.h:102
struct cal_table::@13 table[32/*max calibration plots in cal_table_t */]
Definition: rig.h:88
const char * rig_strparm(setting_t parm)
Convert enum RIG_PARM_... to alpha string.
Definition: misc.c:571
Definition: rig.h:171
int rig_set_conf(RIG *rig, token_t token, const char *val)
set a radio configuration parameter
Definition: conf.c:613
powerstat_t
Radio power state.
Definition: rig.h:434
char * priv
Definition: rig.h:1461
int rig_set_vfo_callback(RIG *rig, vfo_cb_t cb, char *arg)
set the callback for vfo events
Definition: event.c:486
Definition: rig.h:91
Definition: rig.h:177
ann_t announces
Definition: rig.h:1182
int vfo_list
Definition: rig.h:1459
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:291
int ant_t
Antenna number.
Definition: rig.h:576
void rig_set_debug(enum rig_debug_level_e debug_level)
Change the current debug level.
Definition: debug.c:108
chan_type_t rig_parse_mtype(const char *s)
Convert alpha string to enum RIG_MTYPE_...
Definition: misc.c:750
freq_range_t rx_range_list[30]
Definition: rig.h:1422
unsigned flags
Definition: rig.h:1009
scan_t scan_ops
Definition: rig.h:1185
setting_t has_get_func
Definition: rig.h:1442
signed int i
Definition: rig.h:619
pbwidth_t current_width
Definition: rig.h:1468
setting_t has_get_parm
Definition: rig.h:1446
Definition: rig.h:221
Definition: rig.h:176
Definition: rig.h:696
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:948
setting_t rig_has_set_func(RIG *rig, setting_t func)
check ability of radio functions
Definition: settings.c:370
enum serial_handshake_e handshake
Definition: rig.h:1371
Definition: rig.h:250
struct hamlib_port::@16::@17 serial
union confparams::@10 u
setting_t rig_parse_func(const char *s)
Convert alpha string to enum RIG_FUNC_...
Definition: misc.c:423
pbwidth_t width
Definition: rig.h:950
rmode_t mode
Definition: rig.h:949
Definition: rig.h:502
Definition: rig.h:642
shortfreq_t tuning_step
Definition: rig.h:961
unsigned int tone_t
CTCSS and DCS type definition.
Definition: rig.h:160
freq_t current_freq
Definition: rig.h:1466
ptt_type_t ptt_type
Definition: rig.h:1144
Definition: rig.h:273
int stop_bits
Definition: rig.h:1369
Definition: rig.h:412
int rig_send_dtmf(RIG *rig, vfo_t vfo, const char *digits)
send DTMF digits
Definition: rig.c:3158
serial_handshake_e
Serial handshake.
Definition: rig.h:196
Definition: rig.h:808
int high_power
Definition: rig.h:841
Definition: rig.h:428
Definition: rig.h:569
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:1977
ptt_type_t ptt
Definition: rig.h:1352
Definition: rig.h:197
shortfreq_t max_rit
Definition: rig.h:1178
Definition: rig.h:641
int rig_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
activate/de-activate functions of radio
Definition: settings.c:397
Definition: rig.h:215
unsigned vfo
Definition: rig.h:985
Definition: rig.h:425
unsigned mode
Definition: rig.h:988
const char * rig_strvfo(vfo_t vfo)
Convert enum RIG_VFO_... to alpha string.
Definition: misc.c:363
shortfreq_t pbwidth_t
Passband width, in Hz.
Definition: rig.h:379
union hamlib_port::@16 parm
Definition: rig.h:175
Definition: rig.h:178
Channel capability definition.
Definition: rig.h:983
Definition: rig.h:691
Definition: rig.h:103
Definition: rig.h:815
int rig_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
set CTCSS squelch
Definition: tones.c:292
Definition: rig.h:410
shortfreq_t rig_get_resolution(RIG *rig, rmode_t mode)
get the best frequency resolution of the rig
Definition: rig.c:2842
Channel structure.
Definition: rig.h:943
Definition: rig.h:218
Definition: rig.h:1034
vfo_op_t
VFO operation.
Definition: rig.h:467
Definition: rig.h:475
rptr_shift_t
Repeater shift type.
Definition: rig.h:262
Definition: rig.h:208
int size
Definition: rig.h:1090
Definition: rig.h:495
int rig_setting2idx(setting_t s)
basically convert setting_t expressed 2^n to n
Definition: settings.c:626
Definition: rig.h:637
const char * rig_strfunc(setting_t func)
Convert enum RIG_FUNC_... to alpha string.
Definition: misc.c:441
Extension attribute definition.
Definition: rig.h:928
Definition: rig.h:387
value_t levels[32]
Definition: rig.h:965
Definition: rig.h:645
Definition: rig.h:801
int rig_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit)
set the XIT
Definition: rig.c:2444
int rig_set_chan_all(RIG *rig, const channel_t chans[])
set all channel data
Definition: mem.c:899
int alt
Definition: rig.h:1386
Definition: rig.h:795
int attenuator[8]
Definition: rig.h:1177
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:618
Definition: rig.h:93
Definition: rig.h:528
Definition: rig.h:427
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:2056
Definition: rig.h:651
const char * rig_strptrshift(rptr_shift_t shift)
convert enum RIG_RPT_SHIFT_... to printable character
Definition: misc.c:704
vfo_t rig_parse_vfo(const char *s)
Convert alpha string to enum RIG_VFO_...
Definition: misc.c:346
const char * rig_strscan(scan_t rscan)
Convert enum RIG_SCAN_... to alpha string.
Definition: misc.c:686
setting_t has_set_parm
Definition: rig.h:1447
Definition: rig.h:644
Definition: rig.h:470
int retry
Definition: rig.h:1158
unsigned ant
Definition: rig.h:986
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 timeout
Definition: rig.h:1157
freq_cb_t freq_event
Definition: rig.h:1502
Definition: rig.h:794
const tone_t * dcs_list
Definition: rig.h:1174
vfo_t current_vfo
Definition: rig.h:1458
struct rig_state state
Definition: rig.h:1528
Rig data structure.
Definition: rig.h:1135
int rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
get the status of the PTT
Definition: rig.c:1420
int rig_type
Definition: rig.h:1143
void * handle
Definition: rig.h:1356
hamlib_port_t pttport
Definition: rig.h:1416
struct hamlib_port hamlib_port_t
Port definition.
freq_t end
Definition: rig.h:838
int post_write_delay
Definition: rig.h:1359
dcd_type_t
DCD type.
Definition: rig.h:394
int rig_reset(RIG *rig, reset_t reset)
reset the radio
Definition: rig.c:2929
token_t token
Definition: rig.h:929
rmode_t modes
Definition: rig.h:839
pltune_cb_t pltune
Definition: rig.h:1512
Definition: rig.h:220
tone_t dcs_code
Definition: rig.h:968
char * s
Definition: rig.h:621
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:603
chan_type_t
Memory channel type definition.
Definition: rig.h:1028
setting_t has_set_level
Definition: rig.h:1445
Definition: rig.h:118
Definition: rig.h:401
Definition: rig.h:640
int channel_num
Definition: rig.h:944
setting_t rig_has_get_func(RIG *rig, setting_t func)
check ability of radio functions
Definition: settings.c:346
Definition: rig.h:214
rig_status_e
Development status of the backend.
Definition: rig.h:246
Definition: rig.h:173
Definition: rig.h:1035
struct confparams * rig_confparam_lookup(RIG *rig, const char *name)
lookup a confparam struct
Definition: conf.c:551
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
Definition: rig.h:263
Definition: rig.h:803
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
Definition: rig.h:639
Definition: rig.h:100
Definition: rig.h:650
Definition: rig.h:99
shortfreq_t max_rit
Definition: rig.h:1433
Definition: rig.h:1033
freq_range_t rx_range_list2[30]
Definition: rig.h:1196
const tone_t * ctcss_list
Definition: rig.h:1173
enum serial_control_state_e dtr_state
Definition: rig.h:1373
Definition: rig.h:446
Definition: rig.h:1036
rmode_t modes
Definition: rig.h:873
scan_t rig_parse_scan(const char *s)
Convert alpha string to enum RIG_SCAN_...
Definition: misc.c:667
Definition: rig.h:224
Definition: rig.h:386
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:1421
int poll_interval
Definition: rig.h:1465
shortfreq_t max_xit
Definition: rig.h:1179
Definition: rig.h:422
Definition: rig.h:595
Definition: rig.h:480
unsigned split
Definition: rig.h:995
int rig_open(RIG *rig)
open the communication to the rig
Definition: rig.c:471
Definition: rig.h:564
int serial_data_bits
Definition: rig.h:1150
unsigned rit
Definition: rig.h:1000
int rig_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code)
get the current DCS code
Definition: tones.c:430
struct tuning_step_list tuning_steps[20]
Definition: rig.h:1199
agc_level_e
AGC delay settings.
Definition: rig.h:590
Definition: rig.h:471
Definition: rig.h:798
Definition: rig.h:448
Rig state containing live data and customized fields.
Definition: rig.h:1411
Definition: rig.h:810
Definition: rig.h:397
shortfreq_t rit
Definition: rig.h:962
int hold_decode
Definition: rig.h:1457
Definition: rig.h:473
Definition: rig.h:568
Definition: rig.h:92
int transceive
Definition: rig.h:1464
Definition: rig.h:447
Definition: rig.h:121
Definition: rig.h:500
Definition: rig.h:648
Definition: rig.h:435
ann_t
Announce.
Definition: rig.h:562
int rig_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
get the current repeater shift
Definition: rig.c:1671
rig_level_e
Rig Level Settings.
Definition: rig.h:633
int rig_cleanup(RIG *rig)
release a rig handle and free associated memory
Definition: rig.c:818
RIG * rig_init(rig_model_t rig_model)
allocate a new RIG handle
Definition: rig.c:280
int chan_desc_sz
Definition: rig.h:1190
Definition: rig.h:530
pbwidth_t rig_passband_normal(RIG *rig, rmode_t mode)
get the normal passband of a mode
Definition: rig.c:1106
Definition: rig.h:101
Definition: rig.h:222
Definition: rig.h:638
setting_t rig_parse_parm(const char *s)
Convert alpha string to RIG_PARM_...
Definition: misc.c:553
unsigned xit
Definition: rig.h:1001
dcd_type_t dcd_type
Definition: rig.h:1145
int rig_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
set the repeater shift
Definition: rig.c:1621
Definition: rig.h:168
int serial_stop_bits
Definition: rig.h:1151
int pin
Definition: rig.h:1376
Definition: rig.h:264
char * product
Definition: rig.h:1388
setting_t has_set_level
Definition: rig.h:1163
char * ptt_arg
Definition: rig.h:1509
setting_t rig_parse_level(const char *s)
Convert alpha string to enum RIG_LEVEL_...
Definition: misc.c:500
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:541
int scan_group
Definition: rig.h:970
rig_port_t rig
Definition: rig.h:1351
Definition: rig.h:665
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
Definition: rig.h:635
int rig_set_parm(RIG *rig, setting_t parm, value_t val)
set a radio parameter
Definition: settings.c:194
Definition: rig.h:172
cal_table_t str_cal
Definition: rig.h:1202
reset_t
Reset operation.
Definition: rig.h:443
int rig_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs)
get the current repeater offset
Definition: rig.c:1773
Definition: rig.h:104
Definition: rig.h:188
Definition: rig.h:668
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:86
Definition: rig.h:659
int rate
Definition: rig.h:1367
Definition: rig.h:690
token_t token
Definition: rig.h:540
Definition: rig.h:799
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:1046
Hamlib rig(radio) model definitions.
rig_conf_e
parameter types
Definition: rig.h:526
Definition: rig.h:474
const char * mfg_name
Definition: rig.h:1138
freq_t start
Definition: rig.h:837
int rig_get_ant(RIG *rig, vfo_t vfo, ant_t *ant)
get the current antenna
Definition: rig.c:2705
const char * copyright
Definition: rig.h:1140
enum rig_port_e rig_port_t
Port type.
setting_t levels
Definition: rig.h:1003
rmode_t tx_mode
Definition: rig.h:953
freq_range_t tx_range_list[30]
Definition: rig.h:1423
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:1004
const char * model_name
Definition: rig.h:1137
ptt_type_t
PTT type.
Definition: rig.h:419
int rig_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *tx_freq, rmode_t *tx_mode, pbwidth_t *tx_width)
get the current split frequency and mode
Definition: rig.c:2192
Definition: rig.h:529
setting_t funcs
Definition: rig.h:964
Definition: rig.h:209
int rig_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length)
receive DTMF digits
Definition: rig.c:3210
Calibration table struct.
Definition: rig.h:1089
Definition: rig.h:566
Definition: rig.h:87
serial_parity_e
Serial parity.
Definition: rig.h:185
int rig_set_mode_callback(RIG *rig, mode_cb_t cb, char *arg)
set the callback for mode events
Definition: event.c:460
const char * hamlib_copyright2
Hamlib copyright notice.
Definition: rig.c:88
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:1194
Definition: rig.h:469
Definition: rig.h:809
tone_t ctcss_tone
Definition: rig.h:966
value_t val
Definition: rig.h:930
setting_t has_get_level
Definition: rig.h:1444
Definition: rig.h:96
gran_t parm_gran[32]
Definition: rig.h:1450
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:2288
int end
Definition: rig.h:1054
rmode_t
Radio mode.
Definition: rig.h:793
Definition: rig.h:225
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:874
Definition: rig.h:563
const char * rig_strrmode(rmode_t mode)
Convert enum RIG_MODE to alpha string.
Definition: misc.c:308
hamlib_port_t rigport
Definition: rig.h:1415
rig_model_t rig_model
Definition: rig.h:1136
char * obj
Definition: rig.h:1462
Definition: rig.h:636
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:1148
int rig_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t tx_freq, rmode_t tx_mode, pbwidth_t tx_width)
set the split frequency and mode
Definition: rig.c:2145
unsigned tx_mode
Definition: rig.h:992
int rig_get_powerstat(RIG *rig, powerstat_t *status)
get the on/off status of the radio
Definition: rig.c:2903
pbwidth_t width
Definition: rig.h:909
int rig_probe_all(hamlib_port_t *port, rig_probe_func_t cfunc, char *data)
try to guess rigs
Definition: rig.c:2981
Definition: rig.h:658
int rig_get_trn(RIG *rig, int *trn)
get the current transceive mode
Definition: event.c:705
unsigned rptr_shift
Definition: rig.h:997
shortfreq_t max_ifshift
Definition: rig.h:1180
char * pltune_arg
Definition: rig.h:1513
int rig_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
get the current CTCSS sub-tone frequency
Definition: tones.c:150
Definition: rig.h:805
Definition: rig.h:501
const char * rig_strvfop(vfo_op_t op)
Convert enum RIG_OP_... to alpha string.
Definition: misc.c:630
split_t
Split mode.
Definition: rig.h:271
int rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
set the frequency of the target VFO
Definition: rig.c:858
chan_type_t type
Definition: rig.h:1055
struct confparams * extparms
Definition: rig.h:1170
Definition: rig.h:565
int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
get the current split frequencies
Definition: rig.c:1898
Definition: rig.h:98
Callback functions and args for rig event.
Definition: rig.h:1501
const char * tooltip
Definition: rig.h:543
Definition: rig.h:167
Definition: rig.h:476
Definition: rig.h:411
Definition: rig.h:653
Definition: rig.h:481
int rig_mem_count(RIG *rig)
get memory channel count
Definition: mem.c:1267
int write_delay
Definition: rig.h:1155
Memory channel list definition.
Definition: rig.h:1052
Definition: rig.h:169
Definition: rig.h:813
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:982
unsigned ctcss_sql
Definition: rig.h:1005
Definition: rig.h:695
level/parm granularity definition
Definition: rig.h:1078
Definition: rig.h:186
rig_model_t rig_probe(hamlib_port_t *port)
try to guess a rig
Definition: rig.c:2956
int transceive
Definition: rig.h:1187
Definition: rig.h:816
shortfreq_t rptr_offs
Definition: rig.h:960
unsigned freq
Definition: rig.h:987
int rig_set_ant(RIG *rig, vfo_t vfo, ant_t ant)
set the antenna
Definition: rig.c:2654
ptt_t
PTT status.
Definition: rig.h:408
float min
Definition: rig.h:548
int rig_close(RIG *rig)
close the communication to the rig
Definition: rig.c:709
int bank_num
Definition: rig.h:945
Definition: rig.h:692
int write_delay
Definition: rig.h:1358
Definition: rig.h:693
unsigned tx_freq
Definition: rig.h:991
int timeout
Definition: rig.h:1361
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:1053
rmode_t modes
Definition: rig.h:908
unsigned dcs_code
Definition: rig.h:1006
struct freq_range_list freq_range_t
Frequency range.
struct tuning_step_list tuning_steps[20]
Definition: rig.h:1425
Definition: rig.h:187
Definition: rig.h:122
dcd_e
DCD status.
Definition: rig.h:385
Definition: rig.h:400
rig_type_t
Rig type flags.
Definition: rig.h:213
int flags
Definition: rig.h:971
char * freq_arg
Definition: rig.h:1503
rmode_t rig_parse_mode(const char *s)
Convert alpha string to enum RIG_MODE.
Definition: misc.c:291
char channel_desc[30]
Definition: rig.h:972
Definition: rig.h:478
FILE * rig_set_debug_file(FILE *stream)
change stderr to some different output
Definition: debug.c:223
int preamp[8]
Definition: rig.h:1176
int vfo_t
VFO definition.
Definition: rig.h:321
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
Definition: rig.h:649
token_t rig_token_lookup(RIG *rig, const char *name)
lookup a token id
Definition: conf.c:588
unsigned width
Definition: rig.h:989
int conf
Definition: rig.h:1384
Definition: rig.h:802
ptt_cb_t ptt_event
Definition: rig.h:1508
struct rig_caps * caps
Definition: rig.h:1527
Definition: rig.h:1030
Definition: rig.h:395
rptr_shift_t rig_parse_rptr_shift(const char *s)
Convert alpha char to enum RIG_RPT_SHIFT_...
Definition: misc.c:719
Definition: rig.h:477
int rig_need_debug(enum rig_debug_level_e debug_level)
Useful for dump_hex, etc.
Definition: debug.c:117
Definition: rig.h:426
enum rig_conf_e type
Definition: rig.h:545
Definition: rig.h:120
vfo_t vfo
Definition: rig.h:842
Definition: rig.h:95
int rig_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code)
get the current encoding DCS code
Definition: tones.c:239
const char * rig_strmtype(chan_type_t mtype)
Convert enum RIG_MTYPE_... to alpha string.
Definition: misc.c:769
int data_bits
Definition: rig.h:1368
The Rig structure.
Definition: rig.h:1526
freq_t tx_freq
Definition: rig.h:952
gran_t parm_gran[32]
Definition: rig.h:1168
vfo_t tx_vfo
Definition: rig.h:957
mode_cb_t mode_event
Definition: rig.h:1504
Definition: rig.h:806
Definition: rig.h:479
Definition: rig.h:657
Definition: rig.h:199
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
Definition: rig.h:423
Definition: rig.h:94
tone_t dcs_sql
Definition: rig.h:969
Definition: rig.h:1032
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:1153
cal_table_t str_cal
Definition: rig.h:1429
dcd_cb_t dcd_event
Definition: rig.h:1510
Definition: rig.h:567
int iface
Definition: rig.h:1385
struct filter_list filters[60]
Definition: rig.h:1200
int retry
Definition: rig.h:1362
Definition: rig.h:497
Definition: rig.h:498
Definition: rig.h:531
unsigned ext_levels
Definition: rig.h:1011
split_t split
Definition: rig.h:956
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
Definition: rig.h:247
enum dcd_e dcd_t
DCD status.
Definition: rig.h:89
int targetable_vfo
Definition: rig.h:1186
serial_control_state_e
Serial control state.
Definition: rig.h:206
Definition: rig.h:660
Definition: rig.h:265
freq_range_t tx_range_list2[30]
Definition: rig.h:1197
Definition: rig.h:646
Definition: rig.h:800
pbwidth_t rig_passband_narrow(RIG *rig, rmode_t mode)
get the narrow passband of a mode
Definition: rig.c:1140
int rig_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
perform Memory/VFO operations
Definition: rig.c:3029
struct filter_list filters[60]
Definition: rig.h:1427
shortfreq_t max_xit
Definition: rig.h:1434
Definition: rig.h:472
Definition: rig.h:207
Definition: rig.h:219
const char * combostr[8]
Definition: rig.h:553
Definition: rig.h:666
int serial_rate_max
Definition: rig.h:1149
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:1349
value_t max
Definition: rig.h:1080
int preamp[8]
Definition: rig.h:1439
Definition: rig.h:647
unsigned scan_group
Definition: rig.h:1008
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:1160
int rig_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts)
get the current Tuning Step
Definition: rig.c:2599
Definition: rig.h:436
Definition: rig.h:445
struct hamlib_port::@16::@19 cm108
int bank_qty
Definition: rig.h:1189
int rig_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
set the split mode
Definition: rig.c:2229
int rig_set_powerstat(RIG *rig, powerstat_t status)
turn on/off the radio
Definition: rig.c:2877
int ant
Definition: rig.h:947
Definition: rig.h:198
setting_t has_set_func
Definition: rig.h:1161
Configuration parameter structure.
Definition: rig.h:539
tone_t ctcss_sql
Definition: rig.h:967
int rig_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
set the Tuning Step
Definition: rig.c:2548
Definition: rig.h:166
Definition: rig.h:179
int rig_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
set the repeater offset
Definition: rig.c:1722
int rig_set_channel(RIG *rig, const channel_t *chan)
set channel data
Definition: mem.c:503
Definition: rig.h:494
struct confparams * cfgparams
Definition: rig.h:1204
Definition: rig.h:190
Definition: rig.h:643
const char * label
Definition: rig.h:542
int val
Definition: rig.h:1093
int rig_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
set the RIT
Definition: rig.c:2342
vfo_op_t vfo_ops
Definition: rig.h:1184
Definition: rig.h:654
Definition: rig.h:420
Definition: rig.h:667
ant_t ant
Definition: rig.h:843
struct confparams::@10::@12 c
enum serial_control_state_e rts_state
Definition: rig.h:1372
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:1205
rig_port_e
Port type.
Definition: rig.h:165
int rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
set the split frequencies
Definition: rig.c:1825
Definition: rig.h:170
Definition: rig.h:123
hamlib_port_t dcdport
Definition: rig.h:1417
channel_cap_t mem_caps
Definition: rig.h:1056
enum serial_parity_e serial_parity
Definition: rig.h:1152
int rig_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
get the current RIT offset
Definition: rig.c:2393
Definition: rig.h:807
setting_t has_get_parm
Definition: rig.h:1164
Definition: rig.h:398
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
int comm_state
Definition: rig.h:1460
const char * rig_get_info(RIG *rig)
get general information from the radio
Definition: rig.c:3340
Definition: rig.h:1029
float max
Definition: rig.h:549
int rig_get_vfo(RIG *rig, vfo_t *vfo)
get the current VFO
Definition: rig.c:1260
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
vfo_op_t rig_parse_vfo_op(const char *s)
Convert alpha string to enum RIG_OP_...
Definition: misc.c:612
struct hamlib_port::@16::@18 parallel
rmode_t current_mode
Definition: rig.h:1467
unsigned dcs_sql
Definition: rig.h:1007
const char * clone_combo_get
Definition: rig.h:1341
Definition: rig.h:424
char * mode_arg
Definition: rig.h:1505
const char * version
Definition: rig.h:1139
char * vendor_name
Definition: rig.h:1387
Definition: rig.h:804
Definition: rig.h:223
rptr_shift_t rptr_shift
Definition: rig.h:959
Definition: rig.h:499
double vfo_comp
Definition: rig.h:1419
Definition: rig.h:661
Definition: rig.h:496

Generated by doxygen 1.8.5

Hamlib documentation for version 3.1 -- Wed Feb 21 2018 19:52:39
Project page: http://www.hamlib.org