Hamlib  4.0~git
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 #include <inttypes.h>
30 #include <time.h>
31 
32 /* Rig list is in a separate file so as not to mess up w/ this one */
33 #include <hamlib/riglist.h>
34 
48 /* __BEGIN_DECLS should be used at the beginning of your declarations,
49  * so that C++ compilers don't mangle their names. Use __END_DECLS at
50  * the end of C declarations. */
51 #undef __BEGIN_DECLS
52 #undef __END_DECLS
53 #ifdef __cplusplus
54 # define __BEGIN_DECLS extern "C" {
55 # define __END_DECLS }
56 #else
57 # define __BEGIN_DECLS /* empty */
58 # define __END_DECLS /* empty */
59 #endif
60 
61 /* HAMLIB_PARAMS is a macro used to wrap function prototypes, so that compilers
62  * that don't understand ANSI C prototypes still work, and ANSI C
63  * compilers can issue warnings about type mismatches. */
64 #undef HAMLIB_PARAMS
65 #if defined (__STDC__) \
66  || defined (_AIX) \
67  || (defined (__mips) && defined (_SYSTYPE_SVR4)) \
68  || defined(__CYGWIN__) \
69  || defined(_WIN32) \
70  || defined(__cplusplus)
71 # define HAMLIB_PARAMS(protos) protos
72 # define rig_ptr_t void *
73 # define amp_ptr_t void *
74 #else
75 # define HAMLIB_PARAMS(protos) ()
76 # define rig_ptr_t char *
77 # define amp_ptr_t char *
78 #endif
79 
80 #include <hamlib/rig_dll.h>
81 
82 #ifndef SWIGLUA
83 #define CONSTANT_64BIT_FLAG(BIT) (1ull << (BIT))
84 #else
85 /* SWIG's older Lua generator doesn't grok ull due to Lua using a
86  double-precision floating point type internally for number
87  representations (max 53 bits of precision) so makes a string
88  constant from a constant number literal using ull */
89 // #define CONSTANT_64BIT_FLAG(BIT) (1 << (BIT))
90 // #define SWIGLUAHIDE
91 /* But this appears to have been fixed so we'll use the correct one now
92  If you have the older version of SWIG comment out this line and use
93  the two above */
94 // This 1ul definition works on swig 4.0.1 and lua 5.3.5
95 #define CONSTANT_64BIT_FLAG(BIT) (1ul << (BIT))
96 #endif
97 
98 __BEGIN_DECLS
99 
100 extern HAMLIB_EXPORT_VAR(const char) hamlib_version[];
101 extern HAMLIB_EXPORT_VAR(const char) hamlib_copyright[];
102 extern HAMLIB_EXPORT_VAR(const char *) hamlib_version2;
103 extern HAMLIB_EXPORT_VAR(const char *) hamlib_copyright2;
104 
112  RIG_OK = 0,
130 };
131 
135 #define NETRIGCTL_RET "RPRT "
136 
137 
152 };
153 
154 
155 /* --------------- Rig capabilities -----------------*/
156 
157 /* Forward struct references */
158 
159 struct rig;
160 struct rig_state;
161 
165 typedef struct s_rig RIG;
166 
167 #define RIGNAMSIZ 30
168 #define RIGVERSIZ 8
169 #define FILPATHLEN 512
170 #define FRQRANGESIZ 30
171 #define MAXCHANDESC 30 /* describe channel eg: "WWV 5Mhz" */
172 #define TSLSTSIZ 20 /* max tuning step list size, zero ended */
173 #define FLTLSTSIZ 60 /* max mode/filter list size, zero ended */
174 #define MAXDBLSTSIZ 8 /* max preamp/att levels supported, zero ended */
175 #define CHANLSTSIZ 16 /* max mem_list size, zero ended */
176 #define MAX_CAL_LENGTH 32 /* max calibration plots in cal_table_t */
177 
178 
189 typedef unsigned int tone_t;
190 
191 
195 typedef enum rig_port_e {
210 } rig_port_t;
211 
212 
222 };
223 
224 
232 };
233 
234 
242 };
243 
244 
248 typedef enum {
249  RIG_FLAG_RECEIVER = (1 << 1),
250  RIG_FLAG_TRANSMITTER = (1 << 2),
251  RIG_FLAG_SCANNER = (1 << 3),
252  RIG_FLAG_MOBILE = (1 << 4),
253  RIG_FLAG_HANDHELD = (1 << 5),
254  RIG_FLAG_COMPUTER = (1 << 6),
255  RIG_FLAG_TRUNKING = (1 << 7),
256  RIG_FLAG_APRS = (1 << 8),
257  RIG_FLAG_TNC = (1 << 9),
258  RIG_FLAG_DXCLUSTER = (1 << 10),
259  RIG_FLAG_TUNER = (1 << 11)
260 } rig_type_t;
261 
262 #define RIG_FLAG_TRANSCEIVER (RIG_FLAG_RECEIVER|RIG_FLAG_TRANSMITTER)
263 #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)
264 
265 #define RIG_TYPE_OTHER 0
266 #define RIG_TYPE_TRANSCEIVER RIG_FLAG_TRANSCEIVER
267 #define RIG_TYPE_HANDHELD (RIG_FLAG_TRANSCEIVER|RIG_FLAG_HANDHELD)
268 #define RIG_TYPE_MOBILE (RIG_FLAG_TRANSCEIVER|RIG_FLAG_MOBILE)
269 #define RIG_TYPE_RECEIVER RIG_FLAG_RECEIVER
270 #define RIG_TYPE_PCRECEIVER (RIG_FLAG_COMPUTER|RIG_FLAG_RECEIVER)
271 #define RIG_TYPE_SCANNER (RIG_FLAG_SCANNER|RIG_FLAG_RECEIVER)
272 #define RIG_TYPE_TRUNKSCANNER (RIG_TYPE_SCANNER|RIG_FLAG_TRUNKING)
273 #define RIG_TYPE_COMPUTER (RIG_FLAG_TRANSCEIVER|RIG_FLAG_COMPUTER)
274 #define RIG_TYPE_TUNER RIG_FLAG_TUNER
275 
276 
286  /* RIG_STATUS_NEW * *!< Initial release of code
287  * !! Use of RIG_STATUS_NEW is deprecated. Do not use it anymore */
288 };
289 
294 #define RIG_STATUS_NEW RIG_STATUS_UNTESTED
295 
296 
300 typedef enum {
304 } rptr_shift_t;
305 
306 
310 typedef enum {
313 } split_t;
314 
315 
321 typedef double freq_t;
322 
326 #define PRIfreq "f"
327 
331 #define SCNfreq "lf"
332 #define FREQFMT SCNfreq
333 
334 
340 typedef signed long shortfreq_t;
341 
342 #define Hz(f) ((freq_t)(f))
343 #define kHz(f) ((freq_t)((f)*(freq_t)1000))
344 #define MHz(f) ((freq_t)((f)*(freq_t)1000000))
345 #define GHz(f) ((freq_t)((f)*(freq_t)1000000000))
346 
347 #define s_Hz(f) ((shortfreq_t)(f))
348 #define s_kHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000))
349 #define s_MHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000))
350 #define s_GHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000000))
351 
352 #define RIG_FREQ_NONE Hz(0)
353 
354 
369 typedef unsigned int vfo_t;
370 
373 #define RIG_VFO_N(n) (1u<<(n))
374 
375 #define RIG_VFO_NONE 0
376 
378 #define RIG_VFO_A RIG_VFO_N(0)
379 
381 #define RIG_VFO_B RIG_VFO_N(1)
382 
384 #define RIG_VFO_C RIG_VFO_N(2)
385 
386 // Any addition VFOS need to go from 3-20
387 // To maintain backward compatibility these values cannot change
388 
390 #define RIG_VFO_SUB_A RIG_VFO_N(21)
391 
393 #define RIG_VFO_SUB_B RIG_VFO_N(22)
394 
396 #define RIG_VFO_MAIN_A RIG_VFO_N(23)
397 
399 #define RIG_VFO_MAIN_B RIG_VFO_N(24)
400 
402 #define RIG_VFO_SUB RIG_VFO_N(25)
403 
405 #define RIG_VFO_MAIN RIG_VFO_N(26)
406 
408 #define RIG_VFO_VFO RIG_VFO_N(27)
409 
411 #define RIG_VFO_MEM RIG_VFO_N(28)
412 
414 #define RIG_VFO_CURR RIG_VFO_N(29)
415 
416 #define RIG_VFO_TX_FLAG RIG_VFO_N(30)
417 // we and also use RIG_VFO_N(31) if needed
418 
419 // Misc VFO Macros
420 
421 #define RIG_VFO_TX_VFO(v) ((v)|RIG_VFO_TX_FLAG)
422 
424 #define RIG_VFO_TX RIG_VFO_TX_VFO(RIG_VFO_CURR)
425 
427 #define RIG_VFO_RX RIG_VFO_CURR
428 
429 
430 /*
431  * targetable bitfields, for internal use.
432  * RIG_TARGETABLE_PURE means a pure targetable radio on every command
433  */
434 #define RIG_TARGETABLE_NONE 0
435 #define RIG_TARGETABLE_FREQ (1<<0)
436 #define RIG_TARGETABLE_MODE (1<<1)
437 #define RIG_TARGETABLE_PURE (1<<2)
438 #define RIG_TARGETABLE_TONE (1<<3)
439 #define RIG_TARGETABLE_FUNC (1<<4)
440 #define RIG_TARGETABLE_ALL 0x7fffffff
441 
442 
443 #define RIG_PASSBAND_NORMAL s_Hz(0)
444 #define RIG_PASSBAND_NOCHANGE s_Hz(-1)
445 
451 
452 
456 typedef enum dcd_e {
459 } dcd_t;
460 
461 
467 typedef enum {
477 } dcd_type_t;
478 
479 
483 typedef enum {
488 } ptt_t;
489 
490 
496 typedef enum {
506 } ptt_type_t;
507 
508 
512 typedef enum {
514  RIG_POWER_ON = (1 << 0),
515  RIG_POWER_STANDBY = (1 << 1),
516  RIG_POWER_OPERATE = (1 << 2),
517  RIG_POWER_UNKNOWN = (1 << 3)
518 } powerstat_t;
519 
520 
524 typedef enum {
526  RIG_RESET_SOFT = (1 << 0),
527  RIG_RESET_VFO = (1 << 1),
528  RIG_RESET_MCALL = (1 << 2),
529  RIG_RESET_MASTER = (1 << 3)
530 } reset_t;
531 
532 
548 typedef enum {
550  RIG_OP_CPY = (1 << 0),
551  RIG_OP_XCHG = (1 << 1),
552  RIG_OP_FROM_VFO = (1 << 2),
553  RIG_OP_TO_VFO = (1 << 3),
554  RIG_OP_MCL = (1 << 4),
555  RIG_OP_UP = (1 << 5),
556  RIG_OP_DOWN = (1 << 6),
557  RIG_OP_BAND_UP = (1 << 7),
558  RIG_OP_BAND_DOWN = (1 << 8),
559  RIG_OP_LEFT = (1 << 9),
560  RIG_OP_RIGHT = (1 << 10),
561  RIG_OP_TUNE = (1 << 11),
562  RIG_OP_TOGGLE = (1 << 12)
563 } vfo_op_t;
564 
565 
574 typedef enum {
576  RIG_SCAN_MEM = (1 << 0),
577  RIG_SCAN_SLCT = (1 << 1),
578  RIG_SCAN_PRIO = (1 << 2),
579  RIG_SCAN_PROG = (1 << 3),
580  RIG_SCAN_DELTA = (1 << 4),
581  RIG_SCAN_VFO = (1 << 5),
582  RIG_SCAN_PLT = (1 << 6),
583  RIG_SCAN_STOP = (1 << 7)
584 } scan_t;
585 
586 
590 typedef long token_t;
591 
592 
593 #define RIG_CONF_END 0
594 
595 
609 /* strongly inspired from soundmodem. Thanks Thomas! */
617 };
618 
619 #define RIG_COMBO_MAX 16
620 #define RIG_BIN_MAX 80
621 
625 struct confparams {
627  const char *name;
628  const char *label;
629  const char *tooltip;
630  const char *dflt;
632  union {
633  struct {
634  float min;
635  float max;
636  float step;
637  } n;
638  struct {
639  const char *combostr[RIG_COMBO_MAX];
640  } c;
641  } u;
642 };
643 
644 
650 typedef enum {
653  RIG_ANN_FREQ = (1 << 0),
654  RIG_ANN_RXMODE = (1 << 1),
655  RIG_ANN_CW = (1 << 2),
656  RIG_ANN_ENG = (1 << 3),
657  RIG_ANN_JAP = (1 << 4)
658 } ann_t;
659 
660 
664 typedef unsigned int ant_t;
665 
666 #define RIG_ANT_NONE 0
667 #define RIG_ANT_N(n) ((ant_t)1<<(n))
668 #define RIG_ANT_1 RIG_ANT_N(0)
669 #define RIG_ANT_2 RIG_ANT_N(1)
670 #define RIG_ANT_3 RIG_ANT_N(2)
671 #define RIG_ANT_4 RIG_ANT_N(3)
672 #define RIG_ANT_5 RIG_ANT_N(4)
673 
674 #define RIG_ANT_UNKNOWN RIG_ANT_N(30)
675 #define RIG_ANT_CURR RIG_ANT_N(31)
676 
677 #define RIG_ANT_MAX 32
678 
679 
683 /* TODO: kill me, and replace by real AGC delay */
685  RIG_AGC_OFF = 0,
686  RIG_AGC_SUPERFAST,
687  RIG_AGC_FAST,
688  RIG_AGC_SLOW,
690  RIG_AGC_MEDIUM,
691  RIG_AGC_AUTO
692 };
693 
694 #define RIG_AGC_LAST RIG_AGC_AUTO
695 
700  RIG_METER_NONE = 0, /*< No display meter */
701  RIG_METER_SWR = (1 << 0), /*< Stationary Wave Ratio */
702  RIG_METER_COMP = (1 << 1), /*< Compression level */
703  RIG_METER_ALC = (1 << 2), /*< ALC */
704  RIG_METER_IC = (1 << 3), /*< IC */
705  RIG_METER_DB = (1 << 4), /*< DB */
706  RIG_METER_PO = (1 << 5), /*< Power Out */
707  RIG_METER_VDD = (1 << 6) /*< Final Amp Voltage */
708 };
709 
710 
716 typedef union {
717  signed int i;
718  float f;
719  char *s;
720  const char *cs;
721  struct {
722  int l;
723  unsigned char *d; /* Pointer to data buffer */
724  } b;
725 } value_t;
726 
727 
738  RIG_LEVEL_PREAMP = (1 << 0),
739  RIG_LEVEL_ATT = (1 << 1),
740  RIG_LEVEL_VOXDELAY = (1 << 2),
741  RIG_LEVEL_AF = (1 << 3),
742  RIG_LEVEL_RF = (1 << 4),
743  RIG_LEVEL_SQL = (1 << 5),
744  RIG_LEVEL_IF = (1 << 6),
745  RIG_LEVEL_APF = (1 << 7),
746  RIG_LEVEL_NR = (1 << 8),
747  RIG_LEVEL_PBT_IN = (1 << 9),
748  RIG_LEVEL_PBT_OUT = (1 << 10),
749  RIG_LEVEL_CWPITCH = (1 << 11),
750  RIG_LEVEL_RFPOWER = (1 << 12),
751  RIG_LEVEL_MICGAIN = (1 << 13),
752  RIG_LEVEL_KEYSPD = (1 << 14),
753  RIG_LEVEL_NOTCHF = (1 << 15),
754  RIG_LEVEL_COMP = (1 << 16),
755  RIG_LEVEL_AGC = (1 << 17),
756  RIG_LEVEL_BKINDL = (1 << 18),
757  RIG_LEVEL_BALANCE = (1 << 19),
758  RIG_LEVEL_METER = (1 << 20),
759  RIG_LEVEL_VOXGAIN = (1 << 21),
760  RIG_LEVEL_ANTIVOX = (1 << 22),
761  RIG_LEVEL_SLOPE_LOW = (1 << 23),
762  RIG_LEVEL_SLOPE_HIGH = (1 << 24),
763  RIG_LEVEL_BKIN_DLYMS = (1 << 25),
766  RIG_LEVEL_RAWSTR = (1 << 26),
767  RIG_LEVEL_SQLSTAT = (1 << 27),
768  RIG_LEVEL_SWR = (1 << 28),
769  RIG_LEVEL_ALC = (1 << 29),
770  RIG_LEVEL_STRENGTH = (1 << 30),
771  /* RIG_LEVEL_BWC = (1<<31) */
772  RIG_LEVEL_RFPOWER_METER = CONSTANT_64BIT_FLAG(32),
773  RIG_LEVEL_COMP_METER = CONSTANT_64BIT_FLAG(33),
774  RIG_LEVEL_VD_METER = CONSTANT_64BIT_FLAG(34),
775  RIG_LEVEL_ID_METER = CONSTANT_64BIT_FLAG(35),
777  RIG_LEVEL_NOTCHF_RAW = CONSTANT_64BIT_FLAG(36),
778  RIG_LEVEL_MONITOR_GAIN = CONSTANT_64BIT_FLAG(37),
779  RIG_LEVEL_NB = CONSTANT_64BIT_FLAG(38),
780 };
781 
782 #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|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB)
783 
784 #define RIG_LEVEL_READONLY_LIST (RIG_LEVEL_SQLSTAT|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_STRENGTH|RIG_LEVEL_RAWSTR|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER)
785 
786 #define RIG_LEVEL_IS_FLOAT(l) ((l)&RIG_LEVEL_FLOAT_LIST)
787 #define RIG_LEVEL_SET(l) ((l)&~RIG_LEVEL_READONLY_LIST)
788 
789 
800  RIG_PARM_ANN = (1 << 0),
801  RIG_PARM_APO = (1 << 1),
802  RIG_PARM_BACKLIGHT = (1 << 2),
803  RIG_PARM_BEEP = (1 << 4),
804  RIG_PARM_TIME = (1 << 5),
805  RIG_PARM_BAT = (1 << 6),
806  RIG_PARM_KEYLIGHT = (1 << 7),
808 };
809 
810 #define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT)
811 #define RIG_PARM_READONLY_LIST (RIG_PARM_BAT)
812 
813 #define RIG_PARM_IS_FLOAT(l) ((l)&RIG_PARM_FLOAT_LIST)
814 #define RIG_PARM_SET(l) ((l)&~RIG_PARM_READONLY_LIST)
815 
822 typedef uint64_t setting_t;
823 
824 
825 #define RIG_SETTING_MAX 64
826 
832 #define RIG_TRN_OFF 0
833 #define RIG_TRN_RIG 1
834 #define RIG_TRN_POLL 2
835 
836 
845 /*
846  * The C standard dictates that an enum constant is a 32 bit signed integer.
847  * Setting a constant's bit 31 created a negative value that on amd64 had the
848  * upper 32 bits set as well when assigned to the misc.c:func_str structure.
849  * This caused misc.c:rig_strfunc() to fail its comparison for RIG_FUNC_XIT
850  * on amd64 (x86_64). To use bit 31 as an unsigned long, preprocessor macros
851  * have been used instead as a 'const unsigned long' which cannot be used to
852  * initialize the func_str.func members. TNX KA6MAL, AC6SL. - N0NB
853  */
854 #define RIG_FUNC_NONE 0
855 #define RIG_FUNC_FAGC CONSTANT_64BIT_FLAG (0)
856 #define RIG_FUNC_NB CONSTANT_64BIT_FLAG (1)
857 #define RIG_FUNC_COMP CONSTANT_64BIT_FLAG (2)
858 #define RIG_FUNC_VOX CONSTANT_64BIT_FLAG (3)
859 #define RIG_FUNC_TONE CONSTANT_64BIT_FLAG (4)
860 #define RIG_FUNC_TSQL CONSTANT_64BIT_FLAG (5)
861 #define RIG_FUNC_SBKIN CONSTANT_64BIT_FLAG (6)
862 #define RIG_FUNC_FBKIN CONSTANT_64BIT_FLAG (7)
863 #define RIG_FUNC_ANF CONSTANT_64BIT_FLAG (8)
864 #define RIG_FUNC_NR CONSTANT_64BIT_FLAG (9)
865 #define RIG_FUNC_AIP CONSTANT_64BIT_FLAG (10)
866 #define RIG_FUNC_APF CONSTANT_64BIT_FLAG (11)
867 #define RIG_FUNC_MON CONSTANT_64BIT_FLAG (12)
868 #define RIG_FUNC_MN CONSTANT_64BIT_FLAG (13)
869 #define RIG_FUNC_RF CONSTANT_64BIT_FLAG (14)
870 #define RIG_FUNC_ARO CONSTANT_64BIT_FLAG (15)
871 #define RIG_FUNC_LOCK CONSTANT_64BIT_FLAG (16)
872 #define RIG_FUNC_MUTE CONSTANT_64BIT_FLAG (17)
873 #define RIG_FUNC_VSC CONSTANT_64BIT_FLAG (18)
874 #define RIG_FUNC_REV CONSTANT_64BIT_FLAG (19)
875 #define RIG_FUNC_SQL CONSTANT_64BIT_FLAG (20)
876 #define RIG_FUNC_ABM CONSTANT_64BIT_FLAG (21)
877 #define RIG_FUNC_BC CONSTANT_64BIT_FLAG (22)
878 #define RIG_FUNC_MBC CONSTANT_64BIT_FLAG (23)
879 #define RIG_FUNC_RIT CONSTANT_64BIT_FLAG (24)
880 #define RIG_FUNC_AFC CONSTANT_64BIT_FLAG (25)
881 #define RIG_FUNC_SATMODE CONSTANT_64BIT_FLAG (26)
882 #define RIG_FUNC_SCOPE CONSTANT_64BIT_FLAG (27)
883 #define RIG_FUNC_RESUME CONSTANT_64BIT_FLAG (28)
884 #define RIG_FUNC_TBURST CONSTANT_64BIT_FLAG (29)
885 #define RIG_FUNC_TUNER CONSTANT_64BIT_FLAG (30)
886 #define RIG_FUNC_XIT CONSTANT_64BIT_FLAG (31)
887 #ifndef SWIGLUAHIDE
888 /* Hide the top 32 bits from the old Lua binding as they can't be represented */
889 #define RIG_FUNC_NB2 CONSTANT_64BIT_FLAG (32)
890 #define RIG_FUNC_CSQL CONSTANT_64BIT_FLAG (33)
891 #define RIG_FUNC_AFLT CONSTANT_64BIT_FLAG (34)
892 #define RIG_FUNC_ANL CONSTANT_64BIT_FLAG (35)
893 #define RIG_FUNC_BC2 CONSTANT_64BIT_FLAG (36)
894 #define RIG_FUNC_DUAL_WATCH CONSTANT_64BIT_FLAG (37)
895 #define RIG_FUNC_DIVERSITY CONSTANT_64BIT_FLAG (38)
896 #define RIG_FUNC_DSQL CONSTANT_64BIT_FLAG (39)
897 #define RIG_FUNC_SCEN CONSTANT_64BIT_FLAG (40)
898 #define RIG_FUNC_BIT41 CONSTANT_64BIT_FLAG (41) /* available for future RIG_FUNC items */
899 #define RIG_FUNC_BIT42 CONSTANT_64BIT_FLAG (42) /* available for future RIG_FUNC items */
900 #define RIG_FUNC_BIT43 CONSTANT_64BIT_FLAG (43) /* available for future RIG_FUNC items */
901 #define RIG_FUNC_BIT44 CONSTANT_64BIT_FLAG (44) /* available for future RIG_FUNC items */
902 #define RIG_FUNC_BIT45 CONSTANT_64BIT_FLAG (45) /* available for future RIG_FUNC items */
903 #define RIG_FUNC_BIT46 CONSTANT_64BIT_FLAG (46) /* available for future RIG_FUNC items */
904 #define RIG_FUNC_BIT47 CONSTANT_64BIT_FLAG (47) /* available for future RIG_FUNC items */
905 #define RIG_FUNC_BIT48 CONSTANT_64BIT_FLAG (48) /* available for future RIG_FUNC items */
906 #define RIG_FUNC_BIT49 CONSTANT_64BIT_FLAG (49) /* available for future RIG_FUNC items */
907 #define RIG_FUNC_BIT50 CONSTANT_64BIT_FLAG (50) /* available for future RIG_FUNC items */
908 #define RIG_FUNC_BIT51 CONSTANT_64BIT_FLAG (51) /* available for future RIG_FUNC items */
909 #define RIG_FUNC_BIT52 CONSTANT_64BIT_FLAG (52) /* available for future RIG_FUNC items */
910 #define RIG_FUNC_BIT53 CONSTANT_64BIT_FLAG (53) /* available for future RIG_FUNC items */
911 #define RIG_FUNC_BIT54 CONSTANT_64BIT_FLAG (54) /* available for future RIG_FUNC items */
912 #define RIG_FUNC_BIT55 CONSTANT_64BIT_FLAG (55) /* available for future RIG_FUNC items */
913 #define RIG_FUNC_BIT56 CONSTANT_64BIT_FLAG (56) /* available for future RIG_FUNC items */
914 #define RIG_FUNC_BIT57 CONSTANT_64BIT_FLAG (57) /* available for future RIG_FUNC items */
915 #define RIG_FUNC_BIT58 CONSTANT_64BIT_FLAG (58) /* available for future RIG_FUNC items */
916 #define RIG_FUNC_BIT59 CONSTANT_64BIT_FLAG (59) /* available for future RIG_FUNC items */
917 #define RIG_FUNC_BIT60 CONSTANT_64BIT_FLAG (60) /* available for future RIG_FUNC items */
918 #define RIG_FUNC_BIT61 CONSTANT_64BIT_FLAG (61) /* available for future RIG_FUNC items */
919 #define RIG_FUNC_BIT62 CONSTANT_64BIT_FLAG (62) /* available for future RIG_FUNC items */
920 #define RIG_FUNC_BIT63 CONSTANT_64BIT_FLAG (63) /* available for future RIG_FUNC items */
921 /* 63 is this highest bit number that can be used */
922 #endif
923 
930 #define mW(p) ((int)(p))
931 #define Watts(p) ((int)((p)*1000))
932 #define W(p) Watts(p)
933 #define kW(p) ((int)((p)*1000000L))
934 
935 
945 typedef uint64_t rmode_t;
946 
947 #define RIG_MODE_NONE 0
948 #define RIG_MODE_AM CONSTANT_64BIT_FLAG (0)
949 #define RIG_MODE_CW CONSTANT_64BIT_FLAG (1)
950 #define RIG_MODE_USB CONSTANT_64BIT_FLAG (2)
951 #define RIG_MODE_LSB CONSTANT_64BIT_FLAG (3)
952 #define RIG_MODE_RTTY CONSTANT_64BIT_FLAG (4)
953 #define RIG_MODE_FM CONSTANT_64BIT_FLAG (5)
954 #define RIG_MODE_WFM CONSTANT_64BIT_FLAG (6)
955 #define RIG_MODE_CWR CONSTANT_64BIT_FLAG (7)
956 #define RIG_MODE_RTTYR CONSTANT_64BIT_FLAG (8)
957 #define RIG_MODE_AMS CONSTANT_64BIT_FLAG (9)
958 #define RIG_MODE_PKTLSB CONSTANT_64BIT_FLAG (10)
959 #define RIG_MODE_PKTUSB CONSTANT_64BIT_FLAG (11)
960 #define RIG_MODE_PKTFM CONSTANT_64BIT_FLAG (12)
961 #define RIG_MODE_ECSSUSB CONSTANT_64BIT_FLAG (13)
962 #define RIG_MODE_ECSSLSB CONSTANT_64BIT_FLAG (14)
963 #define RIG_MODE_FAX CONSTANT_64BIT_FLAG (15)
964 #define RIG_MODE_SAM CONSTANT_64BIT_FLAG (16)
965 #define RIG_MODE_SAL CONSTANT_64BIT_FLAG (17)
966 #define RIG_MODE_SAH CONSTANT_64BIT_FLAG (18)
967 #define RIG_MODE_DSB CONSTANT_64BIT_FLAG (19)
968 #define RIG_MODE_FMN CONSTANT_64BIT_FLAG (21)
969 #define RIG_MODE_PKTAM CONSTANT_64BIT_FLAG (22)
970 #define RIG_MODE_P25 CONSTANT_64BIT_FLAG (23)
971 #define RIG_MODE_DSTAR CONSTANT_64BIT_FLAG (24)
972 #define RIG_MODE_DPMR CONSTANT_64BIT_FLAG (25)
973 #define RIG_MODE_NXDNVN CONSTANT_64BIT_FLAG (26)
974 #define RIG_MODE_NXDN_N CONSTANT_64BIT_FLAG (27)
975 #define RIG_MODE_DCR CONSTANT_64BIT_FLAG (28)
976 #define RIG_MODE_AMN CONSTANT_64BIT_FLAG (29)
977 #define RIG_MODE_PSK CONSTANT_64BIT_FLAG (30)
978 #define RIG_MODE_PSKR CONSTANT_64BIT_FLAG (31)
979 #ifndef SWIGLUAHIDE
980 /* hide the top 32 bits from the Lua binding as they will not work */
981 #define RIG_MODE_DD CONSTANT_64BIT_FLAG (32)
982 #define RIG_MODE_C4FM CONSTANT_64BIT_FLAG (33)
983 #define RIG_MODE_BIT34 CONSTANT_64BIT_FLAG (34) /* reserved for future expansion */
984 #define RIG_MODE_BIT35 CONSTANT_64BIT_FLAG (35) /* reserved for future expansion */
985 #define RIG_MODE_BIT36 CONSTANT_64BIT_FLAG (36) /* reserved for future expansion */
986 #define RIG_MODE_BIT37 CONSTANT_64BIT_FLAG (37) /* reserved for future expansion */
987 #define RIG_MODE_BIT38 CONSTANT_64BIT_FLAG (38) /* reserved for future expansion */
988 #define RIG_MODE_BIT39 CONSTANT_64BIT_FLAG (39) /* reserved for future expansion */
989 #define RIG_MODE_BIT40 CONSTANT_64BIT_FLAG (40) /* reserved for future expansion */
990 #define RIG_MODE_BIT41 CONSTANT_64BIT_FLAG (41) /* reserved for future expansion */
991 #define RIG_MODE_BIT42 CONSTANT_64BIT_FLAG (42) /* reserved for future expansion */
992 #define RIG_MODE_BIT43 CONSTANT_64BIT_FLAG (43) /* reserved for future expansion */
993 #define RIG_MODE_BIT44 CONSTANT_64BIT_FLAG (44) /* reserved for future expansion */
994 #define RIG_MODE_BIT45 CONSTANT_64BIT_FLAG (45) /* reserved for future expansion */
995 #define RIG_MODE_BIT46 CONSTANT_64BIT_FLAG (46) /* reserved for future expansion */
996 #define RIG_MODE_BIT47 CONSTANT_64BIT_FLAG (47) /* reserved for future expansion */
997 #define RIG_MODE_BIT48 CONSTANT_64BIT_FLAG (48) /* reserved for future expansion */
998 #define RIG_MODE_BIT49 CONSTANT_64BIT_FLAG (49) /* reserved for future expansion */
999 #define RIG_MODE_BIT50 CONSTANT_64BIT_FLAG (50) /* reserved for future expansion */
1000 #define RIG_MODE_BIT51 CONSTANT_64BIT_FLAG (51) /* reserved for future expansion */
1001 #define RIG_MODE_BIT52 CONSTANT_64BIT_FLAG (52) /* reserved for future expansion */
1002 #define RIG_MODE_BIT53 CONSTANT_64BIT_FLAG (53) /* reserved for future expansion */
1003 #define RIG_MODE_BIT54 CONSTANT_64BIT_FLAG (54) /* reserved for future expansion */
1004 #define RIG_MODE_BIT55 CONSTANT_64BIT_FLAG (55) /* reserved for future expansion */
1005 #define RIG_MODE_BIT56 CONSTANT_64BIT_FLAG (56) /* reserved for future expansion */
1006 #define RIG_MODE_BIT57 CONSTANT_64BIT_FLAG (57) /* reserved for future expansion */
1007 #define RIG_MODE_BIT58 CONSTANT_64BIT_FLAG (58) /* reserved for future expansion */
1008 #define RIG_MODE_BIT59 CONSTANT_64BIT_FLAG (59) /* reserved for future expansion */
1009 #define RIG_MODE_BIT60 CONSTANT_64BIT_FLAG (60) /* reserved for future expansion */
1010 #define RIG_MODE_BIT61 CONSTANT_64BIT_FLAG (61) /* reserved for future expansion */
1011 #define RIG_MODE_BIT62 CONSTANT_64BIT_FLAG (62) /* reserved for future expansion */
1012 #define RIG_MODE_TESTS_MAX CONSTANT_64BIT_FLAG (63)
1013 #endif
1014 
1018 #define RIG_MODE_SSB (RIG_MODE_USB|RIG_MODE_LSB)
1019 
1023 #define RIG_MODE_ECSS (RIG_MODE_ECSSUSB|RIG_MODE_ECSSLSB)
1024 
1025 
1026 #define RIG_DBLST_END 0 /* end marker in a preamp/att level list */
1027 #define RIG_IS_DBLST_END(d) ((d)==0)
1028 
1029 
1036 typedef struct freq_range_list {
1044  char *label;
1045 } freq_range_t;
1046 
1047 #define RIG_FRNG_END {Hz(0),Hz(0),RIG_MODE_NONE,0,0,RIG_VFO_NONE}
1048 #define RIG_IS_FRNG_END(r) ((r).startf == Hz(0) && (r).endf == Hz(0))
1049 
1069 };
1070 
1071 #define RIG_TS_ANY 0
1072 #define RIG_TS_END {RIG_MODE_NONE, 0}
1073 #define RIG_IS_TS_END(t) ((t).modes == RIG_MODE_NONE && (t).ts == 0)
1074 
1075 
1099 struct filter_list {
1102 };
1103 
1104 #define RIG_FLT_ANY 0
1105 #define RIG_FLT_END {RIG_MODE_NONE, 0}
1106 #define RIG_IS_FLT_END(f) ((f).modes == RIG_MODE_NONE)
1107 
1108 
1112 #define RIG_CHFLAG_NONE 0
1113 
1116 #define RIG_CHFLAG_SKIP (1<<0)
1117 
1120 #define RIG_CHFLAG_DATA (1<<1)
1121 
1124 #define RIG_CHFLAG_PSKIP (1<<2)
1125 
1130 struct ext_list {
1133 };
1134 
1135 #define RIG_EXT_END {0, {.i=0}}
1136 #define RIG_IS_EXT_END(x) ((x).token == 0)
1137 
1145 struct channel {
1147  int bank_num;
1167  value_t levels[RIG_SETTING_MAX];
1173  unsigned int flags;
1174  char channel_desc[MAXCHANDESC];
1175  struct ext_list
1176  *ext_levels;
1177 };
1178 
1182 typedef struct channel channel_t;
1183 
1189 struct channel_cap {
1190  unsigned bank_num: 1;
1191  unsigned vfo: 1;
1192  unsigned ant: 1;
1193  unsigned freq: 1;
1194  unsigned mode: 1;
1195  unsigned width: 1;
1197  unsigned tx_freq: 1;
1198  unsigned tx_mode: 1;
1199  unsigned tx_width: 1;
1201  unsigned split: 1;
1202  unsigned tx_vfo: 1;
1203  unsigned rptr_shift: 1;
1204  unsigned rptr_offs: 1;
1205  unsigned tuning_step: 1;
1206  unsigned rit: 1;
1207  unsigned xit: 1;
1210  unsigned ctcss_tone: 1;
1211  unsigned ctcss_sql: 1;
1212  unsigned dcs_code: 1;
1213  unsigned dcs_sql: 1;
1214  unsigned scan_group: 1;
1215  unsigned flags: 1;
1216  unsigned channel_desc: 1;
1217  unsigned ext_levels: 1;
1218 };
1219 
1224 
1225 
1236 typedef enum {
1245 } chan_type_t;
1246 
1247 
1261 struct chan_list {
1262  int startc;
1263  int endc;
1267 };
1268 
1269 #define RIG_CHAN_END {0,0,RIG_MTYPE_NONE}
1270 #define RIG_IS_CHAN_END(c) ((c).type == RIG_MTYPE_NONE)
1271 
1275 #define RIG_MEM_CAPS_ALL -1
1276 
1280 typedef struct chan_list chan_t;
1281 
1282 
1294 struct gran {
1298 };
1299 
1303 typedef struct gran gran_t;
1304 
1305 
1309 struct cal_table {
1310  int size;
1311  struct {
1312  int raw;
1313  int val;
1314  } table[MAX_CAL_LENGTH];
1315 };
1316 
1329 typedef struct cal_table cal_table_t;
1330 
1331 #define EMPTY_STR_CAL { 0, { { 0, 0 }, } }
1332 
1333 
1338  int size;
1339  struct {
1340  int raw;
1341  float val;
1342  } table[MAX_CAL_LENGTH];
1343 };
1344 
1358 
1359 #define EMPTY_FLOAT_CAL { 0, { { 0, 0f }, } }
1360 
1361 typedef int (* chan_cb_t)(RIG *, channel_t **, int, const chan_t *, rig_ptr_t);
1362 typedef int (* confval_cb_t)(RIG *,
1363  const struct confparams *,
1364  value_t *,
1365  rig_ptr_t);
1366 
1367 
1387 #define RIG_MODEL(arg) .rig_model=arg,.macro_name=#arg
1388 struct rig_caps {
1390  const char *model_name;
1391  const char *mfg_name;
1392  const char *version;
1393  const char *copyright;
1396  int rig_type;
1410  int timeout;
1411  int retry;
1420  gran_t level_gran[RIG_SETTING_MAX];
1421  gran_t parm_gran[RIG_SETTING_MAX];
1423  const struct confparams *extparms;
1424  const struct confparams *extlevels;
1425  const struct confparams *extfuncs;
1426  int *ext_tokens;
1429  const tone_t *dcs_list;
1431  int preamp[MAXDBLSTSIZ];
1432  int attenuator[MAXDBLSTSIZ];
1444  int bank_qty;
1447  chan_t chan_list[CHANLSTSIZ];
1449  // As of 2020-02-12 we know of 5 models from Icom USA, EUR, ITR, TPE, KOR for the IC-9700
1450  // So we currently have 5 ranges we need to deal with
1451  // The backend for the model should fill in the label field to explain what model it is
1452  // The the IC-9700 in ic7300.c for an example
1464  struct tuning_step_list tuning_steps[TSLSTSIZ];
1465  struct filter_list filters[FLTLSTSIZ];
1475  const struct confparams *cfgparams;
1476  const rig_ptr_t priv;
1478  /*
1479  * Rig API
1480  *
1481  */
1482 
1483  int (*rig_init)(RIG *rig);
1484  int (*rig_cleanup)(RIG *rig);
1485  int (*rig_open)(RIG *rig);
1486  int (*rig_close)(RIG *rig);
1487 
1488  /*
1489  * General API commands, from most primitive to least.. :()
1490  * List Set/Get functions pairs
1491  */
1492 
1493  int (*set_freq)(RIG *rig, vfo_t vfo, freq_t freq);
1494  int (*get_freq)(RIG *rig, vfo_t vfo, freq_t *freq);
1495 
1496  int (*set_mode)(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width);
1497  int (*get_mode)(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width);
1498 
1499  int (*set_vfo)(RIG *rig, vfo_t vfo);
1500  int (*get_vfo)(RIG *rig, vfo_t *vfo);
1501 
1502  int (*set_ptt)(RIG *rig, vfo_t vfo, ptt_t ptt);
1503  int (*get_ptt)(RIG *rig, vfo_t vfo, ptt_t *ptt);
1504 
1505  int (*get_dcd)(RIG *rig, vfo_t vfo, dcd_t *dcd);
1506 
1507  int (*set_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift);
1508  int (*get_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift);
1509 
1510  int (*set_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t offs);
1511  int (*get_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t *offs);
1512 
1513  int (*set_split_freq)(RIG *rig, vfo_t vfo, freq_t tx_freq);
1514  int (*get_split_freq)(RIG *rig, vfo_t vfo, freq_t *tx_freq);
1515 
1516  int (*set_split_mode)(RIG *rig,
1517  vfo_t vfo,
1518  rmode_t tx_mode,
1519  pbwidth_t tx_width);
1520  int (*get_split_mode)(RIG *rig,
1521  vfo_t vfo,
1522  rmode_t *tx_mode,
1523  pbwidth_t *tx_width);
1524 
1525  int (*set_split_freq_mode)(RIG *rig,
1526  vfo_t vfo,
1527  freq_t tx_freq,
1528  rmode_t tx_mode,
1529  pbwidth_t tx_width);
1530  int (*get_split_freq_mode)(RIG *rig,
1531  vfo_t vfo,
1532  freq_t *tx_freq,
1533  rmode_t *tx_mode,
1534  pbwidth_t *tx_width);
1535 
1536  int (*set_split_vfo)(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo);
1537  int (*get_split_vfo)(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo);
1538 
1539  int (*set_rit)(RIG *rig, vfo_t vfo, shortfreq_t rit);
1540  int (*get_rit)(RIG *rig, vfo_t vfo, shortfreq_t *rit);
1541 
1542  int (*set_xit)(RIG *rig, vfo_t vfo, shortfreq_t xit);
1543  int (*get_xit)(RIG *rig, vfo_t vfo, shortfreq_t *xit);
1544 
1545  int (*set_ts)(RIG *rig, vfo_t vfo, shortfreq_t ts);
1546  int (*get_ts)(RIG *rig, vfo_t vfo, shortfreq_t *ts);
1547 
1548  int (*set_dcs_code)(RIG *rig, vfo_t vfo, tone_t code);
1549  int (*get_dcs_code)(RIG *rig, vfo_t vfo, tone_t *code);
1550 
1551  int (*set_tone)(RIG *rig, vfo_t vfo, tone_t tone);
1552  int (*get_tone)(RIG *rig, vfo_t vfo, tone_t *tone);
1553 
1554  int (*set_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t tone);
1555  int (*get_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t *tone);
1556 
1557  int (*set_dcs_sql)(RIG *rig, vfo_t vfo, tone_t code);
1558  int (*get_dcs_sql)(RIG *rig, vfo_t vfo, tone_t *code);
1559 
1560  int (*set_tone_sql)(RIG *rig, vfo_t vfo, tone_t tone);
1561  int (*get_tone_sql)(RIG *rig, vfo_t vfo, tone_t *tone);
1562 
1563  int (*set_ctcss_sql)(RIG *rig, vfo_t vfo, tone_t tone);
1564  int (*get_ctcss_sql)(RIG *rig, vfo_t vfo, tone_t *tone);
1565 
1566  int (*power2mW)(RIG *rig,
1567  unsigned int *mwpower,
1568  float power,
1569  freq_t freq,
1570  rmode_t mode);
1571  int (*mW2power)(RIG *rig,
1572  float *power,
1573  unsigned int mwpower,
1574  freq_t freq,
1575  rmode_t mode);
1576 
1577  int (*set_powerstat)(RIG *rig, powerstat_t status);
1578  int (*get_powerstat)(RIG *rig, powerstat_t *status);
1579 
1580  int (*reset)(RIG *rig, reset_t reset);
1581 
1582  int (*set_ant)(RIG *rig, vfo_t vfo, ant_t ant, value_t option);
1583  int (*get_ant)(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx);
1584 
1585  int (*set_level)(RIG *rig, vfo_t vfo, setting_t level, value_t val);
1586  int (*get_level)(RIG *rig, vfo_t vfo, setting_t level, value_t *val);
1587 
1588  int (*set_func)(RIG *rig, vfo_t vfo, setting_t func, int status);
1589  int (*get_func)(RIG *rig, vfo_t vfo, setting_t func, int *status);
1590 
1591  int (*set_parm)(RIG *rig, setting_t parm, value_t val);
1592  int (*get_parm)(RIG *rig, setting_t parm, value_t *val);
1593 
1594  int (*set_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t val);
1595  int (*get_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t *val);
1596 
1597  int (*set_ext_func)(RIG *rig, vfo_t vfo, token_t token, int status);
1598  int (*get_ext_func)(RIG *rig, vfo_t vfo, token_t token, int *status);
1599 
1600  int (*set_ext_parm)(RIG *rig, token_t token, value_t val);
1601  int (*get_ext_parm)(RIG *rig, token_t token, value_t *val);
1602 
1603  int (*set_conf)(RIG *rig, token_t token, const char *val);
1604  int (*get_conf)(RIG *rig, token_t token, char *val);
1605 
1606  int (*send_dtmf)(RIG *rig, vfo_t vfo, const char *digits);
1607  int (*recv_dtmf)(RIG *rig, vfo_t vfo, char *digits, int *length);
1608 
1609  int (*send_morse)(RIG *rig, vfo_t vfo, const char *msg);
1610 
1611  int (*send_voice_mem)(RIG *rig, vfo_t vfo, int ch);
1612 
1613  int (*set_bank)(RIG *rig, vfo_t vfo, int bank);
1614 
1615  int (*set_mem)(RIG *rig, vfo_t vfo, int ch);
1616  int (*get_mem)(RIG *rig, vfo_t vfo, int *ch);
1617 
1618  int (*vfo_op)(RIG *rig, vfo_t vfo, vfo_op_t op);
1619 
1620  int (*scan)(RIG *rig, vfo_t vfo, scan_t scan, int ch);
1621 
1622  int (*set_trn)(RIG *rig, int trn);
1623  int (*get_trn)(RIG *rig, int *trn);
1624 
1625  int (*decode_event)(RIG *rig);
1626 
1627  int (*set_channel)(RIG *rig, const channel_t *chan);
1628  int (*get_channel)(RIG *rig, channel_t *chan);
1629 
1630  const char * (*get_info)(RIG *rig);
1631 
1632  int (*set_chan_all_cb)(RIG *rig, chan_cb_t chan_cb, rig_ptr_t);
1633  int (*get_chan_all_cb)(RIG *rig, chan_cb_t chan_cb, rig_ptr_t);
1634 
1635  int (*set_mem_all_cb)(RIG *rig,
1636  chan_cb_t chan_cb,
1637  confval_cb_t parm_cb,
1638  rig_ptr_t);
1639  int (*get_mem_all_cb)(RIG *rig,
1640  chan_cb_t chan_cb,
1641  confval_cb_t parm_cb,
1642  rig_ptr_t);
1643 
1644  const char *clone_combo_set;
1645  const char *clone_combo_get;
1646  const char *macro_name;
1647 };
1648 
1649 
1655 typedef struct hamlib_port {
1656  union {
1660  } type;
1661 
1662  int fd;
1663  void *handle;
1668  struct {
1669  int tv_sec, tv_usec;
1670  } post_write_date;
1672  int timeout;
1673  int retry;
1675  char pathname[FILPATHLEN];
1677  union {
1678  struct {
1679  int rate;
1686  } serial;
1688  struct {
1689  int pin;
1690  } parallel;
1692  struct {
1694  } cm108;
1696  struct {
1697  int vid;
1698  int pid;
1699  int conf;
1700  int iface;
1701  int alt;
1702  char *vendor_name;
1703  char *product;
1704  } usb;
1706  struct {
1707  int on_value;
1708  int value;
1709  } gpio;
1710  } parm;
1711 } hamlib_port_t;
1712 
1713 #if !defined(__APPLE__) || !defined(__cplusplus)
1714 typedef hamlib_port_t port_t;
1715 #endif
1716 
1717 
1727 struct rig_state {
1728  /*
1729  * overridable fields
1730  */
1735  double vfo_comp;
1741  struct tuning_step_list tuning_steps[TSLSTSIZ];
1743  struct filter_list filters[FLTLSTSIZ];
1747  chan_t chan_list[CHANLSTSIZ];
1755  int preamp[MAXDBLSTSIZ];
1756  int attenuator[MAXDBLSTSIZ];
1765  gran_t level_gran[RIG_SETTING_MAX];
1766  gran_t parm_gran[RIG_SETTING_MAX];
1769  /*
1770  * non overridable fields, internal use
1771  */
1772 
1775  int vfo_list;
1777  rig_ptr_t priv;
1778  rig_ptr_t obj;
1787  int transmit;
1791  time_t twiddle_time;
1793 };
1794 
1795 
1796 typedef int (*vprintf_cb_t)(enum rig_debug_level_e,
1797  rig_ptr_t,
1798  const char *,
1799  va_list);
1800 
1801 typedef int (*freq_cb_t)(RIG *, vfo_t, freq_t, rig_ptr_t);
1802 typedef int (*mode_cb_t)(RIG *, vfo_t, rmode_t, pbwidth_t, rig_ptr_t);
1803 typedef int (*vfo_cb_t)(RIG *, vfo_t, rig_ptr_t);
1804 typedef int (*ptt_cb_t)(RIG *, vfo_t, ptt_t, rig_ptr_t);
1805 typedef int (*dcd_cb_t)(RIG *, vfo_t, dcd_t, rig_ptr_t);
1806 typedef int (*pltune_cb_t)(RIG *,
1807  vfo_t, freq_t *,
1808  rmode_t *,
1809  pbwidth_t *,
1810  rig_ptr_t);
1811 
1812 
1831  freq_cb_t freq_event;
1832  rig_ptr_t freq_arg;
1833  mode_cb_t mode_event;
1834  rig_ptr_t mode_arg;
1835  vfo_cb_t vfo_event;
1836  rig_ptr_t vfo_arg;
1837  ptt_cb_t ptt_event;
1838  rig_ptr_t ptt_arg;
1839  dcd_cb_t dcd_event;
1840  rig_ptr_t dcd_arg;
1841  pltune_cb_t pltune;
1842  rig_ptr_t pltune_arg;
1843  /* etc.. */
1844 };
1845 
1846 
1856 struct s_rig {
1857  struct rig_caps *caps;
1858  struct rig_state state;
1860 };
1861 
1862 
1863 
1864 /* --------------- API function prototypes -----------------*/
1865 
1866 extern HAMLIB_EXPORT(RIG *) rig_init HAMLIB_PARAMS((rig_model_t rig_model));
1867 extern HAMLIB_EXPORT(int) rig_open HAMLIB_PARAMS((RIG *rig));
1868 
1869 /*
1870  * General API commands, from most primitive to least.. :()
1871  * List Set/Get functions pairs
1872  */
1873 
1874 extern HAMLIB_EXPORT(int)
1875 rig_set_freq HAMLIB_PARAMS((RIG *rig,
1876  vfo_t vfo,
1877  freq_t freq));
1878 extern HAMLIB_EXPORT(int)
1879 rig_get_freq HAMLIB_PARAMS((RIG *rig,
1880  vfo_t vfo,
1881  freq_t *freq));
1882 
1883 extern HAMLIB_EXPORT(int)
1884 rig_set_mode HAMLIB_PARAMS((RIG *rig,
1885  vfo_t vfo,
1886  rmode_t mode,
1887  pbwidth_t width));
1888 extern HAMLIB_EXPORT(int)
1889 rig_get_mode HAMLIB_PARAMS((RIG *rig,
1890  vfo_t vfo,
1891  rmode_t *mode,
1892  pbwidth_t *width));
1893 
1894 extern HAMLIB_EXPORT(int)
1895 rig_set_vfo HAMLIB_PARAMS((RIG *rig,
1896  vfo_t vfo));
1897 extern HAMLIB_EXPORT(int)
1898 rig_get_vfo HAMLIB_PARAMS((RIG *rig,
1899  vfo_t *vfo));
1900 
1901 extern HAMLIB_EXPORT(int)
1902 netrigctl_get_vfo_mode HAMLIB_PARAMS((RIG *rig));
1903 
1904 extern HAMLIB_EXPORT(int)
1905 rig_set_ptt HAMLIB_PARAMS((RIG *rig,
1906  vfo_t vfo,
1907  ptt_t ptt));
1908 extern HAMLIB_EXPORT(int)
1909 rig_get_ptt HAMLIB_PARAMS((RIG *rig,
1910  vfo_t vfo,
1911  ptt_t *ptt));
1912 
1913 extern HAMLIB_EXPORT(int)
1914 rig_get_dcd HAMLIB_PARAMS((RIG *rig,
1915  vfo_t vfo,
1916  dcd_t *dcd));
1917 
1918 extern HAMLIB_EXPORT(int)
1919 rig_set_rptr_shift HAMLIB_PARAMS((RIG *rig,
1920  vfo_t vfo,
1921  rptr_shift_t rptr_shift));
1922 extern HAMLIB_EXPORT(int)
1923 rig_get_rptr_shift HAMLIB_PARAMS((RIG *rig,
1924  vfo_t vfo,
1925  rptr_shift_t *rptr_shift));
1926 
1927 extern HAMLIB_EXPORT(int)
1928 rig_set_rptr_offs HAMLIB_PARAMS((RIG *rig,
1929  vfo_t vfo,
1930  shortfreq_t rptr_offs));
1931 extern HAMLIB_EXPORT(int)
1932 rig_get_rptr_offs HAMLIB_PARAMS((RIG *rig,
1933  vfo_t vfo,
1934  shortfreq_t *rptr_offs));
1935 
1936 extern HAMLIB_EXPORT(int)
1937 rig_set_ctcss_tone HAMLIB_PARAMS((RIG *rig,
1938  vfo_t vfo,
1939  tone_t tone));
1940 extern HAMLIB_EXPORT(int)
1941 rig_get_ctcss_tone HAMLIB_PARAMS((RIG *rig,
1942  vfo_t vfo,
1943  tone_t *tone));
1944 
1945 extern HAMLIB_EXPORT(int)
1946 rig_set_dcs_code HAMLIB_PARAMS((RIG *rig,
1947  vfo_t vfo,
1948  tone_t code));
1949 extern HAMLIB_EXPORT(int)
1950 rig_get_dcs_code HAMLIB_PARAMS((RIG *rig,
1951  vfo_t vfo,
1952  tone_t *code));
1953 
1954 extern HAMLIB_EXPORT(int)
1955 rig_set_ctcss_sql HAMLIB_PARAMS((RIG *rig,
1956  vfo_t vfo,
1957  tone_t tone));
1958 extern HAMLIB_EXPORT(int)
1959 rig_get_ctcss_sql HAMLIB_PARAMS((RIG *rig,
1960  vfo_t vfo,
1961  tone_t *tone));
1962 
1963 extern HAMLIB_EXPORT(int)
1964 rig_set_dcs_sql HAMLIB_PARAMS((RIG *rig,
1965  vfo_t vfo,
1966  tone_t code));
1967 extern HAMLIB_EXPORT(int)
1968 rig_get_dcs_sql HAMLIB_PARAMS((RIG *rig,
1969  vfo_t vfo,
1970  tone_t *code));
1971 
1972 extern HAMLIB_EXPORT(int)
1973 rig_set_split_freq HAMLIB_PARAMS((RIG *rig,
1974  vfo_t vfo,
1975  freq_t tx_freq));
1976 extern HAMLIB_EXPORT(int)
1977 rig_get_split_freq HAMLIB_PARAMS((RIG *rig,
1978  vfo_t vfo,
1979  freq_t *tx_freq));
1980 
1981 extern HAMLIB_EXPORT(int)
1982 rig_set_split_mode HAMLIB_PARAMS((RIG *rig,
1983  vfo_t vfo,
1984  rmode_t tx_mode,
1985  pbwidth_t tx_width));
1986 extern HAMLIB_EXPORT(int)
1987 rig_get_split_mode HAMLIB_PARAMS((RIG *rig,
1988  vfo_t vfo,
1989  rmode_t *tx_mode,
1990  pbwidth_t *tx_width));
1991 
1992 extern HAMLIB_EXPORT(int)
1993 rig_set_split_freq_mode HAMLIB_PARAMS((RIG *rig,
1994  vfo_t vfo,
1995  freq_t tx_freq,
1996  rmode_t tx_mode,
1997  pbwidth_t tx_width));
1998 extern HAMLIB_EXPORT(int)
1999 rig_get_split_freq_mode HAMLIB_PARAMS((RIG *rig,
2000  vfo_t vfo,
2001  freq_t *tx_freq,
2002  rmode_t *tx_mode,
2003  pbwidth_t *tx_width));
2004 
2005 extern HAMLIB_EXPORT(int)
2006 rig_set_split_vfo HAMLIB_PARAMS((RIG *,
2007  vfo_t rx_vfo,
2008  split_t split,
2009  vfo_t tx_vfo));
2010 extern HAMLIB_EXPORT(int)
2011 rig_get_split_vfo HAMLIB_PARAMS((RIG *,
2012  vfo_t rx_vfo,
2013  split_t *split,
2014  vfo_t *tx_vfo));
2015 
2016 #define rig_set_split(r,v,s) rig_set_split_vfo((r),(v),(s),RIG_VFO_CURR)
2017 #define rig_get_split(r,v,s) ({ vfo_t _tx_vfo; rig_get_split_vfo((r),(v),(s),&_tx_vfo); })
2018 
2019 extern HAMLIB_EXPORT(int)
2020 rig_set_rit HAMLIB_PARAMS((RIG *rig,
2021  vfo_t vfo,
2022  shortfreq_t rit));
2023 extern HAMLIB_EXPORT(int)
2024 rig_get_rit HAMLIB_PARAMS((RIG *rig,
2025  vfo_t vfo,
2026  shortfreq_t *rit));
2027 
2028 extern HAMLIB_EXPORT(int)
2029 rig_set_xit HAMLIB_PARAMS((RIG *rig,
2030  vfo_t vfo,
2031  shortfreq_t xit));
2032 extern HAMLIB_EXPORT(int)
2033 rig_get_xit HAMLIB_PARAMS((RIG *rig,
2034  vfo_t vfo,
2035  shortfreq_t *xit));
2036 
2037 extern HAMLIB_EXPORT(int)
2038 rig_set_ts HAMLIB_PARAMS((RIG *rig,
2039  vfo_t vfo,
2040  shortfreq_t ts));
2041 extern HAMLIB_EXPORT(int)
2042 rig_get_ts HAMLIB_PARAMS((RIG *rig,
2043  vfo_t vfo,
2044  shortfreq_t *ts));
2045 
2046 extern HAMLIB_EXPORT(int)
2047 rig_power2mW HAMLIB_PARAMS((RIG *rig,
2048  unsigned int *mwpower,
2049  float power,
2050  freq_t freq,
2051  rmode_t mode));
2052 extern HAMLIB_EXPORT(int)
2053 rig_mW2power HAMLIB_PARAMS((RIG *rig,
2054  float *power,
2055  unsigned int mwpower,
2056  freq_t freq,
2057  rmode_t mode));
2058 
2059 extern HAMLIB_EXPORT(shortfreq_t)
2060 rig_get_resolution HAMLIB_PARAMS((RIG *rig,
2061  rmode_t mode));
2062 
2063 extern HAMLIB_EXPORT(int)
2064 rig_set_level HAMLIB_PARAMS((RIG *rig,
2065  vfo_t vfo,
2066  setting_t level,
2067  value_t val));
2068 extern HAMLIB_EXPORT(int)
2069 rig_get_level HAMLIB_PARAMS((RIG *rig,
2070  vfo_t vfo,
2071  setting_t level,
2072  value_t *val));
2073 
2074 #define rig_get_strength(r,v,s) rig_get_level((r),(v),RIG_LEVEL_STRENGTH, (value_t*)(s))
2075 
2076 extern HAMLIB_EXPORT(int)
2077 rig_set_parm HAMLIB_PARAMS((RIG *rig,
2078  setting_t parm,
2079  value_t val));
2080 extern HAMLIB_EXPORT(int)
2081 rig_get_parm HAMLIB_PARAMS((RIG *rig,
2082  setting_t parm,
2083  value_t *val));
2084 
2085 extern HAMLIB_EXPORT(int)
2086 rig_set_conf HAMLIB_PARAMS((RIG *rig,
2087  token_t token,
2088  const char *val));
2089 extern HAMLIB_EXPORT(int)
2090 rig_get_conf HAMLIB_PARAMS((RIG *rig,
2091  token_t token,
2092  char *val));
2093 
2094 extern HAMLIB_EXPORT(int)
2095 rig_set_powerstat HAMLIB_PARAMS((RIG *rig,
2096  powerstat_t status));
2097 extern HAMLIB_EXPORT(int)
2098 rig_get_powerstat HAMLIB_PARAMS((RIG *rig,
2099  powerstat_t *status));
2100 
2101 extern HAMLIB_EXPORT(int)
2102 rig_reset HAMLIB_PARAMS((RIG *rig,
2103  reset_t reset)); /* dangerous! */
2104 
2105 extern HAMLIB_EXPORT(int)
2106 rig_set_ext_level HAMLIB_PARAMS((RIG *rig,
2107  vfo_t vfo,
2108  token_t token,
2109  value_t val));
2110 extern HAMLIB_EXPORT(int)
2111 rig_get_ext_level HAMLIB_PARAMS((RIG *rig,
2112  vfo_t vfo,
2113  token_t token,
2114  value_t *val));
2115 
2116 extern HAMLIB_EXPORT(int)
2117 rig_set_ext_func HAMLIB_PARAMS((RIG *rig,
2118  vfo_t vfo,
2119  token_t token,
2120  int status));
2121 extern HAMLIB_EXPORT(int)
2122 rig_get_ext_func HAMLIB_PARAMS((RIG *rig,
2123  vfo_t vfo,
2124  token_t token,
2125  int *status));
2126 
2127 extern HAMLIB_EXPORT(int)
2128 rig_set_ext_parm HAMLIB_PARAMS((RIG *rig,
2129  token_t token,
2130  value_t val));
2131 extern HAMLIB_EXPORT(int)
2132 rig_get_ext_parm HAMLIB_PARAMS((RIG *rig,
2133  token_t token,
2134  value_t *val));
2135 
2136 extern HAMLIB_EXPORT(int)
2137 rig_ext_level_foreach HAMLIB_PARAMS((RIG *rig,
2138  int (*cfunc)(RIG *,
2139  const struct confparams *,
2140  rig_ptr_t),
2141  rig_ptr_t data));
2142 extern HAMLIB_EXPORT(int)
2143 rig_ext_parm_foreach HAMLIB_PARAMS((RIG *rig,
2144  int (*cfunc)(RIG *,
2145  const struct confparams *,
2146  rig_ptr_t),
2147  rig_ptr_t data));
2148 
2149 extern HAMLIB_EXPORT(const struct confparams *)
2150 rig_ext_lookup HAMLIB_PARAMS((RIG *rig,
2151  const char *name));
2152 
2153 extern HAMLIB_EXPORT(const struct confparams *)
2154 rig_ext_lookup_tok HAMLIB_PARAMS((RIG *rig,
2155  token_t token));
2156 extern HAMLIB_EXPORT(token_t)
2157 rig_ext_token_lookup HAMLIB_PARAMS((RIG *rig,
2158  const char *name));
2159 
2160 
2161 extern HAMLIB_EXPORT(int)
2162 rig_token_foreach HAMLIB_PARAMS((RIG *rig,
2163  int (*cfunc)(const struct confparams *,
2164  rig_ptr_t),
2165  rig_ptr_t data));
2166 
2167 extern HAMLIB_EXPORT(const struct confparams *)
2168 rig_confparam_lookup HAMLIB_PARAMS((RIG *rig,
2169  const char *name));
2170 extern HAMLIB_EXPORT(token_t)
2171 rig_token_lookup HAMLIB_PARAMS((RIG *rig,
2172  const char *name));
2173 
2174 extern HAMLIB_EXPORT(int)
2175 rig_close HAMLIB_PARAMS((RIG *rig));
2176 
2177 extern HAMLIB_EXPORT(int)
2178 rig_cleanup HAMLIB_PARAMS((RIG *rig));
2179 
2180 extern HAMLIB_EXPORT(int)
2181 rig_set_ant HAMLIB_PARAMS((RIG *rig,
2182  vfo_t vfo,
2183  ant_t ant, /* antenna */
2184  value_t option)); /* optional ant info */
2185 extern HAMLIB_EXPORT(int)
2186 rig_get_ant HAMLIB_PARAMS((RIG *rig,
2187  vfo_t vfo,
2188  ant_t ant,
2189  value_t *option,
2190  ant_t *ant_curr,
2191  ant_t *ant_tx,
2192  ant_t *ant_rx));
2193 
2194 extern HAMLIB_EXPORT(setting_t)
2195 rig_has_get_level HAMLIB_PARAMS((RIG *rig,
2196  setting_t level));
2197 extern HAMLIB_EXPORT(setting_t)
2198 rig_has_set_level HAMLIB_PARAMS((RIG *rig,
2199  setting_t level));
2200 
2201 extern HAMLIB_EXPORT(setting_t)
2202 rig_has_get_parm HAMLIB_PARAMS((RIG *rig,
2203  setting_t parm));
2204 extern HAMLIB_EXPORT(setting_t)
2205 rig_has_set_parm HAMLIB_PARAMS((RIG *rig,
2206  setting_t parm));
2207 
2208 extern HAMLIB_EXPORT(setting_t)
2209 rig_has_get_func HAMLIB_PARAMS((RIG *rig,
2210  setting_t func));
2211 extern HAMLIB_EXPORT(setting_t)
2212 rig_has_set_func HAMLIB_PARAMS((RIG *rig,
2213  setting_t func));
2214 
2215 extern HAMLIB_EXPORT(int)
2216 rig_set_func HAMLIB_PARAMS((RIG *rig,
2217  vfo_t vfo,
2218  setting_t func,
2219  int status));
2220 extern HAMLIB_EXPORT(int)
2221 rig_get_func HAMLIB_PARAMS((RIG *rig,
2222  vfo_t vfo,
2223  setting_t func,
2224  int *status));
2225 
2226 extern HAMLIB_EXPORT(int)
2227 rig_send_dtmf HAMLIB_PARAMS((RIG *rig,
2228  vfo_t vfo,
2229  const char *digits));
2230 extern HAMLIB_EXPORT(int)
2231 rig_recv_dtmf HAMLIB_PARAMS((RIG *rig,
2232  vfo_t vfo,
2233  char *digits,
2234  int *length));
2235 
2236 extern HAMLIB_EXPORT(int)
2237 rig_send_morse HAMLIB_PARAMS((RIG *rig,
2238  vfo_t vfo,
2239  const char *msg));
2240 
2241 extern HAMLIB_EXPORT(int)
2242 rig_send_voice_mem HAMLIB_PARAMS((RIG *rig,
2243  vfo_t vfo,
2244  int ch));
2245 
2246 extern HAMLIB_EXPORT(int)
2247 rig_set_bank HAMLIB_PARAMS((RIG *rig,
2248  vfo_t vfo,
2249  int bank));
2250 
2251 extern HAMLIB_EXPORT(int)
2252 rig_set_mem HAMLIB_PARAMS((RIG *rig,
2253  vfo_t vfo,
2254  int ch));
2255 extern HAMLIB_EXPORT(int)
2256 rig_get_mem HAMLIB_PARAMS((RIG *rig,
2257  vfo_t vfo,
2258  int *ch));
2259 
2260 extern HAMLIB_EXPORT(int)
2261 rig_vfo_op HAMLIB_PARAMS((RIG *rig,
2262  vfo_t vfo,
2263  vfo_op_t op));
2264 
2265 extern HAMLIB_EXPORT(vfo_op_t)
2266 rig_has_vfo_op HAMLIB_PARAMS((RIG *rig,
2267  vfo_op_t op));
2268 
2269 extern HAMLIB_EXPORT(int)
2270 rig_scan HAMLIB_PARAMS((RIG *rig,
2271  vfo_t vfo,
2272  scan_t scan,
2273  int ch));
2274 
2275 extern HAMLIB_EXPORT(scan_t)
2276 rig_has_scan HAMLIB_PARAMS((RIG *rig,
2277  scan_t scan));
2278 
2279 extern HAMLIB_EXPORT(int)
2280 rig_set_channel HAMLIB_PARAMS((RIG *rig,
2281  const channel_t *chan)); /* mem */
2282 extern HAMLIB_EXPORT(int)
2283 rig_get_channel HAMLIB_PARAMS((RIG *rig,
2284  channel_t *chan));
2285 
2286 extern HAMLIB_EXPORT(int)
2287 rig_set_chan_all HAMLIB_PARAMS((RIG *rig,
2288  const channel_t chans[]));
2289 extern HAMLIB_EXPORT(int)
2290 rig_get_chan_all HAMLIB_PARAMS((RIG *rig,
2291  channel_t chans[]));
2292 
2293 extern HAMLIB_EXPORT(int)
2294 rig_set_chan_all_cb HAMLIB_PARAMS((RIG *rig,
2295  chan_cb_t chan_cb,
2296  rig_ptr_t));
2297 extern HAMLIB_EXPORT(int)
2298 rig_get_chan_all_cb HAMLIB_PARAMS((RIG *rig,
2299  chan_cb_t chan_cb,
2300  rig_ptr_t));
2301 
2302 extern HAMLIB_EXPORT(int)
2303 rig_set_mem_all_cb HAMLIB_PARAMS((RIG *rig,
2304  chan_cb_t chan_cb,
2305  confval_cb_t parm_cb,
2306  rig_ptr_t));
2307 extern HAMLIB_EXPORT(int)
2308 rig_get_mem_all_cb HAMLIB_PARAMS((RIG *rig,
2309  chan_cb_t chan_cb,
2310  confval_cb_t parm_cb,
2311  rig_ptr_t));
2312 
2313 extern HAMLIB_EXPORT(int)
2314 rig_set_mem_all HAMLIB_PARAMS((RIG *rig,
2315  const channel_t *chan,
2316  const struct confparams *,
2317  const value_t *));
2318 extern HAMLIB_EXPORT(int)
2319 rig_get_mem_all HAMLIB_PARAMS((RIG *rig,
2320  channel_t *chan,
2321  const struct confparams *,
2322  value_t *));
2323 
2324 extern HAMLIB_EXPORT(const chan_t *)
2325 rig_lookup_mem_caps HAMLIB_PARAMS((RIG *rig,
2326  int ch));
2327 
2328 extern HAMLIB_EXPORT(int)
2329 rig_mem_count HAMLIB_PARAMS((RIG *rig));
2330 
2331 extern HAMLIB_EXPORT(int)
2332 rig_set_trn HAMLIB_PARAMS((RIG *rig,
2333  int trn));
2334 extern HAMLIB_EXPORT(int)
2335 rig_get_trn HAMLIB_PARAMS((RIG *rig,
2336  int *trn));
2337 
2338 extern HAMLIB_EXPORT(int)
2339 rig_set_freq_callback HAMLIB_PARAMS((RIG *,
2340  freq_cb_t,
2341  rig_ptr_t));
2342 
2343 extern HAMLIB_EXPORT(int)
2344 rig_set_mode_callback HAMLIB_PARAMS((RIG *,
2345  mode_cb_t,
2346  rig_ptr_t));
2347 extern HAMLIB_EXPORT(int)
2348 rig_set_vfo_callback HAMLIB_PARAMS((RIG *,
2349  vfo_cb_t,
2350  rig_ptr_t));
2351 
2352 extern HAMLIB_EXPORT(int)
2353 rig_set_ptt_callback HAMLIB_PARAMS((RIG *,
2354  ptt_cb_t,
2355  rig_ptr_t));
2356 
2357 extern HAMLIB_EXPORT(int)
2358 rig_set_dcd_callback HAMLIB_PARAMS((RIG *,
2359  dcd_cb_t,
2360  rig_ptr_t));
2361 
2362 extern HAMLIB_EXPORT(int)
2363 rig_set_pltune_callback HAMLIB_PARAMS((RIG *,
2364  pltune_cb_t,
2365  rig_ptr_t));
2366 
2367 extern HAMLIB_EXPORT(int)
2368 rig_set_twiddle HAMLIB_PARAMS((RIG *rig,
2369  int seconds));
2370 
2371 extern HAMLIB_EXPORT(int)
2372 rig_get_twiddle HAMLIB_PARAMS((RIG *rig,
2373  int *seconds));
2374 
2375 extern HAMLIB_EXPORT(const char *)
2376 rig_get_info HAMLIB_PARAMS((RIG *rig));
2377 
2378 extern HAMLIB_EXPORT(const struct rig_caps *)
2379 rig_get_caps HAMLIB_PARAMS((rig_model_t rig_model));
2380 
2381 extern HAMLIB_EXPORT(const freq_range_t *)
2382 rig_get_range HAMLIB_PARAMS((const freq_range_t *range_list,
2383  freq_t freq,
2384  rmode_t mode));
2385 
2386 extern HAMLIB_EXPORT(pbwidth_t)
2387 rig_passband_normal HAMLIB_PARAMS((RIG *rig,
2388  rmode_t mode));
2389 extern HAMLIB_EXPORT(pbwidth_t)
2390 rig_passband_narrow HAMLIB_PARAMS((RIG *rig,
2391  rmode_t mode));
2392 extern HAMLIB_EXPORT(pbwidth_t)
2393 rig_passband_wide HAMLIB_PARAMS((RIG *rig,
2394  rmode_t mode));
2395 
2396 extern HAMLIB_EXPORT(const char *)
2397 rigerror HAMLIB_PARAMS((int errnum));
2398 
2399 extern HAMLIB_EXPORT(int)
2400 rig_setting2idx HAMLIB_PARAMS((setting_t s));
2401 
2402 extern HAMLIB_EXPORT(setting_t)
2403 rig_idx2setting(int i);
2404 /*
2405  * Even if these functions are prefixed with "rig_", they are not rig specific
2406  * Maybe "hamlib_" would have been better. Let me know. --SF
2407  */
2408 extern HAMLIB_EXPORT(void)
2409 rig_set_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
2410 
2411 extern HAMLIB_EXPORT(void)
2412 rig_set_debug_time_stamp HAMLIB_PARAMS((int flag));
2413 
2414 #define rig_set_debug_level(level) rig_set_debug(level)
2415 
2416 extern HAMLIB_EXPORT(int)
2417 rig_need_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
2418 
2419 
2420 
2421 #ifndef __cplusplus
2422 #ifdef __GNUC__
2423 // doing the debug macro with a dummy sprintf allows gcc to check the format string
2424 #define rig_debug(debug_level,fmt,...) { char xxxbuf[16384];snprintf(xxxbuf,sizeof(xxxbuf),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); }
2425 #endif
2426 #endif
2427 extern HAMLIB_EXPORT(void)
2428 rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level,
2429  const char *fmt, ...));
2430 
2431 extern HAMLIB_EXPORT(vprintf_cb_t)
2432 rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb,
2433  rig_ptr_t arg));
2434 
2435 extern HAMLIB_EXPORT(FILE *)
2436 rig_set_debug_file HAMLIB_PARAMS((FILE *stream));
2437 
2438 extern HAMLIB_EXPORT(int)
2439 rig_register HAMLIB_PARAMS((const struct rig_caps *caps));
2440 
2441 extern HAMLIB_EXPORT(int)
2442 rig_unregister HAMLIB_PARAMS((rig_model_t rig_model));
2443 
2444 extern HAMLIB_EXPORT(int)
2445 rig_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rig_caps *, rig_ptr_t),
2446  rig_ptr_t data));
2447 
2448 extern HAMLIB_EXPORT(int)
2449 rig_load_backend HAMLIB_PARAMS((const char *be_name));
2450 
2451 extern HAMLIB_EXPORT(int)
2452 rig_check_backend HAMLIB_PARAMS((rig_model_t rig_model));
2453 
2454 extern HAMLIB_EXPORT(int)
2455 rig_load_all_backends HAMLIB_PARAMS((void));
2456 
2457 typedef int (*rig_probe_func_t)(const hamlib_port_t *, rig_model_t, rig_ptr_t);
2458 
2459 extern HAMLIB_EXPORT(int)
2460 rig_probe_all HAMLIB_PARAMS((hamlib_port_t *p,
2461  rig_probe_func_t,
2462  rig_ptr_t));
2463 
2464 extern HAMLIB_EXPORT(rig_model_t)
2465 rig_probe HAMLIB_PARAMS((hamlib_port_t *p));
2466 
2467 
2468 /* Misc calls */
2469 extern HAMLIB_EXPORT(const char *) rig_strrmode(rmode_t mode);
2470 extern HAMLIB_EXPORT(int) rig_strrmodes(rmode_t modes, char *buf, int buflen);
2471 extern HAMLIB_EXPORT(const char *) rig_strvfo(vfo_t vfo);
2472 extern HAMLIB_EXPORT(const char *) rig_strfunc(setting_t);
2473 extern HAMLIB_EXPORT(const char *) rig_strlevel(setting_t);
2474 extern HAMLIB_EXPORT(const char *) rig_strparm(setting_t);
2475 extern HAMLIB_EXPORT(const char *) rig_strptrshift(rptr_shift_t);
2476 extern HAMLIB_EXPORT(const char *) rig_strvfop(vfo_op_t op);
2477 extern HAMLIB_EXPORT(const char *) rig_strscan(scan_t scan);
2478 extern HAMLIB_EXPORT(const char *) rig_strstatus(enum rig_status_e status);
2479 extern HAMLIB_EXPORT(const char *) rig_strmtype(chan_type_t mtype);
2480 
2481 extern HAMLIB_EXPORT(rmode_t) rig_parse_mode(const char *s);
2482 extern HAMLIB_EXPORT(vfo_t) rig_parse_vfo(const char *s);
2483 extern HAMLIB_EXPORT(setting_t) rig_parse_func(const char *s);
2484 extern HAMLIB_EXPORT(setting_t) rig_parse_level(const char *s);
2485 extern HAMLIB_EXPORT(setting_t) amp_parse_level(const char *s);
2486 extern HAMLIB_EXPORT(setting_t) rig_parse_parm(const char *s);
2487 extern HAMLIB_EXPORT(vfo_op_t) rig_parse_vfo_op(const char *s);
2488 extern HAMLIB_EXPORT(scan_t) rig_parse_scan(const char *s);
2489 extern HAMLIB_EXPORT(rptr_shift_t) rig_parse_rptr_shift(const char *s);
2490 extern HAMLIB_EXPORT(chan_type_t) rig_parse_mtype(const char *s);
2491 
2492 extern HAMLIB_EXPORT(const char *) rig_license HAMLIB_PARAMS(());
2493 extern HAMLIB_EXPORT(const char *) rig_version HAMLIB_PARAMS(());
2494 extern HAMLIB_EXPORT(const char *) rig_copyright HAMLIB_PARAMS(());
2495 
2496 extern HAMLIB_EXPORT(void) rig_no_restore_ai();
2497 
2498 #include <unistd.h>
2499 extern HAMLIB_EXPORT(int) hl_usleep(useconds_t msec);
2500 
2501 __END_DECLS
2502 
2503 #endif /* _RIG_H */
2504 
Definition: rig.h:525
int l
Definition: rig.h:722
int rig_get_conf(RIG *rig, token_t token, char *val)
get the value of a configuration parameter
Definition: conf.c:1067
scan_t rig_has_scan(RIG *rig, scan_t scan)
check availability of scanning functions
Definition: rig.c:4214
setting_t funcs
Definition: rig.h:1208
Definition: rig.h:515
union hamlib_port::@20 parm
int rig_get_mem(RIG *rig, vfo_t vfo, int *ch)
get the current memory channel number
Definition: mem.c:135
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:573
vfo_cb_t vfo_event
Definition: rig.h:1835
rig_debug_level_e
Hamlib debug levels.
Definition: rig.h:145
struct rig_callbacks callbacks
Definition: rig.h:1859
value_t step
Definition: rig.h:1297
struct hamlib_port::@20::@24 usb
int fd
Definition: rig.h:1662
unsigned tuning_step
Definition: rig.h:1205
Definition: rig.h:806
unsigned channel_desc
Definition: rig.h:1216
Definition: rig.h:469
Definition: rig.h:755
unsigned tx_vfo
Definition: rig.h:1202
token_t rig_ext_token_lookup(RIG *rig, const char *name)
Simple lookup returning token id assicated with name.
Definition: ext.c:236
setting_t rig_has_get_level(RIG *rig, setting_t level)
check retrieval ability of level settings
Definition: settings.c:301
Definition: rig.h:311
setting_t has_set_func
Definition: rig.h:1759
struct ext_list * ext_levels
Definition: rig.h:1175
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:873
int raw
Definition: rig.h:1312
double freq_t
Frequency type,.
Definition: rig.h:321
freq_range_t tx_range_list3[30]
Definition: rig.h:1458
Definition: rig.h:147
int rig_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
get the status of the DCD
Definition: rig.c:2151
const char * rigerror(int errnum)
get string describing the error code
Definition: rig.c:286
Definition: rig.h:775
value_t min
Definition: rig.h:1295
gran_t parm_gran[64]
Definition: rig.h:1421
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:636
unsigned bank_num
Definition: rig.h:1190
Definition: rig.h:472
int rig_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code)
set the current encoding DCS code
Definition: tones.c:230
Filter definition.
Definition: rig.h:1099
vfo_t tx_vfo
Definition: rig.h:1785
float f
Definition: rig.h:718
int rig_set_vfo(RIG *rig, vfo_t vfo)
set the current VFO
Definition: rig.c:1704
long token_t
configuration token
Definition: rig.h:590
scan_t
Rig Scan operation.
Definition: rig.h:574
Definition: rig.h:475
Definition: rig.h:774
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:1387
union confparams::@12 u
float step
Definition: rig.h:636
shortfreq_t xit
Definition: rig.h:1165
const char * rig_strlevel(setting_t)
Convert enum RIG_LEVEL_... to alpha string.
Definition: misc.c:765
Definition: rig.h:1239
int * ext_tokens
Definition: rig.h:1426
uint32_t rig_model_t
Convenience type definition for rig model.
Definition: riglist.h:631
Definition: rig.h:251
unsigned tx_width
Definition: rig.h:1199
pbwidth_t tx_width
Definition: rig.h:1156
Definition: rig.h:549
Definition: rig.h:777
Definition: rig.h:498
Definition: rig.h:204
setting_t has_get_level
Definition: rig.h:1415
int low_power
Definition: rig.h:1040
int post_write_delay
Definition: rig.h:1409
Definition: rig.h:803
int attenuator[8]
Definition: rig.h:1756
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.
Definition: ext.c:108
int vid
Definition: rig.h:1697
const char * dflt
Definition: rig.h:630
setting_t has_set_parm
Definition: rig.h:1418
int rig_send_morse(RIG *rig, vfo_t vfo, const char *msg)
send morse code
Definition: rig.c:4449
const char * cs
Definition: rig.h:720
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:3852
freq_t endf
Definition: rig.h:1038
shortfreq_t max_ifshift
Definition: rig.h:1751
enum serial_parity_e parity
Definition: rig.h:1682
enum rig_status_e status
Definition: rig.h:1394
Definition: rig.h:115
rig_port_t port_type
Definition: rig.h:1399
char * dcd_arg
Definition: rig.h:1840
pbwidth_t rig_passband_wide(RIG *rig, rmode_t mode)
get the wide passband of a mode
Definition: rig.c:1651
Definition: rig.h:763
gran_t level_gran[64]
Definition: rig.h:1765
vfo_t vfo
Definition: rig.h:1148
struct hamlib_port::@20::@23 cm108
Definition: rig.h:220
Definition: rig.h:758
Definition: rig.h:285
unsigned rptr_offs
Definition: rig.h:1204
Definition: rig.h:122
int rig_set_bank(RIG *rig, vfo_t vfo, int bank)
set the current memory bank
Definition: mem.c:198
int on_value
Definition: rig.h:1707
freq_range_t tx_range_list1[30]
Definition: rig.h:1454
int rig_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
perform Memory/VFO operations
Definition: rig.c:4243
Definition: rig.h:283
Definition: rig.h:737
Definition: rig.h:484
int rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
get the frequency of the target VFO
Definition: rig.c:1297
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:3796
Definition: rig.h:770
rig_parm_e
Rig Parameters.
Definition: rig.h:798
Tuning step definition.
Definition: rig.h:1066
dcd_type_t dcd
Definition: rig.h:1659
int pid
Definition: rig.h:1698
Definition: rig.h:282
int rig_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
get the current XIT offset
Definition: rig.c:3443
setting_t rig_has_set_level(RIG *rig, setting_t level)
check settable ability of level settings
Definition: settings.c:359
const char * clone_combo_set
Definition: rig.h:1644
vfo_op_t rig_has_vfo_op(RIG *rig, vfo_op_t op)
check retrieval ability of VFO operations
Definition: rig.c:4116
int rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
set PTT on/off
Definition: rig.c:1804
Definition: rig.h:611
int rig_strrmodes(rmode_t modes, char *buf, int buflen)
Convert RIG_MODE or'd value to alpha string of all modes.
Definition: misc.c:413
const char * rig_strfunc(setting_t)
Convert enum RIG_FUNC_... to alpha string.
Definition: misc.c:614
char * vfo_arg
Definition: rig.h:1836
int rig_set_trn(RIG *rig, int trn)
control the transceive mode
Definition: event.c:707
Frequency range.
Definition: rig.h:1036
ann_t announces
Definition: rig.h:1753
Calibration table struct for float values.
Definition: rig.h:1337
Definition: rig.h:127
Definition: rig.h:113
Definition: rig.h:201
int rig_set_conf(RIG *rig, token_t token, const char *val)
set a radio configuration parameter
Definition: conf.c:1014
powerstat_t
Radio power state.
Definition: rig.h:512
cal_table_float_t vd_meter_cal
Definition: rig.h:1472
int rig_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status)
set a radio function extra parameter
Definition: settings.c:767
char * priv
Definition: rig.h:1777
int rig_set_vfo_callback(RIG *rig, vfo_cb_t cb, char *arg)
set the callback for vfo events
Definition: event.c:586
Definition: rig.h:616
Definition: rig.h:116
int startc
Definition: rig.h:1262
Definition: rig.h:207
ann_t announces
Definition: rig.h:1437
value_t levels[64]
Definition: rig.h:1167
int vfo_list
Definition: rig.h:1775
Definition: rig.h:773
freq_range_t rx_range_list4[30]
Definition: rig.h:1459
signed long shortfreq_t
Short frequency type.
Definition: rig.h:340
void rig_set_debug(enum rig_debug_level_e debug_level)
Change the current debug level.
Definition: debug.c:121
freq_range_t rx_range_list[30]
Definition: rig.h:1738
unsigned flags
Definition: rig.h:1215
scan_t scan_ops
Definition: rig.h:1440
setting_t has_get_func
Definition: rig.h:1758
signed int i
Definition: rig.h:717
pbwidth_t current_width
Definition: rig.h:1784
setting_t has_get_parm
Definition: rig.h:1762
Definition: rig.h:255
Definition: rig.h:206
Definition: rig.h:805
int rig_get_ext_parm(RIG *rig, token_t token, value_t *val)
get the value of a parm extra parameter
Definition: settings.c:930
const chan_t * rig_lookup_mem_caps(RIG *rig, int ch)
lookup the memory type and capabilities
Definition: mem.c:1577
freq_t freq
Definition: rig.h:1150
setting_t rig_has_set_func(RIG *rig, setting_t func)
check ability of radio functions
Definition: settings.c:475
chan_type_t rig_parse_mtype(const char *s)
Convert alpha string to enum RIG_MTYPE_...
Definition: misc.c:1110
enum serial_handshake_e handshake
Definition: rig.h:1683
Definition: rig.h:284
pbwidth_t width
Definition: rig.h:1152
rmode_t mode
Definition: rig.h:1151
unsigned int ant_t
Antenna number.
Definition: rig.h:664
Definition: rig.h:583
Definition: rig.h:745
shortfreq_t tuning_step
Definition: rig.h:1163
unsigned int tone_t
CTCSS and DCS type definition.
Definition: rig.h:189
freq_t current_freq
Definition: rig.h:1782
ptt_type_t ptt_type
Definition: rig.h:1397
int rig_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, ant_t *ant_curr, ant_t *ant_tx, ant_t *ant_rx)
get the current antenna
Definition: rig.c:3719
float val
Definition: rig.h:1341
Definition: rig.h:312
freq_t startf
Definition: rig.h:1037
int stop_bits
Definition: rig.h:1681
Definition: rig.h:487
int rig_send_dtmf(RIG *rig, vfo_t vfo, const char *digits)
send DTMF digits
Definition: rig.c:4312
serial_handshake_e
Serial handshake.
Definition: rig.h:228
int high_power
Definition: rig.h:1041
Definition: rig.h:505
Definition: rig.h:657
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:2740
ptt_type_t ptt
Definition: rig.h:1658
Definition: rig.h:229
shortfreq_t max_rit
Definition: rig.h:1433
Definition: rig.h:744
int rig_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
activate/de-activate functions of radio
Definition: settings.c:506
Definition: rig.h:250
unsigned vfo
Definition: rig.h:1191
Definition: rig.h:502
unsigned mode
Definition: rig.h:1194
shortfreq_t pbwidth_t
Passband width, in Hz.
Definition: rig.h:450
Definition: rig.h:205
Definition: rig.h:208
Channel capability definition.
Definition: rig.h:1189
Definition: rig.h:800
Definition: rig.h:128
int rig_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
set CTCSS squelch
Definition: tones.c:362
Definition: rig.h:485
shortfreq_t rig_get_resolution(RIG *rig, rmode_t mode)
get the best frequency resolution of the rig
Definition: rig.c:3910
Channel structure.
Definition: rig.h:1145
Definition: rig.h:252
Definition: rig.h:517
Definition: rig.h:1242
vfo_op_t
VFO operation.
Definition: rig.h:548
Definition: rig.h:556
rptr_shift_t
Repeater shift type.
Definition: rig.h:300
Definition: rig.h:240
int size
Definition: rig.h:1310
Definition: rig.h:576
int rig_setting2idx(setting_t s)
basically convert setting_t expressed 2^n to n
Definition: settings.c:957
Extension attribute definition.
Definition: rig.h:1130
Definition: rig.h:458
const struct confparams * rig_ext_lookup_tok(RIG *rig, token_t token)
lookup ext token, return pointer to confparams struct.
Definition: ext.c:200
Definition: rig.h:748
int rig_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit)
set the XIT
Definition: rig.c:3375
int rig_set_chan_all(RIG *rig, const channel_t chans[])
set all channel data
Definition: mem.c:1179
int alt
Definition: rig.h:1701
int attenuator[8]
Definition: rig.h:1432
Definition: rig.h:778
setting_t rig_has_get_parm(RIG *rig, setting_t parm)
check retrieval ability of parameter settings
Definition: settings.c:388
Universal approach for passing values.
Definition: rig.h:716
Definition: rig.h:118
Definition: rig.h:612
Definition: rig.h:504
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:2852
Definition: rig.h:754
setting_t has_set_parm
Definition: rig.h:1763
Definition: rig.h:747
Definition: rig.h:551
void rig_set_debug_time_stamp(int flag)
Enbable/disable time stamp on debug output.
Definition: debug.c:140
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:4584
int retry
Definition: rig.h:1411
unsigned ant
Definition: rig.h:1192
int timeout
Definition: rig.h:1410
freq_cb_t freq_event
Definition: rig.h:1831
const tone_t * dcs_list
Definition: rig.h:1429
vfo_t current_vfo
Definition: rig.h:1774
Definition: rig.h:1388
int rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
get the status of the PTT
Definition: rig.c:2000
int rig_type
Definition: rig.h:1396
void * handle
Definition: rig.h:1663
hamlib_port_t pttport
Definition: rig.h:1732
freq_range_t tx_range_list4[30]
Definition: rig.h:1460
The Rig structure.
Definition: rig.h:1856
struct hamlib_port hamlib_port_t
Port definition.
int post_write_delay
Definition: rig.h:1666
dcd_type_t
DCD type.
Definition: rig.h:467
int rig_reset(RIG *rig, reset_t reset)
reset the radio
Definition: rig.c:4016
token_t token
Definition: rig.h:1131
rmode_t modes
Definition: rig.h:1039
pltune_cb_t pltune
Definition: rig.h:1841
setting_t rig_parse_parm(const char *s)
Convert alpha string to RIG_PARM_...
Definition: misc.c:842
Definition: rig.h:254
tone_t dcs_code
Definition: rig.h:1170
char * s
Definition: rig.h:719
int raw
Definition: rig.h:1340
setting_t rig_has_set_parm(RIG *rig, setting_t parm)
check settable ability of parameter settings
Definition: settings.c:417
meter_level_e
Level display meters.
Definition: rig.h:699
chan_type_t
Memory channel type definition.
Definition: rig.h:1236
setting_t has_set_level
Definition: rig.h:1761
Definition: rig.h:146
Definition: rig.h:474
struct hamlib_port::@19 post_write_date
Definition: rig.h:743
int channel_num
Definition: rig.h:1146
setting_t rig_has_get_func(RIG *rig, setting_t func)
check ability of radio functions
Definition: settings.c:446
Definition: rig.h:249
rig_status_e
Development status of the backend.
Definition: rig.h:280
Definition: rig.h:203
Definition: rig.h:1243
int rig_set_ext_parm(RIG *rig, token_t token, value_t val)
set a radio parm extra parameter
Definition: settings.c:898
vprintf_cb_t rig_set_debug_callback(vprintf_cb_t cb, char *arg)
set callback to handle debug messages
Definition: debug.c:276
const struct confparams * rig_confparam_lookup(RIG *rig, const char *name)
lookup a confparam struct
Definition: conf.c:927
struct hamlib_port::@20::@21 serial
int value
Definition: rig.h:1708
cal_table_float_t comp_meter_cal
Definition: rig.h:1471
Definition: rig.h:301
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:1452
Definition: rig.h:742
Definition: rig.h:125
struct hamlib_port::@20::@25 gpio
Definition: rig.h:807
Definition: rig.h:753
Definition: rig.h:124
shortfreq_t max_rit
Definition: rig.h:1749
const char * rig_strvfop(vfo_op_t op)
Convert enum RIG_OP_... to alpha string.
Definition: misc.c:945
Definition: rig.h:1241
freq_range_t rx_range_list2[30]
Definition: rig.h:1455
setting_t rig_parse_level(const char *s)
Convert alpha string to enum RIG_LEVEL_...
Definition: misc.c:710
const tone_t * ctcss_list
Definition: rig.h:1428
enum serial_control_state_e dtr_state
Definition: rig.h:1685
Definition: rig.h:527
freq_range_t tx_range_list5[30]
Definition: rig.h:1462
Definition: rig.h:1244
rmode_t modes
Definition: rig.h:1067
Definition: rig.h:258
Definition: rig.h:457
int rig_set_mem(RIG *rig, vfo_t vfo, int ch)
set the current memory channel number
Definition: mem.c:72
const struct confparams * extfuncs
Definition: rig.h:1425
struct rig_state state
Definition: rig.h:1858
int itu_region
Definition: rig.h:1737
int poll_interval
Definition: rig.h:1781
shortfreq_t max_xit
Definition: rig.h:1434
Definition: rig.h:499
Definition: rig.h:689
Definition: rig.h:561
unsigned split
Definition: rig.h:1201
int rig_open(RIG *rig)
open the communication to the rig
Definition: rig.c:547
Definition: rig.h:652
int serial_data_bits
Definition: rig.h:1403
unsigned rit
Definition: rig.h:1206
int rig_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code)
get the current DCS code
Definition: tones.c:553
const char * rig_strmtype(chan_type_t mtype)
Convert enum RIG_MTYPE_... to alpha string.
Definition: misc.c:1135
struct tuning_step_list tuning_steps[20]
Definition: rig.h:1464
agc_level_e
AGC delay settings.
Definition: rig.h:684
int transmit
Definition: rig.h:1787
Definition: rig.h:552
Definition: rig.h:529
Rig state containing live data and customized fields.
Definition: rig.h:1727
Definition: rig.h:470
shortfreq_t rit
Definition: rig.h:1164
int hold_decode
Definition: rig.h:1773
Definition: rig.h:554
setting_t rig_idx2setting(int i)
Definition: misc.c:577
Definition: rig.h:656
Definition: rig.h:117
int transceive
Definition: rig.h:1780
time_t twiddle_time
Definition: rig.h:1791
Definition: rig.h:528
Definition: rig.h:149
Definition: rig.h:581
struct rig_caps * caps
Definition: rig.h:1857
Definition: rig.h:751
Definition: rig.h:513
freq_range_t rx_range_list3[30]
Definition: rig.h:1457
ann_t
Announce.
Definition: rig.h:650
const char * rig_strparm(setting_t)
Convert enum RIG_PARM_... to alpha string.
Definition: misc.c:867
int rig_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
get the current repeater shift
Definition: rig.c:2324
rig_level_e
Rig Level Settings.
Definition: rig.h:736
int rig_cleanup(RIG *rig)
release a rig handle and free associated memory
Definition: rig.c:1046
RIG * rig_init(rig_model_t rig_model)
allocate a new RIG handle
Definition: rig.c:311
int chan_desc_sz
Definition: rig.h:1445
Definition: rig.h:614
pbwidth_t rig_passband_normal(RIG *rig, rmode_t mode)
get the normal passband of a mode
Definition: rig.c:1559
Definition: rig.h:126
Definition: rig.h:256
Definition: rig.h:741
unsigned xit
Definition: rig.h:1207
dcd_type_t dcd_type
Definition: rig.h:1398
int rig_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
set the repeater shift
Definition: rig.c:2256
Definition: rig.h:198
int serial_stop_bits
Definition: rig.h:1404
int pin
Definition: rig.h:1689
Definition: rig.h:302
char * product
Definition: rig.h:1703
setting_t has_set_level
Definition: rig.h:1416
char * ptt_arg
Definition: rig.h:1838
char * label
Definition: rig.h:1044
int rig_set_twiddle(RIG *rig, int seconds)
timeout (secs) to stop rigctld when VFO is manually changed
Definition: rig.c:1091
int rig_set_pltune_callback(RIG *rig, pltune_cb_t cb, char *arg)
set the callback for pipelined tuning module
Definition: event.c:678
const char * name
Definition: rig.h:627
int scan_group
Definition: rig.h:1172
struct confparams::@12::@13 n
rig_port_t rig
Definition: rig.h:1657
Definition: rig.h:766
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.
Definition: ext.c:63
Definition: rig.h:738
int rig_set_parm(RIG *rig, setting_t parm, value_t val)
set a radio parameter
Definition: settings.c:233
Definition: rig.h:202
cal_table_t str_cal
Definition: rig.h:1467
reset_t
Reset operation.
Definition: rig.h:524
int rig_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs)
get the current repeater offset
Definition: rig.c:2460
int rig_send_voice_mem(RIG *rig, vfo_t vfo, int ch)
send voice memory content
Definition: rig.c:4517
Definition: rig.h:129
Definition: rig.h:219
const char * macro_name
Definition: rig.h:1646
setting_t rig_parse_func(const char *s)
Convert alpha string to enum RIG_FUNC_...
Definition: misc.c:589
Definition: rig.h:769
rig_errcode_e
Hamlib error codes Error code definition that can be returned by the Hamlib functions....
Definition: rig.h:111
Definition: rig.h:760
int rate
Definition: rig.h:1679
Definition: rig.h:799
token_t token
Definition: rig.h:626
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:1474
Hamlib rig(radio) model definitions.
rig_conf_e
parameter types
Definition: rig.h:610
Definition: rig.h:555
const char * mfg_name
Definition: rig.h:1391
rmode_t mode_list
Definition: rig.h:1786
struct confparams::@12::@14 c
const char * copyright
Definition: rig.h:1393
enum rig_port_e rig_port_t
Port type.
setting_t levels
Definition: rig.h:1209
rmode_t tx_mode
Definition: rig.h:1155
freq_range_t tx_range_list[30]
Definition: rig.h:1739
const char * rig_strstatus(enum rig_status_e status)
Convert enum RIG_STATUS_... to printable string.
Definition: misc.c:283
int rig_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
set the current DCS code
Definition: tones.c:491
unsigned ctcss_tone
Definition: rig.h:1210
const char * model_name
Definition: rig.h:1390
ptt_type_t
PTT type.
Definition: rig.h:496
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:3031
Definition: rig.h:613
setting_t funcs
Definition: rig.h:1166
int rig_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
set the antenna
Definition: rig.c:3651
Definition: rig.h:241
int rig_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length)
receive DTMF digits
Definition: rig.c:4381
Calibration table struct.
Definition: rig.h:1309
Definition: rig.h:654
Definition: rig.h:112
serial_parity_e
Serial parity.
Definition: rig.h:216
int rig_set_mode_callback(RIG *rig, mode_cb_t cb, char *arg)
set the callback for mode events
Definition: event.c:556
const char * hamlib_copyright2
Hamlib copyright notice.
Definition: rig.c:91
int rig_get_parm(RIG *rig, setting_t parm, value_t *val)
get the value of a parameter
Definition: settings.c:267
int ptt_bitnum
Definition: rig.h:1693
freq_range_t rx_range_list1[30]
Definition: rig.h:1453
Definition: rig.h:550
int size
Definition: rig.h:1338
gran_t parm_gran[64]
Definition: rig.h:1766
Definition: rig.h:772
tone_t ctcss_tone
Definition: rig.h:1168
value_t val
Definition: rig.h:1132
setting_t has_get_level
Definition: rig.h:1760
Definition: rig.h:121
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:3165
rmode_t rig_parse_mode(const char *s)
Convert alpha string to enum RIG_MODE.
Definition: misc.c:356
Definition: rig.h:259
int rig_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone)
get the current CTCSS squelch
Definition: tones.c:429
cal_table_float_t id_meter_cal
Definition: rig.h:1473
shortfreq_t ts
Definition: rig.h:1068
Definition: rig.h:651
hamlib_port_t rigport
Definition: rig.h:1731
const char * combostr[16]
Definition: rig.h:639
rig_model_t rig_model
Definition: rig.h:1389
char * obj
Definition: rig.h:1778
rptr_shift_t rig_parse_rptr_shift(const char *s)
Convert alpha char to enum RIG_RPT_SHIFT_...
Definition: misc.c:1067
Definition: rig.h:739
int rig_get_chan_all_cb(RIG *rig, chan_cb_t chan_cb, char *arg)
get all channel data, by callback
Definition: mem.c:1139
int serial_rate_min
Definition: rig.h:1401
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:2972
gran_t level_gran[64]
Definition: rig.h:1420
unsigned tx_mode
Definition: rig.h:1198
int rig_get_powerstat(RIG *rig, powerstat_t *status)
get the on/off status of the radio
Definition: rig.c:3984
pbwidth_t width
Definition: rig.h:1101
int rig_probe_all(hamlib_port_t *port, rig_probe_func_t cfunc, char *data)
try to guess rigs
Definition: rig.c:4085
const char * rig_strrmode(rmode_t mode)
Convert enum RIG_MODE to alpha string.
Definition: misc.c:381
Definition: rig.h:740
int rig_get_trn(RIG *rig, int *trn)
get the current transceive mode
Definition: event.c:855
unsigned int flags
Definition: rig.h:1173
freq_t lo_freq
Definition: rig.h:1790
unsigned rptr_shift
Definition: rig.h:1203
shortfreq_t max_ifshift
Definition: rig.h:1435
freq_range_t rx_range_list5[30]
Definition: rig.h:1461
int rig_get_twiddle(RIG *rig, int *seconds)
get the twiddle timeout value (secs)
Definition: rig.c:1116
char * pltune_arg
Definition: rig.h:1842
int rig_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
get the current CTCSS sub-tone frequency
Definition: tones.c:167
const char * rig_strvfo(vfo_t vfo)
Convert enum RIG_VFO_... to alpha string.
Definition: misc.c:502
ant_t ant
Definition: rig.h:1149
Definition: rig.h:582
struct cal_table_float::@17 table[32/*max calibration plots in cal_table_t */]
split_t
Split mode.
Definition: rig.h:310
int rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
set the frequency of the target VFO
Definition: rig.c:1191
chan_type_t type
Definition: rig.h:1264
Definition: rig.h:653
scan_t rig_parse_scan(const char *s)
Convert alpha string to enum RIG_SCAN_...
Definition: misc.c:989
int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
get the current split frequencies
Definition: rig.c:2632
Definition: rig.h:123
Callback functions and args for rig event.
Definition: rig.h:1830
const char * tooltip
Definition: rig.h:629
Definition: rig.h:197
Definition: rig.h:557
Definition: rig.h:486
Definition: rig.h:756
Definition: rig.h:562
int rig_mem_count(RIG *rig)
get memory channel count
Definition: mem.c:1642
int write_delay
Definition: rig.h:1408
Memory channel list definition.
Definition: rig.h:1261
Definition: rig.h:199
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:1390
unsigned ctcss_sql
Definition: rig.h:1211
Definition: rig.h:804
level/parm granularity definition
Definition: rig.h:1294
Definition: rig.h:217
rig_model_t rig_probe(hamlib_port_t *port)
try to guess a rig
Definition: rig.c:4055
struct cal_table::@16 table[32/*max calibration plots in cal_table_t */]
int transceive
Definition: rig.h:1442
shortfreq_t rptr_offs
Definition: rig.h:1162
unsigned freq
Definition: rig.h:1193
ptt_t
PTT status.
Definition: rig.h:483
float min
Definition: rig.h:634
vfo_op_t rig_parse_vfo_op(const char *s)
Convert alpha string to enum RIG_OP_...
Definition: misc.c:920
int rig_close(RIG *rig)
close the communication to the rig
Definition: rig.c:891
int bank_num
Definition: rig.h:1147
Definition: rig.h:801
int write_delay
Definition: rig.h:1665
Definition: rig.h:802
unsigned tx_freq
Definition: rig.h:1197
int timeout
Definition: rig.h:1672
int rig_set_freq_callback(RIG *rig, freq_cb_t cb, char *arg)
set the callback for freq events
Definition: event.c:526
rmode_t modes
Definition: rig.h:1100
unsigned dcs_code
Definition: rig.h:1212
struct freq_range_list freq_range_t
Frequency range.
struct tuning_step_list tuning_steps[20]
Definition: rig.h:1741
Definition: rig.h:218
Definition: rig.h:150
dcd_e
DCD status.
Definition: rig.h:456
Definition: rig.h:473
setting_t amp_parse_level(const char *s)
Convert alpha string to enum AMP_LEVEL_...
Definition: misc.c:734
vfo_t rig_parse_vfo(const char *s)
Convert alpha string to enum RIG_VFO_...
Definition: misc.c:477
rig_type_t
Rig type flags.
Definition: rig.h:248
char * freq_arg
Definition: rig.h:1832
char channel_desc[30]
Definition: rig.h:1174
Definition: rig.h:559
FILE * rig_set_debug_file(FILE *stream)
change stderr to some different output
Definition: debug.c:291
unsigned int vfo_t
VFO definition.
Definition: rig.h:369
int preamp[8]
Definition: rig.h:1431
int rig_get_ext_func(RIG *rig, vfo_t vfo, token_t token, int *status)
get the value of a function extra parameter
Definition: settings.c:833
int rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
get the value of a level
Definition: settings.c:147
Definition: rig.h:752
token_t rig_token_lookup(RIG *rig, const char *name)
lookup a token id
Definition: conf.c:983
cal_table_float_t swr_cal
Definition: rig.h:1468
int hl_usleep(useconds_t usec)
provide sleep and usleep replacements
Definition: sleep.c:53
unsigned width
Definition: rig.h:1195
int conf
Definition: rig.h:1699
ptt_cb_t ptt_event
Definition: rig.h:1837
Definition: rig.h:1238
Definition: rig.h:468
Definition: rig.h:558
int rig_need_debug(enum rig_debug_level_e debug_level)
Useful for dump_hex, etc.
Definition: debug.c:131
Definition: rig.h:503
enum rig_conf_e type
Definition: rig.h:631
Definition: rig.h:148
vfo_t vfo
Definition: rig.h:1042
Definition: rig.h:120
int rig_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code)
get the current encoding DCS code
Definition: tones.c:292
int data_bits
Definition: rig.h:1680
const char * rig_strptrshift(rptr_shift_t)
convert enum RIG_RPT_SHIFT_... to printable character
Definition: misc.c:1042
freq_t tx_freq
Definition: rig.h:1154
const struct confparams * cfgparams
Definition: rig.h:1475
vfo_t tx_vfo
Definition: rig.h:1159
mode_cb_t mode_event
Definition: rig.h:1833
Definition: rig.h:560
Definition: rig.h:759
int endc
Definition: rig.h:1263
Definition: rig.h:231
int rig_get_chan_all(RIG *rig, channel_t chans[])
get all channel data
Definition: mem.c:1221
cal_table_float_t rfpower_meter_cal
Definition: rig.h:1470
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:1320
char pathname[512]
Definition: rig.h:1675
Definition: rig.h:779
Definition: rig.h:500
Definition: rig.h:119
tone_t dcs_sql
Definition: rig.h:1171
Definition: rig.h:1240
int rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
set a radio level setting
Definition: settings.c:77
uint64_t setting_t
Setting.
Definition: rig.h:822
int twiddle_timeout
Definition: rig.h:1792
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:702
enum serial_handshake_e serial_handshake
Definition: rig.h:1406
cal_table_t str_cal
Definition: rig.h:1745
dcd_cb_t dcd_event
Definition: rig.h:1839
Definition: rig.h:655
int iface
Definition: rig.h:1700
struct filter_list filters[60]
Definition: rig.h:1465
int retry
Definition: rig.h:1673
Definition: rig.h:578
const struct confparams * extlevels
Definition: rig.h:1424
Definition: rig.h:579
struct hamlib_port::@20::@22 parallel
Definition: rig.h:615
unsigned ext_levels
Definition: rig.h:1217
split_t split
Definition: rig.h:1158
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:1519
Definition: rig.h:281
enum dcd_e dcd_t
DCD status.
Definition: rig.h:114
int targetable_vfo
Definition: rig.h:1441
serial_control_state_e
Serial control state.
Definition: rig.h:238
Definition: rig.h:761
Definition: rig.h:303
freq_range_t tx_range_list2[30]
Definition: rig.h:1456
Definition: rig.h:749
pbwidth_t rig_passband_narrow(RIG *rig, rmode_t mode)
get the narrow passband of a mode
Definition: rig.c:1599
int rig_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
perform Memory/VFO operations
Definition: rig.c:4144
struct filter_list filters[60]
Definition: rig.h:1743
shortfreq_t max_xit
Definition: rig.h:1750
Definition: rig.h:553
Definition: rig.h:239
Definition: rig.h:253
Definition: rig.h:516
Definition: rig.h:767
int serial_rate_max
Definition: rig.h:1402
int rig_set_dcd_callback(RIG *rig, dcd_cb_t cb, char *arg)
set the callback for dcd events
Definition: event.c:646
Port definition.
Definition: rig.h:1655
value_t max
Definition: rig.h:1296
int preamp[8]
Definition: rig.h:1755
Definition: rig.h:750
unsigned scan_group
Definition: rig.h:1214
int rig_set_chan_all_cb(RIG *rig, chan_cb_t chan_cb, char *arg)
set all channel data, by callback
Definition: mem.c:1093
setting_t has_get_func
Definition: rig.h:1413
int rig_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts)
get the current Tuning Step
Definition: rig.c:3579
Definition: rig.h:514
Definition: rig.h:526
int bank_qty
Definition: rig.h:1444
const char * rig_strscan(scan_t scan)
Convert enum RIG_SCAN_... to alpha string.
Definition: misc.c:1014
int rig_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
set the split mode
Definition: rig.c:3080
int rig_set_powerstat(RIG *rig, powerstat_t status)
turn on/off the radio
Definition: rig.c:3951
Definition: rig.h:230
setting_t has_set_func
Definition: rig.h:1414
Configuration parameter structure.
Definition: rig.h:625
uint64_t rmode_t
Radio mode.
Definition: rig.h:945
tone_t ctcss_sql
Definition: rig.h:1169
int rig_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
set the Tuning Step
Definition: rig.c:3511
Definition: rig.h:476
Definition: rig.h:196
Definition: rig.h:209
int rig_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
set the repeater offset
Definition: rig.c:2392
int rig_set_channel(RIG *rig, const channel_t *chan)
set channel data
Definition: mem.c:688
Definition: rig.h:575
Definition: rig.h:221
Definition: rig.h:746
const char * label
Definition: rig.h:628
int val
Definition: rig.h:1313
int rig_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
set the RIT
Definition: rig.c:3239
vfo_op_t vfo_ops
Definition: rig.h:1439
Definition: rig.h:757
Definition: rig.h:497
Definition: rig.h:768
ant_t ant
Definition: rig.h:1043
cal_table_float_t alc_cal
Definition: rig.h:1469
enum serial_control_state_e rts_state
Definition: rig.h:1684
int rig_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
set CTCSS sub-tone frequency
Definition: tones.c:100
const char * priv
Definition: rig.h:1476
rig_port_e
Port type.
Definition: rig.h:195
int rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
set the split frequencies
Definition: rig.c:2528
Definition: rig.h:200
Definition: rig.h:151
hamlib_port_t dcdport
Definition: rig.h:1733
channel_cap_t mem_caps
Definition: rig.h:1266
enum serial_parity_e serial_parity
Definition: rig.h:1405
int rig_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
get the current RIT offset
Definition: rig.c:3307
setting_t has_get_parm
Definition: rig.h:1417
Definition: rig.h:471
int rig_get_channel(RIG *rig, channel_t *chan)
get channel data
Definition: mem.c:840
int rig_set_ptt_callback(RIG *rig, ptt_cb_t cb, char *arg)
set the callback for ptt events
Definition: event.c:616
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:153
int comm_state
Definition: rig.h:1776
const char * rig_get_info(RIG *rig)
get general information from the radio
Definition: rig.c:4622
Definition: rig.h:1237
float max
Definition: rig.h:635
int rig_get_vfo(RIG *rig, vfo_t *vfo)
get the current VFO
Definition: rig.c:1760
void rig_debug(enum rig_debug_level_e debug_level, const char *fmt,...)
Default is debugging messages are done through stderr.
Definition: debug.c:167
const struct confparams * extparms
Definition: rig.h:1423
rmode_t current_mode
Definition: rig.h:1783
unsigned dcs_sql
Definition: rig.h:1213
const char * clone_combo_get
Definition: rig.h:1645
Definition: rig.h:501
char * mode_arg
Definition: rig.h:1834
const char * version
Definition: rig.h:1392
char * vendor_name
Definition: rig.h:1702
Definition: rig.h:257
rptr_shift_t rptr_shift
Definition: rig.h:1161
Definition: rig.h:580
double vfo_comp
Definition: rig.h:1735
Definition: rig.h:762
Definition: rig.h:577

Generated by doxygen 1.8.15

Hamlib documentation for version 4.0~git -- Sat Apr 4 2020 16:38:14
Project page: http://www.hamlib.org