Hamlib  4.2
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 #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
28 
29 #include <stdio.h>
30 #include <stdarg.h>
31 #include <string.h>
32 #include <inttypes.h>
33 #include <time.h>
34 
35 /* Rig list is in a separate file so as not to mess up w/ this one */
36 #include <hamlib/riglist.h>
37 
51 /* __BEGIN_DECLS should be used at the beginning of your declarations,
52  * so that C++ compilers don't mangle their names. Use __END_DECLS at
53  * the end of C declarations. */
55 #undef __BEGIN_DECLS
56 #undef __END_DECLS
57 #ifdef __cplusplus
58 # define __BEGIN_DECLS extern "C" {
59 # define __END_DECLS }
60 #else
61 # define __BEGIN_DECLS /* empty */
62 # define __END_DECLS /* empty */
63 #endif
65 
66 /* HAMLIB_PARAMS is a macro used to wrap function prototypes, so that compilers
67  * that don't understand ANSI C prototypes still work, and ANSI C
68  * compilers can issue warnings about type mismatches. */
70 #undef HAMLIB_PARAMS
71 #if defined (__STDC__) \
72  || defined (_AIX) \
73  || (defined (__mips) && defined (_SYSTYPE_SVR4)) \
74  || defined(__CYGWIN__) \
75  || defined(_WIN32) \
76  || defined(__cplusplus)
77 # define HAMLIB_PARAMS(protos) protos
78 # define rig_ptr_t void *
79 # define amp_ptr_t void *
80 #else
81 # define HAMLIB_PARAMS(protos) ()
82 # define rig_ptr_t char *
83 # define amp_ptr_t char *
84 #endif
86 
87 #include <hamlib/rig_dll.h>
88 
89 #ifndef SWIGLUA
91 #define CONSTANT_64BIT_FLAG(BIT) (1ull << (BIT))
93 #else
94 /* SWIG's older Lua generator doesn't grok ull due to Lua using a
95  double-precision floating point type internally for number
96  representations (max 53 bits of precision) so makes a string
97  constant from a constant number literal using ull */
98 // #define CONSTANT_64BIT_FLAG(BIT) (1 << (BIT))
99 // #define SWIGLUAHIDE
100 /* But this appears to have been fixed so we'll use the correct one now
101  If you have the older version of SWIG comment out this line and use
102  the two above */
103 // This 1ul definition works on swig 4.0.1 and lua 5.3.5
104 #define CONSTANT_64BIT_FLAG(BIT) (1ul << (BIT))
105 #endif
106 
107 __BEGIN_DECLS
108 
110 extern HAMLIB_EXPORT_VAR(const char) hamlib_version[];
111 extern HAMLIB_EXPORT_VAR(const char) hamlib_copyright[];
112 extern HAMLIB_EXPORT_VAR(const char *) hamlib_version2;
113 extern HAMLIB_EXPORT_VAR(const char *) hamlib_copyright2;
115 
123  RIG_OK = 0,
140  RIG_EDOM
141 };
142 
148 #define RIG_IS_SOFT_ERRCODE(errcode) (errcode == RIG_EINVAL || errcode == RIG_ENIMPL || errcode == RIG_ERJCTED \
149  || errcode == RIG_ETRUNC || errcode == RIG_ENAVAIL || errcode == RIG_ENTARGET \
150  || errcode == RIG_EVFO || errcode == RIG_EDOM)
151 
155 #define NETRIGCTL_RET "RPRT "
156 
157 
173 };
174 
175 
176 /* --------------- Rig capabilities -----------------*/
177 
178 /* Forward struct references */
179 
180 struct rig;
181 struct rig_state;
182 
186 typedef struct s_rig RIG;
187 
189 #define HAMLIB_RIGNAMSIZ 30
190 #define HAMLIB_RIGVERSIZ 8
191 #define HAMLIB_FILPATHLEN 512
192 #define HAMLIB_FRQRANGESIZ 30
193 #define HAMLIB_MAXCHANDESC 30 /* describe channel eg: "WWV 5Mhz" */
194 #define HAMLIB_TSLSTSIZ 20 /* max tuning step list size, zero ended */
195 #define HAMLIB_FLTLSTSIZ 60 /* max mode/filter list size, zero ended */
196 #define HAMLIB_MAXDBLSTSIZ 8 /* max preamp/att levels supported, zero ended */
197 #define HAMLIB_CHANLSTSIZ 16 /* max mem_list size, zero ended */
198 #define HAMLIB_MAX_CAL_LENGTH 32 /* max calibration plots in cal_table_t */
199 #define HAMLIB_MAX_MODES 63
200 #define HAMLIB_MAX_VFOS 31
201 #define HAMLIB_MAX_ROTORS 63
202 #define HAMLIB_MAX_VFO_OPS 31
203 #define HAMLIB_MAX_RSCANS 31
205 
206 
217 #define CTCSS_LIST_SIZE 60
218 #define DCS_LIST_SIZE 128
219 typedef unsigned int tone_t;
220 
221 
225 typedef enum rig_port_e {
241 
242 
252 };
253 
254 
262 };
263 
264 
272 };
273 
274 
278 typedef enum {
279  RIG_FLAG_RECEIVER = (1 << 1),
280  RIG_FLAG_TRANSMITTER = (1 << 2),
281  RIG_FLAG_SCANNER = (1 << 3),
282  RIG_FLAG_MOBILE = (1 << 4),
283  RIG_FLAG_HANDHELD = (1 << 5),
284  RIG_FLAG_COMPUTER = (1 << 6),
285  RIG_FLAG_TRUNKING = (1 << 7),
286  RIG_FLAG_APRS = (1 << 8),
287  RIG_FLAG_TNC = (1 << 9),
288  RIG_FLAG_DXCLUSTER = (1 << 10),
289  RIG_FLAG_TUNER = (1 << 11)
291 
293 #define RIG_FLAG_TRANSCEIVER (RIG_FLAG_RECEIVER|RIG_FLAG_TRANSMITTER)
294 #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)
295 
296 #define RIG_TYPE_OTHER 0
297 #define RIG_TYPE_TRANSCEIVER RIG_FLAG_TRANSCEIVER
298 #define RIG_TYPE_HANDHELD (RIG_FLAG_TRANSCEIVER|RIG_FLAG_HANDHELD)
299 #define RIG_TYPE_MOBILE (RIG_FLAG_TRANSCEIVER|RIG_FLAG_MOBILE)
300 #define RIG_TYPE_RECEIVER RIG_FLAG_RECEIVER
301 #define RIG_TYPE_PCRECEIVER (RIG_FLAG_COMPUTER|RIG_FLAG_RECEIVER)
302 #define RIG_TYPE_SCANNER (RIG_FLAG_SCANNER|RIG_FLAG_RECEIVER)
303 #define RIG_TYPE_TRUNKSCANNER (RIG_TYPE_SCANNER|RIG_FLAG_TRUNKING)
304 #define RIG_TYPE_COMPUTER (RIG_FLAG_TRANSCEIVER|RIG_FLAG_COMPUTER)
305 #define RIG_TYPE_TUNER RIG_FLAG_TUNER
307 
308 
318  /* RIG_STATUS_NEW * *!< Initial release of code
319  * !! Use of RIG_STATUS_NEW is deprecated. Do not use it anymore */
320 };
321 
326 #define RIG_STATUS_NEW RIG_STATUS_UNTESTED
327 
328 
332 typedef enum {
337 
338 
342 typedef enum {
344  RIG_SPLIT_ON
346 
347 
353 typedef double freq_t;
354 
358 #define PRIfreq ".0f"
359 
363 #define SCNfreq "lf"
367 #define FREQFMT SCNfreq
368 
369 
375 typedef signed long shortfreq_t;
376 
378 #define Hz(f) ((freq_t)(f))
380 #define kHz(f) ((freq_t)((f)*(freq_t)1000))
382 #define MHz(f) ((freq_t)((f)*(freq_t)1000000))
384 #define GHz(f) ((freq_t)((f)*(freq_t)1000000000))
385 
387 #define s_Hz(f) ((shortfreq_t)(f))
389 #define s_kHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000))
391 #define s_MHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000))
393 #define s_GHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000000))
394 
396 #define RIG_FREQ_NONE Hz(0)
397 
398 
413 typedef unsigned int vfo_t;
414 
417 #define RIG_VFO_N(n) ((vfo_t)(1u<<(n)))
418 
420 #define RIG_VFO_NONE 0
421 
423 #define RIG_VFO_A RIG_VFO_N(0)
424 
426 #define RIG_VFO_B RIG_VFO_N(1)
427 
429 #define RIG_VFO_C RIG_VFO_N(2)
430 
431 // Any addition VFOS need to go from 3-20
432 // To maintain backward compatibility these values cannot change
433 
435 #define RIG_VFO_SUB_A RIG_VFO_N(21)
436 
438 #define RIG_VFO_SUB_B RIG_VFO_N(22)
439 
441 #define RIG_VFO_SUB_C RIG_VFO_N(3)
442 
444 #define RIG_VFO_MAIN_A RIG_VFO_N(23)
445 
447 #define RIG_VFO_MAIN_B RIG_VFO_N(24)
448 
450 #define RIG_VFO_MAIN_C RIG_VFO_N(4)
451 
453 #define RIG_VFO_SUB RIG_VFO_N(25)
454 
456 #define RIG_VFO_MAIN RIG_VFO_N(26)
457 
459 #define RIG_VFO_VFO RIG_VFO_N(27)
460 
462 #define RIG_VFO_MEM RIG_VFO_N(28)
463 
465 #define RIG_VFO_CURR RIG_VFO_N(29)
466 
468 #define RIG_VFO_TX_FLAG RIG_VFO_N(30)
469 
471 #define RIG_VFO_ALL RIG_VFO_N(31)
472 
473 // we can also use RIG_VFO_N(31) if needed
474 
475 // Misc VFO Macros
476 
478 #define RIG_VFO_TX_VFO(v) ((v)|RIG_VFO_TX_FLAG)
479 
481 #define RIG_VFO_TX RIG_VFO_TX_VFO(RIG_VFO_CURR)
482 
484 #define RIG_VFO_RX RIG_VFO_CURR
485 
486 
487 /*
488  * targetable bitfields, for internal use.
489  * In rig.c lack of a flag will case a VFO change if needed
490  * So setting this flag will mean the backend handles any VFO needs
491  * For many rigs RITXIT, PTT, MEM, and BANK are non-VFO commands so need these flags to avoid unnecessary VFO swapping
492  */
494 #define RIG_TARGETABLE_NONE 0
495 #define RIG_TARGETABLE_FREQ (1<<0)
496 #define RIG_TARGETABLE_MODE (1<<1) // mode by vfo or same mode on both vfos
497 #define RIG_TARGETABLE_PURE (1<<2) // deprecated -- not used -- reuse it
498 #define RIG_TARGETABLE_TONE (1<<3)
499 #define RIG_TARGETABLE_FUNC (1<<4)
500 #define RIG_TARGETABLE_LEVEL (1<<5)
501 #define RIG_TARGETABLE_RITXIT (1<<6)
502 #define RIG_TARGETABLE_PTT (1<<7)
503 #define RIG_TARGETABLE_MEM (1<<8)
504 #define RIG_TARGETABLE_BANK (1<<9)
505 #define RIG_TARGETABLE_ANT (1<<10)
506 #define RIG_TARGETABLE_ROOFING (1<<11) // roofing filter targetable by VFO
507 #define RIG_TARGETABLE_COMMON (RIG_TARGETABLE_RITXIT | RIG_TARGETABLE_PTT | RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK)
508 #define RIG_TARGETABLE_ALL 0x7fffffff
510 //
511 //
512 // Newer Icoms like the 9700 and 910 have VFOA/B on both Main & Sub
513 // Compared to older rigs which have one or the other
514 // So we need to distinguish between them
516 #define VFO_HAS_A_B ((rig->state.vfo_list & (RIG_VFO_A|RIG_VFO_B)) == (RIG_VFO_A|RIG_VFO_B))
517 #define VFO_HAS_MAIN_SUB ((rig->state.vfo_list & (RIG_VFO_MAIN|RIG_VFO_SUB)) == (RIG_VFO_MAIN|RIG_VFO_SUB))
518 #define VFO_HAS_MAIN_SUB_ONLY ((!VFO_HAS_A_B) & VFO_HAS_MAIN_SUB)
519 #define VFO_HAS_MAIN_SUB_A_B_ONLY (VFO_HAS_A_B & VFO_HAS_MAIN_SUB)
520 #define VFO_HAS_A_B_ONLY (VFO_HAS_A_B & (!VFO_HAS_MAIN_SUB))
521 #define VFO_DUAL (RIG_VFO_MAIN_A|RIG_VFO_MAIN_B|RIG_VFO_SUB_A|RIG_VFO_SUB_B)
522 #define VFO_HAS_DUAL ((rig->state.vfo_list & VFO_DUAL) == VFO_DUAL)
524 
529 #define RIG_PASSBAND_NORMAL s_Hz(0)
530 
534 #define RIG_PASSBAND_NOCHANGE s_Hz(-1)
535 
541 
542 
546 typedef enum dcd_e {
548  RIG_DCD_ON
550 
551 
557 typedef enum {
567 } dcd_type_t;
568 
569 
573 typedef enum {
579 
580 
586 typedef enum {
596 } ptt_type_t;
597 
598 
602 typedef enum {
604  RIG_POWER_ON = (1 << 0),
605  RIG_POWER_STANDBY = (1 << 1),
606  RIG_POWER_OPERATE = (1 << 2),
607  RIG_POWER_UNKNOWN = (1 << 3)
609 
610 
614 typedef enum {
616  RIG_RESET_SOFT = (1 << 0),
617  RIG_RESET_VFO = (1 << 1),
618  RIG_RESET_MCALL = (1 << 2),
619  RIG_RESET_MASTER = (1 << 3)
621 
622 
638 typedef enum {
640  RIG_OP_CPY = (1 << 0),
641  RIG_OP_XCHG = (1 << 1),
642  RIG_OP_FROM_VFO = (1 << 2),
643  RIG_OP_TO_VFO = (1 << 3),
644  RIG_OP_MCL = (1 << 4),
645  RIG_OP_UP = (1 << 5),
646  RIG_OP_DOWN = (1 << 6),
647  RIG_OP_BAND_UP = (1 << 7),
648  RIG_OP_BAND_DOWN = (1 << 8),
649  RIG_OP_LEFT = (1 << 9),
650  RIG_OP_RIGHT = (1 << 10),
651  RIG_OP_TUNE = (1 << 11),
652  RIG_OP_TOGGLE = (1 << 12)
654 
655 
664 typedef enum {
666  RIG_SCAN_MEM = (1 << 0),
667  RIG_SCAN_SLCT = (1 << 1),
668  RIG_SCAN_PRIO = (1 << 2),
669  RIG_SCAN_PROG = (1 << 3),
670  RIG_SCAN_DELTA = (1 << 4),
671  RIG_SCAN_VFO = (1 << 5),
672  RIG_SCAN_PLT = (1 << 6),
673  RIG_SCAN_STOP = (1 << 7)
675 
676 
680 typedef long token_t;
681 
682 
684 #define RIG_CONF_END 0
686 
687 
701 /* strongly inspired from soundmodem. Thanks Thomas! */
709 };
710 
712 #define RIG_COMBO_MAX 16
713 #define RIG_BIN_MAX 80
715 
719 struct confparams {
721  const char *name;
722  const char *label;
723  const char *tooltip;
724  const char *dflt;
725  enum rig_conf_e type;
726  union {
727  struct {
728  float min;
729  float max;
730  float step;
731  } n;
732  struct {
733  const char *combostr[RIG_COMBO_MAX];
734  } c;
735  } u;
736 };
737 
738 
744 typedef enum {
747  RIG_ANN_FREQ = (1 << 0),
748  RIG_ANN_RXMODE = (1 << 1),
749  RIG_ANN_CW = (1 << 2),
750  RIG_ANN_ENG = (1 << 3),
751  RIG_ANN_JAP = (1 << 4)
753 
754 
801 typedef unsigned int ant_t;
802 
803 #define RIG_ANT_NONE 0
804 #define RIG_ANT_N(n) ((ant_t)1<<(n))
805 #define RIG_ANT_1 RIG_ANT_N(0)
806 #define RIG_ANT_2 RIG_ANT_N(1)
807 #define RIG_ANT_3 RIG_ANT_N(2)
808 #define RIG_ANT_4 RIG_ANT_N(3)
809 #define RIG_ANT_5 RIG_ANT_N(4)
810 
811 #define RIG_ANT_UNKNOWN RIG_ANT_N(30)
812 #define RIG_ANT_CURR RIG_ANT_N(31)
813 
814 #define RIG_ANT_MAX 32
815 
816 
820 /* TODO: kill me, and replace by real AGC delay */
822  RIG_AGC_OFF = 0,
823  RIG_AGC_SUPERFAST,
824  RIG_AGC_FAST,
825  RIG_AGC_SLOW,
827  RIG_AGC_MEDIUM,
828  RIG_AGC_AUTO
829 };
830 
832 #define RIG_AGC_LAST RIG_AGC_AUTO
834 
839  RIG_METER_NONE = 0, /*< No display meter */
840  RIG_METER_SWR = (1 << 0), /*< Stationary Wave Ratio */
841  RIG_METER_COMP = (1 << 1), /*< Compression level */
842  RIG_METER_ALC = (1 << 2), /*< ALC */
843  RIG_METER_IC = (1 << 3), /*< IC */
844  RIG_METER_DB = (1 << 4), /*< DB */
845  RIG_METER_PO = (1 << 5), /*< Power Out */
846  RIG_METER_VDD = (1 << 6), /*< Final Amp Voltage */
847  RIG_METER_TEMP = (1 << 7) /*< Final Amp Voltage */
848 };
849 
850 
856 typedef union {
857  signed int i;
858  float f;
859  char *s;
860  const char *cs;
862  struct {
863  int l;
864  unsigned char *d; /* Pointer to data buffer */
865  } b;
867 } value_t;
868 
869 
878 typedef uint64_t rig_level_e;
879 #define RIG_LEVEL_NONE 0
880 #define RIG_LEVEL_PREAMP CONSTANT_64BIT_FLAG(0)
881 #define RIG_LEVEL_ATT CONSTANT_64BIT_FLAG(1)
882 #define RIG_LEVEL_VOXDELAY CONSTANT_64BIT_FLAG(2)
883 #define RIG_LEVEL_AF CONSTANT_64BIT_FLAG(3)
884 #define RIG_LEVEL_RF CONSTANT_64BIT_FLAG(4)
885 #define RIG_LEVEL_SQL CONSTANT_64BIT_FLAG(5)
886 #define RIG_LEVEL_IF CONSTANT_64BIT_FLAG(6)
887 #define RIG_LEVEL_APF CONSTANT_64BIT_FLAG(7)
888 #define RIG_LEVEL_NR CONSTANT_64BIT_FLAG(8)
889 #define RIG_LEVEL_PBT_IN CONSTANT_64BIT_FLAG(9)
890 #define RIG_LEVEL_PBT_OUT CONSTANT_64BIT_FLAG(10)
891 #define RIG_LEVEL_CWPITCH CONSTANT_64BIT_FLAG(11)
892 #define RIG_LEVEL_RFPOWER CONSTANT_64BIT_FLAG(12)
893 #define RIG_LEVEL_MICGAIN CONSTANT_64BIT_FLAG(13)
894 #define RIG_LEVEL_KEYSPD CONSTANT_64BIT_FLAG(14)
895 #define RIG_LEVEL_NOTCHF CONSTANT_64BIT_FLAG(15)
896 #define RIG_LEVEL_COMP CONSTANT_64BIT_FLAG(16)
897 #define RIG_LEVEL_AGC CONSTANT_64BIT_FLAG(17)
898 #define RIG_LEVEL_BKINDL CONSTANT_64BIT_FLAG(18)
899 #define RIG_LEVEL_BALANCE CONSTANT_64BIT_FLAG(19)
900 #define RIG_LEVEL_METER CONSTANT_64BIT_FLAG(20)
901 #define RIG_LEVEL_VOXGAIN CONSTANT_64BIT_FLAG(21)
902 #define RIG_LEVEL_ANTIVOX CONSTANT_64BIT_FLAG(22)
903 #define RIG_LEVEL_SLOPE_LOW CONSTANT_64BIT_FLAG(23)
904 #define RIG_LEVEL_SLOPE_HIGH CONSTANT_64BIT_FLAG(24)
905 #define RIG_LEVEL_BKIN_DLYMS CONSTANT_64BIT_FLAG(25)
908 #define RIG_LEVEL_RAWSTR CONSTANT_64BIT_FLAG(26)
909 //#define RIG_LEVEL_SQLSTAT CONSTANT_64BIT_FLAG(27) /*!< \c SQLSTAT -- SQL status, arg int (open=1/closed=0). Deprecated, use get_dcd instead */
910 #define RIG_LEVEL_SWR CONSTANT_64BIT_FLAG(28)
911 #define RIG_LEVEL_ALC CONSTANT_64BIT_FLAG(29)
912 #define RIG_LEVEL_STRENGTH CONSTANT_64BIT_FLAG(30)
913  /* RIG_LEVEL_BWC (1<<31) */
914 #define RIG_LEVEL_RFPOWER_METER CONSTANT_64BIT_FLAG(32)
915 #define RIG_LEVEL_COMP_METER CONSTANT_64BIT_FLAG(33)
916 #define RIG_LEVEL_VD_METER CONSTANT_64BIT_FLAG(34)
917 #define RIG_LEVEL_ID_METER CONSTANT_64BIT_FLAG(35)
919 #define RIG_LEVEL_NOTCHF_RAW CONSTANT_64BIT_FLAG(36)
920 #define RIG_LEVEL_MONITOR_GAIN CONSTANT_64BIT_FLAG(37)
921 #define RIG_LEVEL_NB CONSTANT_64BIT_FLAG(38)
922 #define RIG_LEVEL_RFPOWER_METER_WATTS CONSTANT_64BIT_FLAG(39)
923 #define RIG_LEVEL_40 CONSTANT_64BIT_FLAG(40)
924 #define RIG_LEVEL_41 CONSTANT_64BIT_FLAG(41)
925 #define RIG_LEVEL_42 CONSTANT_64BIT_FLAG(42)
926 #define RIG_LEVEL_43 CONSTANT_64BIT_FLAG(43)
927 #define RIG_LEVEL_44 CONSTANT_64BIT_FLAG(44)
928 #define RIG_LEVEL_45 CONSTANT_64BIT_FLAG(45)
929 #define RIG_LEVEL_46 CONSTANT_64BIT_FLAG(46)
930 #define RIG_LEVEL_47 CONSTANT_64BIT_FLAG(47)
931 #define RIG_LEVEL_48 CONSTANT_64BIT_FLAG(48)
932 #define RIG_LEVEL_49 CONSTANT_64BIT_FLAG(49)
933 #define RIG_LEVEL_50 CONSTANT_64BIT_FLAG(50)
934 #define RIG_LEVEL_51 CONSTANT_64BIT_FLAG(51)
935 #define RIG_LEVEL_52 CONSTANT_64BIT_FLAG(52)
936 #define RIG_LEVEL_53 CONSTANT_64BIT_FLAG(53)
937 #define RIG_LEVEL_54 CONSTANT_64BIT_FLAG(54)
938 #define RIG_LEVEL_55 CONSTANT_64BIT_FLAG(55)
939 #define RIG_LEVEL_56 CONSTANT_64BIT_FLAG(56)
940 #define RIG_LEVEL_57 CONSTANT_64BIT_FLAG(57)
941 #define RIG_LEVEL_58 CONSTANT_64BIT_FLAG(58)
942 #define RIG_LEVEL_59 CONSTANT_64BIT_FLAG(59)
943 #define RIG_LEVEL_60 CONSTANT_64BIT_FLAG(60)
944 #define RIG_LEVEL_61 CONSTANT_64BIT_FLAG(61)
945 #define RIG_LEVEL_62 CONSTANT_64BIT_FLAG(62)
946 #define RIG_LEVEL_63 CONSTANT_64BIT_FLAG(63)
949 #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_RFPOWER_METER_WATTS|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB)
950 
951 #define RIG_LEVEL_READONLY_LIST (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)
952 
953 #define RIG_LEVEL_IS_FLOAT(l) ((l)&RIG_LEVEL_FLOAT_LIST)
954 #define RIG_LEVEL_SET(l) ((l)&~RIG_LEVEL_READONLY_LIST)
956 
957 
968  RIG_PARM_ANN = (1 << 0),
969  RIG_PARM_APO = (1 << 1),
970  RIG_PARM_BACKLIGHT = (1 << 2),
971  RIG_PARM_BEEP = (1 << 4),
972  RIG_PARM_TIME = (1 << 5),
973  RIG_PARM_BAT = (1 << 6),
974  RIG_PARM_KEYLIGHT = (1 << 7),
975  RIG_PARM_SCREENSAVER = (1 << 8)
976 };
977 
979 #define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT)
980 #define RIG_PARM_READONLY_LIST (RIG_PARM_BAT)
981 
982 #define RIG_PARM_IS_FLOAT(l) ((l)&RIG_PARM_FLOAT_LIST)
983 #define RIG_PARM_SET(l) ((l)&~RIG_PARM_READONLY_LIST)
985 
992 typedef uint64_t setting_t;
993 
998 #define RIG_SETTING_MAX 64
999 
1013 #define RIG_TRN_OFF 0
1014 #define RIG_TRN_RIG 1
1015 #define RIG_TRN_POLL 2
1016 
1017 
1026 /*
1027  * The C standard dictates that an enum constant is a 32 bit signed integer.
1028  * Setting a constant's bit 31 created a negative value that on amd64 had the
1029  * upper 32 bits set as well when assigned to the misc.c:rig_func_str structure.
1030  * This caused misc.c:rig_strfunc() to fail its comparison for RIG_FUNC_XIT
1031  * on amd64 (x86_64). To use bit 31 as an unsigned long, preprocessor macros
1032  * have been used instead as a 'const unsigned long' which cannot be used to
1033  * initialize the rig_func_str.func members. TNX KA6MAL, AC6SL. - N0NB
1034  */
1035 #define RIG_FUNC_NONE 0
1036 #define RIG_FUNC_FAGC CONSTANT_64BIT_FLAG (0)
1037 #define RIG_FUNC_NB CONSTANT_64BIT_FLAG (1)
1038 #define RIG_FUNC_COMP CONSTANT_64BIT_FLAG (2)
1039 #define RIG_FUNC_VOX CONSTANT_64BIT_FLAG (3)
1040 #define RIG_FUNC_TONE CONSTANT_64BIT_FLAG (4)
1041 #define RIG_FUNC_TSQL CONSTANT_64BIT_FLAG (5)
1042 #define RIG_FUNC_SBKIN CONSTANT_64BIT_FLAG (6)
1043 #define RIG_FUNC_FBKIN CONSTANT_64BIT_FLAG (7)
1044 #define RIG_FUNC_ANF CONSTANT_64BIT_FLAG (8)
1045 #define RIG_FUNC_NR CONSTANT_64BIT_FLAG (9)
1046 #define RIG_FUNC_AIP CONSTANT_64BIT_FLAG (10)
1047 #define RIG_FUNC_APF CONSTANT_64BIT_FLAG (11)
1048 #define RIG_FUNC_MON CONSTANT_64BIT_FLAG (12)
1049 #define RIG_FUNC_MN CONSTANT_64BIT_FLAG (13)
1050 #define RIG_FUNC_RF CONSTANT_64BIT_FLAG (14)
1051 #define RIG_FUNC_ARO CONSTANT_64BIT_FLAG (15)
1052 #define RIG_FUNC_LOCK CONSTANT_64BIT_FLAG (16)
1053 #define RIG_FUNC_MUTE CONSTANT_64BIT_FLAG (17)
1054 #define RIG_FUNC_VSC CONSTANT_64BIT_FLAG (18)
1055 #define RIG_FUNC_REV CONSTANT_64BIT_FLAG (19)
1056 #define RIG_FUNC_SQL CONSTANT_64BIT_FLAG (20)
1057 #define RIG_FUNC_ABM CONSTANT_64BIT_FLAG (21)
1058 #define RIG_FUNC_BC CONSTANT_64BIT_FLAG (22)
1059 #define RIG_FUNC_MBC CONSTANT_64BIT_FLAG (23)
1060 #define RIG_FUNC_RIT CONSTANT_64BIT_FLAG (24)
1061 #define RIG_FUNC_AFC CONSTANT_64BIT_FLAG (25)
1062 #define RIG_FUNC_SATMODE CONSTANT_64BIT_FLAG (26)
1063 #define RIG_FUNC_SCOPE CONSTANT_64BIT_FLAG (27)
1064 #define RIG_FUNC_RESUME CONSTANT_64BIT_FLAG (28)
1065 #define RIG_FUNC_TBURST CONSTANT_64BIT_FLAG (29)
1066 #define RIG_FUNC_TUNER CONSTANT_64BIT_FLAG (30)
1067 #define RIG_FUNC_XIT CONSTANT_64BIT_FLAG (31)
1068 #ifndef SWIGLUAHIDE
1069 /* Hide the top 32 bits from the old Lua binding as they can't be represented */
1070 #define RIG_FUNC_NB2 CONSTANT_64BIT_FLAG (32)
1071 #define RIG_FUNC_CSQL CONSTANT_64BIT_FLAG (33)
1072 #define RIG_FUNC_AFLT CONSTANT_64BIT_FLAG (34)
1073 #define RIG_FUNC_ANL CONSTANT_64BIT_FLAG (35)
1074 #define RIG_FUNC_BC2 CONSTANT_64BIT_FLAG (36)
1075 #define RIG_FUNC_DUAL_WATCH CONSTANT_64BIT_FLAG (37)
1076 #define RIG_FUNC_DIVERSITY CONSTANT_64BIT_FLAG (38)
1077 #define RIG_FUNC_DSQL CONSTANT_64BIT_FLAG (39)
1078 #define RIG_FUNC_SCEN CONSTANT_64BIT_FLAG (40)
1079 #define RIG_FUNC_SLICE CONSTANT_64BIT_FLAG (41)
1080 #define RIG_FUNC_BIT42 CONSTANT_64BIT_FLAG (42)
1081 #define RIG_FUNC_BIT43 CONSTANT_64BIT_FLAG (43)
1082 #define RIG_FUNC_BIT44 CONSTANT_64BIT_FLAG (44)
1083 #define RIG_FUNC_BIT45 CONSTANT_64BIT_FLAG (45)
1084 #define RIG_FUNC_BIT46 CONSTANT_64BIT_FLAG (46)
1085 #define RIG_FUNC_BIT47 CONSTANT_64BIT_FLAG (47)
1086 #define RIG_FUNC_BIT48 CONSTANT_64BIT_FLAG (48)
1087 #define RIG_FUNC_BIT49 CONSTANT_64BIT_FLAG (49)
1088 #define RIG_FUNC_BIT50 CONSTANT_64BIT_FLAG (50)
1089 #define RIG_FUNC_BIT51 CONSTANT_64BIT_FLAG (51)
1090 #define RIG_FUNC_BIT52 CONSTANT_64BIT_FLAG (52)
1091 #define RIG_FUNC_BIT53 CONSTANT_64BIT_FLAG (53)
1092 #define RIG_FUNC_BIT54 CONSTANT_64BIT_FLAG (54)
1093 #define RIG_FUNC_BIT55 CONSTANT_64BIT_FLAG (55)
1094 #define RIG_FUNC_BIT56 CONSTANT_64BIT_FLAG (56)
1095 #define RIG_FUNC_BIT57 CONSTANT_64BIT_FLAG (57)
1096 #define RIG_FUNC_BIT58 CONSTANT_64BIT_FLAG (58)
1097 #define RIG_FUNC_BIT59 CONSTANT_64BIT_FLAG (59)
1098 #define RIG_FUNC_BIT60 CONSTANT_64BIT_FLAG (60)
1099 #define RIG_FUNC_BIT61 CONSTANT_64BIT_FLAG (61)
1100 #define RIG_FUNC_BIT62 CONSTANT_64BIT_FLAG (62)
1101 #define RIG_FUNC_BIT63 CONSTANT_64BIT_FLAG (63)
1102 /* 63 is this highest bit number that can be used */
1103 #endif
1104 
1111 #define mW(p) ((int)(p))
1119 #define Watts(p) ((int)((p)*1000))
1126 #define W(p) Watts(p)
1127 #if 0 // deprecating kW macro as this doesn't make sense
1134 #define kW(p) ((int)((p)*1000000L))
1135 #endif
1136 
1137 
1147 typedef uint64_t rmode_t;
1148 
1149 #define RIG_MODE_NONE 0
1150 #define RIG_MODE_AM CONSTANT_64BIT_FLAG (0)
1151 #define RIG_MODE_CW CONSTANT_64BIT_FLAG (1)
1152 #define RIG_MODE_USB CONSTANT_64BIT_FLAG (2)
1153 #define RIG_MODE_LSB CONSTANT_64BIT_FLAG (3)
1154 #define RIG_MODE_RTTY CONSTANT_64BIT_FLAG (4)
1155 #define RIG_MODE_FM CONSTANT_64BIT_FLAG (5)
1156 #define RIG_MODE_WFM CONSTANT_64BIT_FLAG (6)
1157 #define RIG_MODE_CWR CONSTANT_64BIT_FLAG (7)
1158 #define RIG_MODE_RTTYR CONSTANT_64BIT_FLAG (8)
1159 #define RIG_MODE_AMS CONSTANT_64BIT_FLAG (9)
1160 #define RIG_MODE_PKTLSB CONSTANT_64BIT_FLAG (10)
1161 #define RIG_MODE_PKTUSB CONSTANT_64BIT_FLAG (11)
1162 #define RIG_MODE_PKTFM CONSTANT_64BIT_FLAG (12)
1163 #define RIG_MODE_ECSSUSB CONSTANT_64BIT_FLAG (13)
1164 #define RIG_MODE_ECSSLSB CONSTANT_64BIT_FLAG (14)
1165 #define RIG_MODE_FAX CONSTANT_64BIT_FLAG (15)
1166 #define RIG_MODE_SAM CONSTANT_64BIT_FLAG (16)
1167 #define RIG_MODE_SAL CONSTANT_64BIT_FLAG (17)
1168 #define RIG_MODE_SAH CONSTANT_64BIT_FLAG (18)
1169 #define RIG_MODE_DSB CONSTANT_64BIT_FLAG (19)
1170 #define RIG_MODE_FMN CONSTANT_64BIT_FLAG (21)
1171 #define RIG_MODE_PKTAM CONSTANT_64BIT_FLAG (22)
1172 #define RIG_MODE_P25 CONSTANT_64BIT_FLAG (23)
1173 #define RIG_MODE_DSTAR CONSTANT_64BIT_FLAG (24)
1174 #define RIG_MODE_DPMR CONSTANT_64BIT_FLAG (25)
1175 #define RIG_MODE_NXDNVN CONSTANT_64BIT_FLAG (26)
1176 #define RIG_MODE_NXDN_N CONSTANT_64BIT_FLAG (27)
1177 #define RIG_MODE_DCR CONSTANT_64BIT_FLAG (28)
1178 #define RIG_MODE_AMN CONSTANT_64BIT_FLAG (29)
1179 #define RIG_MODE_PSK CONSTANT_64BIT_FLAG (30)
1180 #define RIG_MODE_PSKR CONSTANT_64BIT_FLAG (31)
1181 #ifndef SWIGLUAHIDE
1182 /* hide the top 32 bits from the Lua binding as they will not work */
1183 #define RIG_MODE_DD CONSTANT_64BIT_FLAG (32)
1184 #define RIG_MODE_C4FM CONSTANT_64BIT_FLAG (33)
1185 #define RIG_MODE_PKTFMN CONSTANT_64BIT_FLAG (34)
1186 #define RIG_MODE_SPEC CONSTANT_64BIT_FLAG (35)
1187 #define RIG_MODE_BIT36 CONSTANT_64BIT_FLAG (36)
1188 #define RIG_MODE_BIT37 CONSTANT_64BIT_FLAG (37)
1189 #define RIG_MODE_BIT38 CONSTANT_64BIT_FLAG (38)
1190 #define RIG_MODE_BIT39 CONSTANT_64BIT_FLAG (39)
1191 #define RIG_MODE_BIT40 CONSTANT_64BIT_FLAG (40)
1192 #define RIG_MODE_BIT41 CONSTANT_64BIT_FLAG (41)
1193 #define RIG_MODE_BIT42 CONSTANT_64BIT_FLAG (42)
1194 #define RIG_MODE_BIT43 CONSTANT_64BIT_FLAG (43)
1195 #define RIG_MODE_BIT44 CONSTANT_64BIT_FLAG (44)
1196 #define RIG_MODE_BIT45 CONSTANT_64BIT_FLAG (45)
1197 #define RIG_MODE_BIT46 CONSTANT_64BIT_FLAG (46)
1198 #define RIG_MODE_BIT47 CONSTANT_64BIT_FLAG (47)
1199 #define RIG_MODE_BIT48 CONSTANT_64BIT_FLAG (48)
1200 #define RIG_MODE_BIT49 CONSTANT_64BIT_FLAG (49)
1201 #define RIG_MODE_BIT50 CONSTANT_64BIT_FLAG (50)
1202 #define RIG_MODE_BIT51 CONSTANT_64BIT_FLAG (51)
1203 #define RIG_MODE_BIT52 CONSTANT_64BIT_FLAG (52)
1204 #define RIG_MODE_BIT53 CONSTANT_64BIT_FLAG (53)
1205 #define RIG_MODE_BIT54 CONSTANT_64BIT_FLAG (54)
1206 #define RIG_MODE_BIT55 CONSTANT_64BIT_FLAG (55)
1207 #define RIG_MODE_BIT56 CONSTANT_64BIT_FLAG (56)
1208 #define RIG_MODE_BIT57 CONSTANT_64BIT_FLAG (57)
1209 #define RIG_MODE_BIT58 CONSTANT_64BIT_FLAG (58)
1210 #define RIG_MODE_BIT59 CONSTANT_64BIT_FLAG (59)
1211 #define RIG_MODE_BIT60 CONSTANT_64BIT_FLAG (60)
1212 #define RIG_MODE_BIT61 CONSTANT_64BIT_FLAG (61)
1213 #define RIG_MODE_BIT62 CONSTANT_64BIT_FLAG (62)
1214 #define RIG_MODE_TESTS_MAX CONSTANT_64BIT_FLAG (63)
1215 #endif
1216 
1220 #define RIG_MODE_SSB (RIG_MODE_USB|RIG_MODE_LSB)
1221 
1225 #define RIG_MODE_ECSS (RIG_MODE_ECSSUSB|RIG_MODE_ECSSLSB)
1226 
1228 #define RIG_DBLST_END 0 /* end marker in a preamp/att level list */
1229 #define RIG_IS_DBLST_END(d) ((d)==0)
1231 
1232 
1239 typedef struct freq_range_list {
1247  char *label;
1249 
1251 #define RIG_FRNG_END {Hz(0),Hz(0),RIG_MODE_NONE,0,0,RIG_VFO_NONE}
1252 #define RIG_IS_FRNG_END(r) ((r).startf == Hz(0) && (r).endf == Hz(0))
1254 
1274 };
1275 
1277 #define RIG_TS_ANY 0
1278 #define RIG_TS_END {RIG_MODE_NONE, 0}
1279 #define RIG_IS_TS_END(t) ((t).modes == RIG_MODE_NONE && (t).ts == 0)
1281 
1282 
1306 struct filter_list {
1309 };
1311 #define RIG_FLT_ANY 0
1312 #define RIG_FLT_END {RIG_MODE_NONE, 0}
1313 #define RIG_IS_FLT_END(f) ((f).modes == RIG_MODE_NONE)
1315 
1316 
1320 #define RIG_CHFLAG_NONE 0
1324 #define RIG_CHFLAG_SKIP (1<<0)
1328 #define RIG_CHFLAG_DATA (1<<1)
1332 #define RIG_CHFLAG_PSKIP (1<<2)
1333 
1338 struct ext_list {
1341 };
1342 
1344 #define RIG_EXT_END {0, {.i=0}}
1345 #define RIG_IS_EXT_END(x) ((x).token == 0)
1347 
1355 struct channel {
1357  int bank_num;
1378  tone_t ctcss_tone;
1379  tone_t ctcss_sql;
1380  tone_t dcs_code;
1381  tone_t dcs_sql;
1383  unsigned int flags;
1384  char channel_desc[HAMLIB_MAXCHANDESC];
1385  struct ext_list
1387 };
1388 
1392 typedef struct channel channel_t;
1393 
1399 struct channel_cap {
1400  unsigned bank_num: 1;
1401  unsigned vfo: 1;
1402  unsigned ant: 1;
1403  unsigned freq: 1;
1404  unsigned mode: 1;
1405  unsigned width: 1;
1407  unsigned tx_freq: 1;
1408  unsigned tx_mode: 1;
1409  unsigned tx_width: 1;
1411  unsigned split: 1;
1412  unsigned tx_vfo: 1;
1413  unsigned rptr_shift: 1;
1414  unsigned rptr_offs: 1;
1415  unsigned tuning_step: 1;
1416  unsigned rit: 1;
1417  unsigned xit: 1;
1420  unsigned ctcss_tone: 1;
1421  unsigned ctcss_sql: 1;
1422  unsigned dcs_code: 1;
1423  unsigned dcs_sql: 1;
1424  unsigned scan_group: 1;
1425  unsigned flags: 1;
1426  unsigned channel_desc: 1;
1427  unsigned ext_levels: 1;
1428 };
1429 
1433 typedef struct channel_cap channel_cap_t;
1434 
1435 
1446 typedef enum {
1456 
1457 
1471 struct chan_list {
1472  int startc;
1473  int endc;
1477 };
1478 
1480 #define RIG_CHAN_END {0,0,RIG_MTYPE_NONE}
1481 #define RIG_IS_CHAN_END(c) ((c).type == RIG_MTYPE_NONE)
1483 
1487 #define RIG_MEM_CAPS_ALL -1
1488 
1492 typedef struct chan_list chan_t;
1493 
1494 
1506 struct gran {
1510 };
1511 
1515 typedef struct gran gran_t;
1516 
1517 
1521 struct cal_table {
1522  int size;
1523  struct {
1524  int raw;
1525  int val;
1526  } table[HAMLIB_MAX_CAL_LENGTH];
1527 };
1528 
1541 typedef struct cal_table cal_table_t;
1542 
1544 #define EMPTY_STR_CAL { 0, { { 0, 0 }, } }
1546 
1547 
1552  int size;
1553  struct {
1554  int raw;
1555  float val;
1556  } table[HAMLIB_MAX_CAL_LENGTH];
1557 };
1558 
1571 typedef struct cal_table_float cal_table_float_t;
1572 
1574 #define EMPTY_FLOAT_CAL { 0, { { 0, 0f }, } }
1575 
1576 typedef int (* chan_cb_t)(RIG *, channel_t **, int, const chan_t *, rig_ptr_t);
1577 typedef int (* confval_cb_t)(RIG *,
1578  const struct confparams *,
1579  value_t *,
1580  rig_ptr_t);
1582 
1583 
1604 #define RIG_MODEL(arg) .rig_model=arg,.macro_name=#arg
1605 struct rig_caps {
1606  rig_model_t rig_model;
1607  const char *model_name;
1608  const char *mfg_name;
1609  const char *version;
1610  const char *copyright;
1611  enum rig_status_e status;
1613  int rig_type;
1614  ptt_type_t ptt_type;
1615  dcd_type_t dcd_type;
1616  rig_port_t port_type;
1618  int serial_rate_min;
1619  int serial_rate_max;
1620  int serial_data_bits;
1621  int serial_stop_bits;
1622  enum serial_parity_e serial_parity;
1623  enum serial_handshake_e serial_handshake;
1625  int write_delay;
1626  int post_write_delay;
1627  int timeout;
1628  int retry;
1630  setting_t has_get_func;
1631  setting_t has_set_func;
1632  setting_t has_get_level;
1633  setting_t has_set_level;
1634  setting_t has_get_parm;
1635  setting_t has_set_parm;
1637  gran_t level_gran[RIG_SETTING_MAX];
1638  gran_t parm_gran[RIG_SETTING_MAX];
1640  const struct confparams *extparms;
1641  const struct confparams *extlevels;
1642  const struct confparams *extfuncs;
1643  int *ext_tokens;
1645  tone_t *ctcss_list;
1646  tone_t *dcs_list;
1648  int preamp[HAMLIB_MAXDBLSTSIZ];
1649  int attenuator[HAMLIB_MAXDBLSTSIZ];
1650  shortfreq_t max_rit;
1651  shortfreq_t max_xit;
1652  shortfreq_t max_ifshift;
1654  ann_t announces;
1656  vfo_op_t vfo_ops;
1657  scan_t scan_ops;
1658  int targetable_vfo;
1659  int transceive;
1661  int bank_qty;
1662  int chan_desc_sz;
1664  chan_t chan_list[HAMLIB_CHANLSTSIZ];
1666  // As of 2020-02-12 we know of 5 models from Icom USA, EUR, ITR, TPE, KOR for the IC-9700
1667  // So we currently have 5 ranges we need to deal with
1668  // The backend for the model should fill in the label field to explain what model it is
1669  // The the IC-9700 in ic7300.c for an example
1670  freq_range_t rx_range_list1[HAMLIB_FRQRANGESIZ];
1671  freq_range_t tx_range_list1[HAMLIB_FRQRANGESIZ];
1672  freq_range_t rx_range_list2[HAMLIB_FRQRANGESIZ];
1673  freq_range_t tx_range_list2[HAMLIB_FRQRANGESIZ];
1674  freq_range_t rx_range_list3[HAMLIB_FRQRANGESIZ];
1675  freq_range_t tx_range_list3[HAMLIB_FRQRANGESIZ];
1676  freq_range_t rx_range_list4[HAMLIB_FRQRANGESIZ];
1677  freq_range_t tx_range_list4[HAMLIB_FRQRANGESIZ];
1678  freq_range_t rx_range_list5[HAMLIB_FRQRANGESIZ];
1679  freq_range_t tx_range_list5[HAMLIB_FRQRANGESIZ];
1681  struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ];
1682  struct filter_list filters[HAMLIB_FLTLSTSIZ];
1684  cal_table_t str_cal;
1685  cal_table_float_t swr_cal;
1686  cal_table_float_t alc_cal;
1687  cal_table_float_t rfpower_meter_cal;
1688  cal_table_float_t comp_meter_cal;
1689  cal_table_float_t vd_meter_cal;
1690  cal_table_float_t id_meter_cal;
1692  const struct confparams *cfgparams;
1693  const rig_ptr_t priv;
1695  /*
1696  * Rig API
1697  *
1698  */
1699 
1700  int (*rig_init)(RIG *rig);
1701  int (*rig_cleanup)(RIG *rig);
1702  int (*rig_open)(RIG *rig);
1703  int (*rig_close)(RIG *rig);
1704 
1705  /*
1706  * General API commands, from most primitive to least.. :()
1707  * List Set/Get functions pairs
1708  */
1709 
1710  int (*set_freq)(RIG *rig, vfo_t vfo, freq_t freq);
1711  int (*get_freq)(RIG *rig, vfo_t vfo, freq_t *freq);
1712 
1713  int (*set_mode)(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width);
1714  int (*get_mode)(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width);
1715 
1716  int (*set_vfo)(RIG *rig, vfo_t vfo);
1717  int (*get_vfo)(RIG *rig, vfo_t *vfo);
1718 
1719  int (*set_ptt)(RIG *rig, vfo_t vfo, ptt_t ptt);
1720  int (*get_ptt)(RIG *rig, vfo_t vfo, ptt_t *ptt);
1721 
1722  int (*get_dcd)(RIG *rig, vfo_t vfo, dcd_t *dcd);
1723 
1724  int (*set_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift);
1725  int (*get_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift);
1726 
1727  int (*set_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t offs);
1728  int (*get_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t *offs);
1729 
1730  int (*set_split_freq)(RIG *rig, vfo_t vfo, freq_t tx_freq);
1731  int (*get_split_freq)(RIG *rig, vfo_t vfo, freq_t *tx_freq);
1732 
1733  int (*set_split_mode)(RIG *rig,
1734  vfo_t vfo,
1735  rmode_t tx_mode,
1736  pbwidth_t tx_width);
1737  int (*get_split_mode)(RIG *rig,
1738  vfo_t vfo,
1739  rmode_t *tx_mode,
1740  pbwidth_t *tx_width);
1741 
1742  int (*set_split_freq_mode)(RIG *rig,
1743  vfo_t vfo,
1744  freq_t tx_freq,
1745  rmode_t tx_mode,
1746  pbwidth_t tx_width);
1747  int (*get_split_freq_mode)(RIG *rig,
1748  vfo_t vfo,
1749  freq_t *tx_freq,
1750  rmode_t *tx_mode,
1751  pbwidth_t *tx_width);
1752 
1753  int (*set_split_vfo)(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo);
1754  int (*get_split_vfo)(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo);
1755 
1756  int (*set_rit)(RIG *rig, vfo_t vfo, shortfreq_t rit);
1757  int (*get_rit)(RIG *rig, vfo_t vfo, shortfreq_t *rit);
1758 
1759  int (*set_xit)(RIG *rig, vfo_t vfo, shortfreq_t xit);
1760  int (*get_xit)(RIG *rig, vfo_t vfo, shortfreq_t *xit);
1761 
1762  int (*set_ts)(RIG *rig, vfo_t vfo, shortfreq_t ts);
1763  int (*get_ts)(RIG *rig, vfo_t vfo, shortfreq_t *ts);
1764 
1765  int (*set_dcs_code)(RIG *rig, vfo_t vfo, tone_t code);
1766  int (*get_dcs_code)(RIG *rig, vfo_t vfo, tone_t *code);
1767 
1768  int (*set_tone)(RIG *rig, vfo_t vfo, tone_t tone);
1769  int (*get_tone)(RIG *rig, vfo_t vfo, tone_t *tone);
1770 
1771  int (*set_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t tone);
1772  int (*get_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t *tone);
1773 
1774  int (*set_dcs_sql)(RIG *rig, vfo_t vfo, tone_t code);
1775  int (*get_dcs_sql)(RIG *rig, vfo_t vfo, tone_t *code);
1776 
1777  int (*set_tone_sql)(RIG *rig, vfo_t vfo, tone_t tone);
1778  int (*get_tone_sql)(RIG *rig, vfo_t vfo, tone_t *tone);
1779 
1780  int (*set_ctcss_sql)(RIG *rig, vfo_t vfo, tone_t tone);
1781  int (*get_ctcss_sql)(RIG *rig, vfo_t vfo, tone_t *tone);
1782 
1783  int (*power2mW)(RIG *rig,
1784  unsigned int *mwpower,
1785  float power,
1786  freq_t freq,
1787  rmode_t mode);
1788  int (*mW2power)(RIG *rig,
1789  float *power,
1790  unsigned int mwpower,
1791  freq_t freq,
1792  rmode_t mode);
1793 
1794  int (*set_powerstat)(RIG *rig, powerstat_t status);
1795  int (*get_powerstat)(RIG *rig, powerstat_t *status);
1796 
1797  int (*reset)(RIG *rig, reset_t reset);
1798 
1799  int (*set_ant)(RIG *rig, vfo_t vfo, ant_t ant, value_t option);
1800  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);
1801 
1802  int (*set_level)(RIG *rig, vfo_t vfo, setting_t level, value_t val);
1803  int (*get_level)(RIG *rig, vfo_t vfo, setting_t level, value_t *val);
1804 
1805  int (*set_func)(RIG *rig, vfo_t vfo, setting_t func, int status);
1806  int (*get_func)(RIG *rig, vfo_t vfo, setting_t func, int *status);
1807 
1808  int (*set_parm)(RIG *rig, setting_t parm, value_t val);
1809  int (*get_parm)(RIG *rig, setting_t parm, value_t *val);
1810 
1811  int (*set_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t val);
1812  int (*get_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t *val);
1813 
1814  int (*set_ext_func)(RIG *rig, vfo_t vfo, token_t token, int status);
1815  int (*get_ext_func)(RIG *rig, vfo_t vfo, token_t token, int *status);
1816 
1817  int (*set_ext_parm)(RIG *rig, token_t token, value_t val);
1818  int (*get_ext_parm)(RIG *rig, token_t token, value_t *val);
1819 
1820  int (*set_conf)(RIG *rig, token_t token, const char *val);
1821  int (*get_conf)(RIG *rig, token_t token, char *val);
1822 
1823  int (*send_dtmf)(RIG *rig, vfo_t vfo, const char *digits);
1824  int (*recv_dtmf)(RIG *rig, vfo_t vfo, char *digits, int *length);
1825 
1826  int (*send_morse)(RIG *rig, vfo_t vfo, const char *msg);
1827  int (*stop_morse)(RIG *rig, vfo_t vfo);
1828  int (*wait_morse)(RIG *rig, vfo_t vfo);
1829 
1830  int (*send_voice_mem)(RIG *rig, vfo_t vfo, int ch);
1831 
1832  int (*set_bank)(RIG *rig, vfo_t vfo, int bank);
1833 
1834  int (*set_mem)(RIG *rig, vfo_t vfo, int ch);
1835  int (*get_mem)(RIG *rig, vfo_t vfo, int *ch);
1836 
1837  int (*vfo_op)(RIG *rig, vfo_t vfo, vfo_op_t op);
1838 
1839  int (*scan)(RIG *rig, vfo_t vfo, scan_t scan, int ch);
1840 
1841  int (*set_trn)(RIG *rig, int trn);
1842  int (*get_trn)(RIG *rig, int *trn);
1843 
1844  int (*decode_event)(RIG *rig);
1845 
1846  int (*set_channel)(RIG *rig, vfo_t vfo, const channel_t *chan);
1847  int (*get_channel)(RIG *rig, vfo_t vfo, channel_t *chan, int read_only);
1848 
1849  const char * (*get_info)(RIG *rig);
1850 
1851  int (*set_chan_all_cb)(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t);
1852  int (*get_chan_all_cb)(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t);
1853 
1854  int (*set_mem_all_cb)(RIG *rig,
1855  chan_cb_t chan_cb,
1856  confval_cb_t parm_cb,
1857  rig_ptr_t);
1858  int (*get_mem_all_cb)(RIG *rig,
1859  chan_cb_t chan_cb,
1860  confval_cb_t parm_cb,
1861  rig_ptr_t);
1862 
1863  int (*set_vfo_opt)(RIG *rig, int status); // only for Net Rigctl device
1864  int (*rig_get_vfo_info) (RIG *rig,
1865  vfo_t vfo,
1866  freq_t *freq,
1867  rmode_t *mode,
1868  pbwidth_t *width,
1869  split_t *split);
1870 
1871  const char *clone_combo_set;
1872  const char *clone_combo_get;
1873  const char *macro_name;
1874 };
1876 
1882 // all functions enumerated for rig_get_function_ptr
1883 enum rig_function_e {
1884  RIG_FUNCTION_INIT,
1885  RIG_FUNCTION_CLEANUP,
1886  RIG_FUNCTION_OPEN,
1887  RIG_FUNCTION_CLOSE,
1888  RIG_FUNCTION_SET_FREQ,
1889  RIG_FUNCTION_GET_FREQ,
1890  RIG_FUNCTION_SET_MODE,
1891  RIG_FUNCTION_GET_MODE,
1892  RIG_FUNCTION_SET_VFO,
1893  RIG_FUNCTION_GET_VFO,
1894  RIG_FUNCTION_SET_PTT,
1895  RIG_FUNCTION_GET_PTT,
1896  RIG_FUNCTION_GET_DCD,
1897  RIG_FUNCTION_SET_RPTR_SHIFT,
1898  RIG_FUNCTION_GET_RPTR_SHIFT,
1899  RIG_FUNCTION_SET_RPTR_OFFS,
1900  RIG_FUNCTION_GET_RPTR_OFFS,
1901  RIG_FUNCTION_SET_SPLIT_FREQ,
1902  RIG_FUNCTION_GET_SPLIT_FREQ,
1903  RIG_FUNCTION_SET_SPLIT_MODE,
1904  RIG_FUNCTION_SET_SPLIT_FREQ_MODE,
1905  RIG_FUNCTION_GET_SPLIT_FREQ_MODE,
1906  RIG_FUNCTION_SET_SPLIT_VFO,
1907  RIG_FUNCTION_GET_SPLIT_VFO,
1908  RIG_FUNCTION_SET_RIT,
1909  RIG_FUNCTION_GET_RIT,
1910  RIG_FUNCTION_SET_XIT,
1911  RIG_FUNCTION_GET_XIT,
1912  RIG_FUNCTION_SET_TS,
1913  RIG_FUNCTION_GET_TS,
1914  RIG_FUNCTION_SET_DCS_CODE,
1915  RIG_FUNCTION_GET_DCS_CODE,
1916  RIG_FUNCTION_SET_TONE,
1917  RIG_FUNCTION_GET_TONE,
1918  RIG_FUNCTION_SET_CTCSS_TONE,
1919  RIG_FUNCTION_GET_CTCSS_TONE,
1920  RIG_FUNCTION_SET_DCS_SQL,
1921  RIG_FUNCTION_GET_DCS_SQL,
1922  RIG_FUNCTION_SET_TONE_SQL,
1923  RIG_FUNCTION_GET_TONE_SQL,
1924  RIG_FUNCTION_SET_CTCSS_SQL,
1925  RIG_FUNCTION_GET_CTCSS_SQL,
1926  RIG_FUNCTION_POWER2MW,
1927  RIG_FUNCTION_MW2POWER,
1928  RIG_FUNCTION_SET_POWERSTAT,
1929  RIG_FUNCTION_GET_POWERSTAT,
1930  RIG_FUNCTION_RESET,
1931  RIG_FUNCTION_SET_ANT,
1932  RIG_FUNCTION_GET_ANT,
1933  RIG_FUNCTION_SET_LEVEL,
1934  RIG_FUNCTION_GET_LEVEL,
1935  RIG_FUNCTION_SET_FUNC,
1936  RIG_FUNCTION_GET_FUNC,
1937  RIG_FUNCTION_SET_PARM,
1938  RIG_FUNCTION_GET_PARM,
1939  RIG_FUNCTION_SET_EXT_LEVEL,
1940  RIG_FUNCTION_GET_EXT_LEVEL,
1941  RIG_FUNCTION_SET_EXT_FUNC,
1942  RIG_FUNCTION_GET_EXT_FUNC,
1943  RIG_FUNCTION_SET_EXT_PARM,
1944  RIG_FUNCTION_GET_EXT_PARM,
1945  RIG_FUNCTION_SET_CONF,
1946  RIG_FUNCTION_GET_CONF,
1947  RIG_FUNCTION_SEND_DTMF,
1948  RIG_FUNCTION_SEND_MORSE,
1949  RIG_FUNCTION_STOP_MORSE,
1950  RIG_FUNCTION_WAIT_MORSE,
1951  RIG_FUNCTION_SEND_VOICE_MEM,
1952  RIG_FUNCTION_SET_BANK,
1953  RIG_FUNCTION_SET_MEM,
1954  RIG_FUNCTION_GET_MEM,
1955  RIG_FUNCTION_VFO_OP,
1956  RIG_FUNCTION_SCAN,
1957  RIG_FUNCTION_SET_TRN,
1958  RIG_FUNCTION_GET_TRN,
1959  RIG_FUNCTION_DECODE_EVENT,
1960  RIG_FUNCTION_SET_CHANNEL,
1961  RIG_FUNCTION_GET_CHANNEL,
1962  RIG_FUNCTION_GET_INFO,
1963  RIG_FUNCTION_SET_CHAN_ALL_CB,
1964  RIG_FUNCTION_GET_CHAN_ALL_CB,
1965  RIG_FUNCTION_SET_MEM_ALL_CB,
1966  RIG_FUNCTION_GET_MEM_ALL_CB,
1967  RIG_FUNCTION_SET_VFO_OPT
1968 };
1969 
1975 extern HAMLIB_EXPORT (void *) rig_get_function_ptr(rig_model_t rig_model, enum rig_function_e rig_function);
1976 
1982 // values enumerated for rig->caps values
1983 enum rig_caps_int_e {
1984  RIG_CAPS_TARGETABLE_VFO,
1985  RIG_CAPS_RIG_MODEL,
1986  RIG_CAPS_PORT_TYPE,
1987  RIG_CAPS_PTT_TYPE,
1988  RIG_CAPS_HAS_GET_LEVEL
1989 };
1990 
1991 enum rig_caps_cptr_e {
1992  RIG_CAPS_VERSION_CPTR,
1993  RIG_CAPS_MFG_NAME_CPTR,
1994  RIG_CAPS_MODEL_NAME_CPTR,
1995  RIG_CAPS_STATUS_CPTR
1996 };
1997 
2003 extern HAMLIB_EXPORT (long long) rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps);
2004 
2010 extern HAMLIB_EXPORT (const char *) rig_get_caps_cptr(rig_model_t rig_model, enum rig_caps_cptr_e rig_caps);
2011 
2018 typedef struct hamlib_port {
2019  union {
2020  rig_port_t rig;
2021  ptt_type_t ptt;
2022  dcd_type_t dcd;
2023  } type;
2024 
2025  int fd;
2026  void *handle;
2028  int write_delay;
2029  int post_write_delay;
2031  struct {
2032  int tv_sec, tv_usec;
2033  } post_write_date;
2035  int timeout;
2036  short retry;
2037  short flushx;
2039  char pathname[HAMLIB_FILPATHLEN];
2041  union {
2042  struct {
2043  int rate;
2044  int data_bits;
2045  int stop_bits;
2046  enum serial_parity_e parity;
2047  enum serial_handshake_e handshake;
2048  enum serial_control_state_e rts_state;
2049  enum serial_control_state_e dtr_state;
2050  } serial;
2052  struct {
2053  int pin;
2054  } parallel;
2056  struct {
2057  int ptt_bitnum;
2058  } cm108;
2060  struct {
2061  int vid;
2062  int pid;
2063  int conf;
2064  int iface;
2065  int alt;
2066  char *vendor_name;
2067  char *product;
2068  } usb;
2070  struct {
2071  int on_value;
2072  int value;
2073  } gpio;
2074  } parm;
2075 } hamlib_port_t;
2077 
2078 #if !defined(__APPLE__) || !defined(__cplusplus)
2079 typedef hamlib_port_t port_t;
2080 #endif
2081 
2082 #define HAMLIB_ELAPSED_GET 0
2083 #define HAMLIB_ELAPSED_SET 1
2084 #define HAMLIB_ELAPSED_INVALIDATE 2
2085 
2086 typedef enum {
2087  HAMLIB_CACHE_ALL, // to set all cache timeouts at once
2088  HAMLIB_CACHE_VFO,
2089  HAMLIB_CACHE_FREQ,
2090  HAMLIB_CACHE_MODE,
2091  HAMLIB_CACHE_PTT,
2092  HAMLIB_CACHE_SPLIT,
2093  HAMLIB_CACHE_WIDTH
2094 } hamlib_cache_t;
2095 
2096 typedef enum {
2097  TWIDDLE_OFF,
2098  TWIDDLE_ON
2099 } twiddle_state_t;
2100 
2106 struct rig_cache {
2107  int timeout_ms; // the cache timeout for invalidating itself
2108  vfo_t vfo;
2109  //freq_t freq; // to be deprecated in 4.1 when full Main/Sub/A/B caching is implemented in 4.1
2110  // other abstraction here is based on dual vfo rigs and mapped to all others
2111  // So we have four possible states of rig
2112  // MainA, MainB, SubA, SubB
2113  // Main is the Main VFO and Sub is for the 2nd VFO
2114  // Most rigs have MainA and MainB
2115  // Dual VFO rigs can have SubA and SubB too
2116  // For dual VFO rigs simplex operations are all done on MainA/MainB -- ergo this abstraction
2117  freq_t freqMainA; // VFO_A, VFO_MAIN, and VFO_MAINA
2118  freq_t freqMainB; // VFO_B, VFO_SUB, and VFO_MAINB
2119  freq_t freqMainC; // VFO_C, VFO_MAINC
2120  freq_t freqSubA; // VFO_SUBA -- only for rigs with dual Sub VFOs
2121  freq_t freqSubB; // VFO_SUBB -- only for rigs with dual Sub VFOs
2122  freq_t freqSubC; // VFO_SUBC -- only for rigs with 3 Sub VFOs
2123  freq_t freqMem; // VFO_MEM -- last MEM channel
2124  rmode_t modeMainA;
2125  rmode_t modeMainB;
2126  rmode_t modeMainC;
2127  rmode_t modeSubA;
2128  rmode_t modeSubB;
2129  rmode_t modeSubC;
2130  rmode_t modeMem;
2131  pbwidth_t widthMainA; // if non-zero then rig has separate width for MainA
2132  pbwidth_t widthMainB; // if non-zero then rig has separate width for MainB
2133  pbwidth_t widthMainC; // if non-zero then rig has separate width for MainC
2134  pbwidth_t widthSubA; // if non-zero then rig has separate width for SubA
2135  pbwidth_t widthSubB; // if non-zero then rig has separate width for SubB
2136  pbwidth_t widthSubC; // if non-zero then rig has separate width for SubC
2137  pbwidth_t widthMem; // if non-zero then rig has separate width for Mem
2138  ptt_t ptt;
2139  split_t split;
2140  vfo_t split_vfo; // split caches two values
2141  struct timespec time_freqMainA;
2142  struct timespec time_freqMainB;
2143  struct timespec time_freqMainC;
2144  struct timespec time_freqSubA;
2145  struct timespec time_freqSubB;
2146  struct timespec time_freqSubC;
2147  struct timespec time_freqMem;
2148  struct timespec time_vfo;
2149  struct timespec time_modeMainA;
2150  struct timespec time_modeMainB;
2151  struct timespec time_modeMainC;
2152  struct timespec time_modeSubA;
2153  struct timespec time_modeSubB;
2154  struct timespec time_modeSubC;
2155  struct timespec time_modeMem;
2156  struct timespec time_widthMainA;
2157  struct timespec time_widthMainB;
2158  struct timespec time_widthMainC;
2159  struct timespec time_widthSubA;
2160  struct timespec time_widthSubB;
2161  struct timespec time_widthSubC;
2162  struct timespec time_widthMem;
2163  struct timespec time_ptt;
2164  struct timespec time_split;
2165  int satmode; // if rig is in satellite mode
2166 };
2167 
2168 
2179 struct rig_state {
2180  /*
2181  * overridable fields
2182  */
2183  hamlib_port_t rigport;
2184  hamlib_port_t pttport;
2185  hamlib_port_t dcdport;
2187  double vfo_comp;
2190  freq_range_t rx_range_list[HAMLIB_FRQRANGESIZ];
2191  freq_range_t tx_range_list[HAMLIB_FRQRANGESIZ];
2193  struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ];
2195  struct filter_list filters[HAMLIB_FLTLSTSIZ];
2199  chan_t chan_list[HAMLIB_CHANLSTSIZ];
2207  int preamp[HAMLIB_MAXDBLSTSIZ];
2208  int attenuator[HAMLIB_MAXDBLSTSIZ];
2221  /*
2222  * non overridable fields, internal use
2223  */
2224 
2227  int vfo_list;
2229  rig_ptr_t priv;
2230  rig_ptr_t obj;
2236  //rmode_t current_modeB; /*!< Mode currently set VFOB */
2240  // mode_list is used by some
2241  // so anything added to this structure must be below here
2242  int transmit;
2246  time_t twiddle_time;
2248  // uplink allows gpredict to behave better by no reading the uplink VFO
2249  int uplink;
2250  struct rig_cache cache;
2251  int vfo_opt;
2266 };
2267 
2269 typedef int (*vprintf_cb_t)(enum rig_debug_level_e,
2270  rig_ptr_t,
2271  const char *,
2272  va_list);
2273 
2274 typedef int (*freq_cb_t)(RIG *, vfo_t, freq_t, rig_ptr_t);
2275 typedef int (*mode_cb_t)(RIG *, vfo_t, rmode_t, pbwidth_t, rig_ptr_t);
2276 typedef int (*vfo_cb_t)(RIG *, vfo_t, rig_ptr_t);
2277 typedef int (*ptt_cb_t)(RIG *, vfo_t, ptt_t, rig_ptr_t);
2278 typedef int (*dcd_cb_t)(RIG *, vfo_t, dcd_t, rig_ptr_t);
2279 typedef int (*pltune_cb_t)(RIG *,
2280  vfo_t, freq_t *,
2281  rmode_t *,
2282  pbwidth_t *,
2283  rig_ptr_t);
2284 
2286 
2305  freq_cb_t freq_event;
2306  rig_ptr_t freq_arg;
2307  mode_cb_t mode_event;
2308  rig_ptr_t mode_arg;
2309  vfo_cb_t vfo_event;
2310  rig_ptr_t vfo_arg;
2311  ptt_cb_t ptt_event;
2312  rig_ptr_t ptt_arg;
2313  dcd_cb_t dcd_event;
2314  rig_ptr_t dcd_arg;
2315  pltune_cb_t pltune;
2316  rig_ptr_t pltune_arg;
2317  /* etc.. */
2318 };
2319 
2320 
2330 struct s_rig {
2331  struct rig_caps *caps;
2332  struct rig_state state;
2333  struct rig_callbacks callbacks;
2334 };
2335 
2336 
2337 
2338 /* --------------- API function prototypes -----------------*/
2339 
2341 
2342 extern HAMLIB_EXPORT(RIG *) rig_init HAMLIB_PARAMS((rig_model_t rig_model));
2343 extern HAMLIB_EXPORT(int) rig_open HAMLIB_PARAMS((RIG *rig));
2344 
2345 /*
2346  * General API commands, from most primitive to least.. :()
2347  * List Set/Get functions pairs
2348  */
2349 
2350 extern HAMLIB_EXPORT(int)
2351 rig_flush(hamlib_port_t *port);
2352 
2353 extern HAMLIB_EXPORT(int)
2354 rig_set_freq HAMLIB_PARAMS((RIG *rig,
2355  vfo_t vfo,
2356  freq_t freq));
2357 extern HAMLIB_EXPORT(int)
2358 rig_get_freq HAMLIB_PARAMS((RIG *rig,
2359  vfo_t vfo,
2360  freq_t *freq));
2361 
2362 extern HAMLIB_EXPORT(int)
2363 rig_set_mode HAMLIB_PARAMS((RIG *rig,
2364  vfo_t vfo,
2365  rmode_t mode,
2366  pbwidth_t width));
2367 extern HAMLIB_EXPORT(int)
2368 rig_get_mode HAMLIB_PARAMS((RIG *rig,
2369  vfo_t vfo,
2370  rmode_t *mode,
2371  pbwidth_t *width));
2372 
2373 extern HAMLIB_EXPORT(int)
2374 rig_set_vfo HAMLIB_PARAMS((RIG *rig,
2375  vfo_t vfo));
2376 extern HAMLIB_EXPORT(int)
2377 rig_get_vfo HAMLIB_PARAMS((RIG *rig,
2378  vfo_t *vfo));
2379 
2380 extern HAMLIB_EXPORT(int)
2381 rig_get_vfo_info HAMLIB_PARAMS((RIG *rig,
2382  vfo_t vfo,
2383  freq_t *freq,
2384  rmode_t *mode,
2385  pbwidth_t *width,
2386  split_t *split,
2387  int *satmode));
2388 
2389 extern HAMLIB_EXPORT(int)
2390 rig_get_vfo_list HAMLIB_PARAMS((RIG *rig, char *buf, int buflen));
2391 
2392 extern HAMLIB_EXPORT(int)
2393 netrigctl_get_vfo_mode HAMLIB_PARAMS((RIG *rig));
2394 
2395 extern HAMLIB_EXPORT(int)
2396 rig_set_ptt HAMLIB_PARAMS((RIG *rig,
2397  vfo_t vfo,
2398  ptt_t ptt));
2399 extern HAMLIB_EXPORT(int)
2400 rig_get_ptt HAMLIB_PARAMS((RIG *rig,
2401  vfo_t vfo,
2402  ptt_t *ptt));
2403 
2404 extern HAMLIB_EXPORT(int)
2405 rig_get_dcd HAMLIB_PARAMS((RIG *rig,
2406  vfo_t vfo,
2407  dcd_t *dcd));
2408 
2409 extern HAMLIB_EXPORT(int)
2410 rig_set_rptr_shift HAMLIB_PARAMS((RIG *rig,
2411  vfo_t vfo,
2412  rptr_shift_t rptr_shift));
2413 extern HAMLIB_EXPORT(int)
2414 rig_get_rptr_shift HAMLIB_PARAMS((RIG *rig,
2415  vfo_t vfo,
2416  rptr_shift_t *rptr_shift));
2417 
2418 extern HAMLIB_EXPORT(int)
2419 rig_set_rptr_offs HAMLIB_PARAMS((RIG *rig,
2420  vfo_t vfo,
2421  shortfreq_t rptr_offs));
2422 extern HAMLIB_EXPORT(int)
2423 rig_get_rptr_offs HAMLIB_PARAMS((RIG *rig,
2424  vfo_t vfo,
2425  shortfreq_t *rptr_offs));
2426 
2427 extern HAMLIB_EXPORT(int)
2428 rig_set_ctcss_tone HAMLIB_PARAMS((RIG *rig,
2429  vfo_t vfo,
2430  tone_t tone));
2431 extern HAMLIB_EXPORT(int)
2432 rig_get_ctcss_tone HAMLIB_PARAMS((RIG *rig,
2433  vfo_t vfo,
2434  tone_t *tone));
2435 
2436 extern HAMLIB_EXPORT(int)
2437 rig_set_dcs_code HAMLIB_PARAMS((RIG *rig,
2438  vfo_t vfo,
2439  tone_t code));
2440 extern HAMLIB_EXPORT(int)
2441 rig_get_dcs_code HAMLIB_PARAMS((RIG *rig,
2442  vfo_t vfo,
2443  tone_t *code));
2444 
2445 extern HAMLIB_EXPORT(int)
2446 rig_set_ctcss_sql HAMLIB_PARAMS((RIG *rig,
2447  vfo_t vfo,
2448  tone_t tone));
2449 extern HAMLIB_EXPORT(int)
2450 rig_get_ctcss_sql HAMLIB_PARAMS((RIG *rig,
2451  vfo_t vfo,
2452  tone_t *tone));
2453 
2454 extern HAMLIB_EXPORT(int)
2455 rig_set_dcs_sql HAMLIB_PARAMS((RIG *rig,
2456  vfo_t vfo,
2457  tone_t code));
2458 extern HAMLIB_EXPORT(int)
2459 rig_get_dcs_sql HAMLIB_PARAMS((RIG *rig,
2460  vfo_t vfo,
2461  tone_t *code));
2462 
2463 extern HAMLIB_EXPORT(int)
2464 rig_set_split_freq HAMLIB_PARAMS((RIG *rig,
2465  vfo_t vfo,
2466  freq_t tx_freq));
2467 extern HAMLIB_EXPORT(int)
2468 rig_get_split_freq HAMLIB_PARAMS((RIG *rig,
2469  vfo_t vfo,
2470  freq_t *tx_freq));
2471 
2472 extern HAMLIB_EXPORT(int)
2473 rig_set_split_mode HAMLIB_PARAMS((RIG *rig,
2474  vfo_t vfo,
2475  rmode_t tx_mode,
2476  pbwidth_t tx_width));
2477 extern HAMLIB_EXPORT(int)
2478 rig_get_split_mode HAMLIB_PARAMS((RIG *rig,
2479  vfo_t vfo,
2480  rmode_t *tx_mode,
2481  pbwidth_t *tx_width));
2482 
2483 extern HAMLIB_EXPORT(int)
2484 rig_set_split_freq_mode HAMLIB_PARAMS((RIG *rig,
2485  vfo_t vfo,
2486  freq_t tx_freq,
2487  rmode_t tx_mode,
2488  pbwidth_t tx_width));
2489 extern HAMLIB_EXPORT(int)
2490 rig_get_split_freq_mode HAMLIB_PARAMS((RIG *rig,
2491  vfo_t vfo,
2492  freq_t *tx_freq,
2493  rmode_t *tx_mode,
2494  pbwidth_t *tx_width));
2495 
2496 extern HAMLIB_EXPORT(int)
2497 rig_set_split_vfo HAMLIB_PARAMS((RIG *,
2498  vfo_t rx_vfo,
2499  split_t split,
2500  vfo_t tx_vfo));
2501 extern HAMLIB_EXPORT(int)
2502 rig_get_split_vfo HAMLIB_PARAMS((RIG *,
2503  vfo_t rx_vfo,
2504  split_t *split,
2505  vfo_t *tx_vfo));
2506 
2507 #define rig_set_split(r,v,s) rig_set_split_vfo((r),(v),(s),RIG_VFO_CURR)
2508 #define rig_get_split(r,v,s) ({ vfo_t _tx_vfo; rig_get_split_vfo((r),(v),(s),&_tx_vfo); })
2509 
2510 extern HAMLIB_EXPORT(int)
2511 rig_set_rit HAMLIB_PARAMS((RIG *rig,
2512  vfo_t vfo,
2513  shortfreq_t rit));
2514 extern HAMLIB_EXPORT(int)
2515 rig_get_rit HAMLIB_PARAMS((RIG *rig,
2516  vfo_t vfo,
2517  shortfreq_t *rit));
2518 
2519 extern HAMLIB_EXPORT(int)
2520 rig_set_xit HAMLIB_PARAMS((RIG *rig,
2521  vfo_t vfo,
2522  shortfreq_t xit));
2523 extern HAMLIB_EXPORT(int)
2524 rig_get_xit HAMLIB_PARAMS((RIG *rig,
2525  vfo_t vfo,
2526  shortfreq_t *xit));
2527 
2528 extern HAMLIB_EXPORT(int)
2529 rig_set_ts HAMLIB_PARAMS((RIG *rig,
2530  vfo_t vfo,
2531  shortfreq_t ts));
2532 extern HAMLIB_EXPORT(int)
2533 rig_get_ts HAMLIB_PARAMS((RIG *rig,
2534  vfo_t vfo,
2535  shortfreq_t *ts));
2536 
2537 extern HAMLIB_EXPORT(int)
2538 rig_power2mW HAMLIB_PARAMS((RIG *rig,
2539  unsigned int *mwpower,
2540  float power,
2541  freq_t freq,
2542  rmode_t mode));
2543 extern HAMLIB_EXPORT(int)
2544 rig_mW2power HAMLIB_PARAMS((RIG *rig,
2545  float *power,
2546  unsigned int mwpower,
2547  freq_t freq,
2548  rmode_t mode));
2549 
2550 extern HAMLIB_EXPORT(shortfreq_t)
2551 rig_get_resolution HAMLIB_PARAMS((RIG *rig,
2552  rmode_t mode));
2553 
2554 extern HAMLIB_EXPORT(int)
2555 rig_set_level HAMLIB_PARAMS((RIG *rig,
2556  vfo_t vfo,
2557  setting_t level,
2558  value_t val));
2559 extern HAMLIB_EXPORT(int)
2560 rig_get_level HAMLIB_PARAMS((RIG *rig,
2561  vfo_t vfo,
2562  setting_t level,
2563  value_t *val));
2564 
2565 #define rig_get_strength(r,v,s) rig_get_level((r),(v),RIG_LEVEL_STRENGTH, (value_t*)(s))
2566 
2567 extern HAMLIB_EXPORT(int)
2568 rig_set_parm HAMLIB_PARAMS((RIG *rig,
2569  setting_t parm,
2570  value_t val));
2571 extern HAMLIB_EXPORT(int)
2572 rig_get_parm HAMLIB_PARAMS((RIG *rig,
2573  setting_t parm,
2574  value_t *val));
2575 
2576 extern HAMLIB_EXPORT(int)
2577 rig_set_conf HAMLIB_PARAMS((RIG *rig,
2578  token_t token,
2579  const char *val));
2580 extern HAMLIB_EXPORT(int)
2581 rig_get_conf HAMLIB_PARAMS((RIG *rig,
2582  token_t token,
2583  char *val));
2584 
2585 extern HAMLIB_EXPORT(int)
2586 rig_set_powerstat HAMLIB_PARAMS((RIG *rig,
2587  powerstat_t status));
2588 extern HAMLIB_EXPORT(int)
2589 rig_get_powerstat HAMLIB_PARAMS((RIG *rig,
2590  powerstat_t *status));
2591 
2592 extern HAMLIB_EXPORT(int)
2593 rig_reset HAMLIB_PARAMS((RIG *rig,
2594  reset_t reset)); /* dangerous! */
2595 
2596 extern HAMLIB_EXPORT(int)
2597 rig_set_ext_level HAMLIB_PARAMS((RIG *rig,
2598  vfo_t vfo,
2599  token_t token,
2600  value_t val));
2601 extern HAMLIB_EXPORT(int)
2602 rig_get_ext_level HAMLIB_PARAMS((RIG *rig,
2603  vfo_t vfo,
2604  token_t token,
2605  value_t *val));
2606 
2607 extern HAMLIB_EXPORT(int)
2608 rig_set_ext_func HAMLIB_PARAMS((RIG *rig,
2609  vfo_t vfo,
2610  token_t token,
2611  int status));
2612 extern HAMLIB_EXPORT(int)
2613 rig_get_ext_func HAMLIB_PARAMS((RIG *rig,
2614  vfo_t vfo,
2615  token_t token,
2616  int *status));
2617 
2618 extern HAMLIB_EXPORT(int)
2619 rig_set_ext_parm HAMLIB_PARAMS((RIG *rig,
2620  token_t token,
2621  value_t val));
2622 extern HAMLIB_EXPORT(int)
2623 rig_get_ext_parm HAMLIB_PARAMS((RIG *rig,
2624  token_t token,
2625  value_t *val));
2626 
2627 extern HAMLIB_EXPORT(int)
2628 rig_ext_func_foreach HAMLIB_PARAMS((RIG *rig,
2629  int (*cfunc)(RIG *,
2630  const struct confparams *,
2631  rig_ptr_t),
2632  rig_ptr_t data));
2633 extern HAMLIB_EXPORT(int)
2634 rig_ext_level_foreach HAMLIB_PARAMS((RIG *rig,
2635  int (*cfunc)(RIG *,
2636  const struct confparams *,
2637  rig_ptr_t),
2638  rig_ptr_t data));
2639 extern HAMLIB_EXPORT(int)
2640 rig_ext_parm_foreach HAMLIB_PARAMS((RIG *rig,
2641  int (*cfunc)(RIG *,
2642  const struct confparams *,
2643  rig_ptr_t),
2644  rig_ptr_t data));
2645 
2646 extern HAMLIB_EXPORT(const struct confparams *)
2647 rig_ext_lookup HAMLIB_PARAMS((RIG *rig,
2648  const char *name));
2649 
2650 extern HAMLIB_EXPORT(const struct confparams *)
2651 rig_ext_lookup_tok HAMLIB_PARAMS((RIG *rig,
2652  token_t token));
2653 extern HAMLIB_EXPORT(token_t)
2654 rig_ext_token_lookup HAMLIB_PARAMS((RIG *rig,
2655  const char *name));
2656 
2657 
2658 extern HAMLIB_EXPORT(int)
2659 rig_token_foreach HAMLIB_PARAMS((RIG *rig,
2660  int (*cfunc)(const struct confparams *,
2661  rig_ptr_t),
2662  rig_ptr_t data));
2663 
2664 extern HAMLIB_EXPORT(const struct confparams *)
2665 rig_confparam_lookup HAMLIB_PARAMS((RIG *rig,
2666  const char *name));
2667 extern HAMLIB_EXPORT(token_t)
2668 rig_token_lookup HAMLIB_PARAMS((RIG *rig,
2669  const char *name));
2670 
2671 extern HAMLIB_EXPORT(int)
2672 rig_close HAMLIB_PARAMS((RIG *rig));
2673 
2674 extern HAMLIB_EXPORT(int)
2675 rig_cleanup HAMLIB_PARAMS((RIG *rig));
2676 
2677 extern HAMLIB_EXPORT(int)
2678 rig_set_ant HAMLIB_PARAMS((RIG *rig,
2679  vfo_t vfo,
2680  ant_t ant, /* antenna */
2681  value_t option)); /* optional ant info */
2682 extern HAMLIB_EXPORT(int)
2683 rig_get_ant HAMLIB_PARAMS((RIG *rig,
2684  vfo_t vfo,
2685  ant_t ant,
2686  value_t *option,
2687  ant_t *ant_curr,
2688  ant_t *ant_tx,
2689  ant_t *ant_rx));
2690 
2691 extern HAMLIB_EXPORT(setting_t)
2692 rig_has_get_level HAMLIB_PARAMS((RIG *rig,
2693  setting_t level));
2694 extern HAMLIB_EXPORT(setting_t)
2695 rig_has_set_level HAMLIB_PARAMS((RIG *rig,
2696  setting_t level));
2697 
2698 extern HAMLIB_EXPORT(setting_t)
2699 rig_has_get_parm HAMLIB_PARAMS((RIG *rig,
2700  setting_t parm));
2701 extern HAMLIB_EXPORT(setting_t)
2702 rig_has_set_parm HAMLIB_PARAMS((RIG *rig,
2703  setting_t parm));
2704 
2705 extern HAMLIB_EXPORT(setting_t)
2706 rig_has_get_func HAMLIB_PARAMS((RIG *rig,
2707  setting_t func));
2708 extern HAMLIB_EXPORT(setting_t)
2709 rig_has_set_func HAMLIB_PARAMS((RIG *rig,
2710  setting_t func));
2711 
2712 extern HAMLIB_EXPORT(int)
2713 rig_set_func HAMLIB_PARAMS((RIG *rig,
2714  vfo_t vfo,
2715  setting_t func,
2716  int status));
2717 extern HAMLIB_EXPORT(int)
2718 rig_get_func HAMLIB_PARAMS((RIG *rig,
2719  vfo_t vfo,
2720  setting_t func,
2721  int *status));
2722 
2723 extern HAMLIB_EXPORT(int)
2724 rig_send_dtmf HAMLIB_PARAMS((RIG *rig,
2725  vfo_t vfo,
2726  const char *digits));
2727 extern HAMLIB_EXPORT(int)
2728 rig_recv_dtmf HAMLIB_PARAMS((RIG *rig,
2729  vfo_t vfo,
2730  char *digits,
2731  int *length));
2732 
2733 extern HAMLIB_EXPORT(int)
2734 rig_send_morse HAMLIB_PARAMS((RIG *rig,
2735  vfo_t vfo,
2736  const char *msg));
2737 
2738 extern HAMLIB_EXPORT(int)
2739 rig_stop_morse HAMLIB_PARAMS((RIG *rig,
2740  vfo_t vfo));
2741 
2742 extern HAMLIB_EXPORT(int)
2743 rig_wait_morse HAMLIB_PARAMS((RIG *rig,
2744  vfo_t vfo));
2745 
2746 extern HAMLIB_EXPORT(int)
2747 rig_send_voice_mem HAMLIB_PARAMS((RIG *rig,
2748  vfo_t vfo,
2749  int ch));
2750 
2751 extern HAMLIB_EXPORT(int)
2752 rig_set_bank HAMLIB_PARAMS((RIG *rig,
2753  vfo_t vfo,
2754  int bank));
2755 
2756 extern HAMLIB_EXPORT(int)
2757 rig_set_mem HAMLIB_PARAMS((RIG *rig,
2758  vfo_t vfo,
2759  int ch));
2760 extern HAMLIB_EXPORT(int)
2761 rig_get_mem HAMLIB_PARAMS((RIG *rig,
2762  vfo_t vfo,
2763  int *ch));
2764 
2765 extern HAMLIB_EXPORT(int)
2766 rig_vfo_op HAMLIB_PARAMS((RIG *rig,
2767  vfo_t vfo,
2768  vfo_op_t op));
2769 
2770 extern HAMLIB_EXPORT(vfo_op_t)
2771 rig_has_vfo_op HAMLIB_PARAMS((RIG *rig,
2772  vfo_op_t op));
2773 
2774 extern HAMLIB_EXPORT(int)
2775 rig_scan HAMLIB_PARAMS((RIG *rig,
2776  vfo_t vfo,
2777  scan_t scan,
2778  int ch));
2779 
2780 extern HAMLIB_EXPORT(scan_t)
2781 rig_has_scan HAMLIB_PARAMS((RIG *rig,
2782  scan_t scan));
2783 
2784 extern HAMLIB_EXPORT(int)
2785 rig_set_channel HAMLIB_PARAMS((RIG *rig,
2786  vfo_t vfo,
2787  const channel_t *chan)); /* mem */
2788 extern HAMLIB_EXPORT(int)
2789 rig_get_channel HAMLIB_PARAMS((RIG *rig,
2790  vfo_t vfo,
2791  channel_t *chan, int read_only));
2792 
2793 extern HAMLIB_EXPORT(int)
2794 rig_set_chan_all HAMLIB_PARAMS((RIG *rig,
2795  vfo_t vfo,
2796  const channel_t chans[]));
2797 extern HAMLIB_EXPORT(int)
2798 rig_get_chan_all HAMLIB_PARAMS((RIG *rig,
2799  vfo_t vfo,
2800  channel_t chans[]));
2801 
2802 extern HAMLIB_EXPORT(int)
2803 rig_set_chan_all_cb HAMLIB_PARAMS((RIG *rig,
2804  vfo_t vfo,
2805  chan_cb_t chan_cb,
2806  rig_ptr_t));
2807 extern HAMLIB_EXPORT(int)
2808 rig_get_chan_all_cb HAMLIB_PARAMS((RIG *rig,
2809  vfo_t vfo,
2810  chan_cb_t chan_cb,
2811  rig_ptr_t));
2812 
2813 extern HAMLIB_EXPORT(int)
2814 rig_set_mem_all_cb HAMLIB_PARAMS((RIG *rig,
2815  vfo_t vfo,
2816  chan_cb_t chan_cb,
2817  confval_cb_t parm_cb,
2818  rig_ptr_t));
2819 extern HAMLIB_EXPORT(int)
2820 rig_get_mem_all_cb HAMLIB_PARAMS((RIG *rig,
2821  vfo_t vfo,
2822  chan_cb_t chan_cb,
2823  confval_cb_t parm_cb,
2824  rig_ptr_t));
2825 
2826 extern HAMLIB_EXPORT(int)
2827 rig_set_mem_all HAMLIB_PARAMS((RIG *rig,
2828  vfo_t vfo,
2829  const channel_t *chan,
2830  const struct confparams *,
2831  const value_t *));
2832 extern HAMLIB_EXPORT(int)
2833 rig_get_mem_all HAMLIB_PARAMS((RIG *rig,
2834  vfo_t vfo,
2835  channel_t *chan,
2836  const struct confparams *,
2837  value_t *));
2838 
2839 extern HAMLIB_EXPORT(const chan_t *)
2840 rig_lookup_mem_caps HAMLIB_PARAMS((RIG *rig,
2841  int ch));
2842 
2843 extern HAMLIB_EXPORT(int)
2844 rig_mem_count HAMLIB_PARAMS((RIG *rig));
2845 
2846 extern HAMLIB_EXPORT(int)
2847 rig_set_trn HAMLIB_PARAMS((RIG *rig,
2848  int trn));
2849 extern HAMLIB_EXPORT(int)
2850 rig_get_trn HAMLIB_PARAMS((RIG *rig,
2851  int *trn));
2852 
2853 extern HAMLIB_EXPORT(int)
2854 rig_set_freq_callback HAMLIB_PARAMS((RIG *,
2855  freq_cb_t,
2856  rig_ptr_t));
2857 
2858 extern HAMLIB_EXPORT(int)
2859 rig_set_mode_callback HAMLIB_PARAMS((RIG *,
2860  mode_cb_t,
2861  rig_ptr_t));
2862 extern HAMLIB_EXPORT(int)
2863 rig_set_vfo_callback HAMLIB_PARAMS((RIG *,
2864  vfo_cb_t,
2865  rig_ptr_t));
2866 
2867 extern HAMLIB_EXPORT(int)
2868 rig_set_ptt_callback HAMLIB_PARAMS((RIG *,
2869  ptt_cb_t,
2870  rig_ptr_t));
2871 
2872 extern HAMLIB_EXPORT(int)
2873 rig_set_dcd_callback HAMLIB_PARAMS((RIG *,
2874  dcd_cb_t,
2875  rig_ptr_t));
2876 
2877 extern HAMLIB_EXPORT(int)
2878 rig_set_pltune_callback HAMLIB_PARAMS((RIG *,
2879  pltune_cb_t,
2880  rig_ptr_t));
2881 
2882 extern HAMLIB_EXPORT(int)
2883 rig_set_twiddle HAMLIB_PARAMS((RIG *rig,
2884  int seconds));
2885 
2886 extern HAMLIB_EXPORT(int)
2887 rig_get_twiddle HAMLIB_PARAMS((RIG *rig,
2888  int *seconds));
2889 
2890 extern HAMLIB_EXPORT(int)
2891 rig_set_uplink HAMLIB_PARAMS((RIG *rig,
2892  int val));
2893 
2894 extern HAMLIB_EXPORT(const char *)
2895 rig_get_info HAMLIB_PARAMS((RIG *rig));
2896 
2897 extern HAMLIB_EXPORT(const struct rig_caps *)
2898 rig_get_caps HAMLIB_PARAMS((rig_model_t rig_model));
2899 
2900 extern HAMLIB_EXPORT(const freq_range_t *)
2901 rig_get_range HAMLIB_PARAMS((const freq_range_t *range_list,
2902  freq_t freq,
2903  rmode_t mode));
2904 
2905 extern HAMLIB_EXPORT(pbwidth_t)
2906 rig_passband_normal HAMLIB_PARAMS((RIG *rig,
2907  rmode_t mode));
2908 extern HAMLIB_EXPORT(pbwidth_t)
2909 rig_passband_narrow HAMLIB_PARAMS((RIG *rig,
2910  rmode_t mode));
2911 extern HAMLIB_EXPORT(pbwidth_t)
2912 rig_passband_wide HAMLIB_PARAMS((RIG *rig,
2913  rmode_t mode));
2914 
2915 extern HAMLIB_EXPORT(const char *)
2916 rigerror HAMLIB_PARAMS((int errnum));
2917 
2918 extern HAMLIB_EXPORT(int)
2919 rig_setting2idx HAMLIB_PARAMS((setting_t s));
2920 
2921 extern HAMLIB_EXPORT(setting_t)
2922 rig_idx2setting(int i);
2923 /*
2924  * Even if these functions are prefixed with "rig_", they are not rig specific
2925  * Maybe "hamlib_" would have been better. Let me know. --SF
2926  */
2927 extern HAMLIB_EXPORT(void)
2928 rig_set_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
2929 
2930 extern HAMLIB_EXPORT(void)
2931 rig_set_debug_time_stamp HAMLIB_PARAMS((int flag));
2932 
2933 #define rig_set_debug_level(level) rig_set_debug(level)
2934 
2935 extern HAMLIB_EXPORT(int)
2936 rig_need_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
2937 
2938 
2939 // this need to be fairly big to avoid compiler warnings
2940 #define DEBUGMSGSAVE_SIZE 24000
2941 extern HAMLIB_EXPORT_VAR(char) debugmsgsave[DEBUGMSGSAVE_SIZE]; // last debug msg
2942 extern HAMLIB_EXPORT_VAR(char) debugmsgsave2[DEBUGMSGSAVE_SIZE]; // last-1 debug msg
2943 extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debug msg
2944 #ifndef __cplusplus
2945 #ifdef __GNUC__
2946 // doing the debug macro with a dummy sprintf allows gcc to check the format string
2947 #define rig_debug(debug_level,fmt,...) do { strncpy(debugmsgsave3, debugmsgsave2,sizeof(debugmsgsave3));strncpy(debugmsgsave2, debugmsgsave, sizeof(debugmsgsave2));snprintf(debugmsgsave,sizeof(debugmsgsave),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); } while(0);
2948 #endif
2949 #endif
2950 extern HAMLIB_EXPORT(void)
2951 rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level,
2952  const char *fmt, ...));
2953 
2954 extern HAMLIB_EXPORT(vprintf_cb_t)
2955 rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb,
2956  rig_ptr_t arg));
2957 
2958 extern HAMLIB_EXPORT(FILE *)
2959 rig_set_debug_file HAMLIB_PARAMS((FILE *stream));
2960 
2961 extern HAMLIB_EXPORT(int)
2962 rig_register HAMLIB_PARAMS((const struct rig_caps *caps));
2963 
2964 extern HAMLIB_EXPORT(int)
2965 rig_unregister HAMLIB_PARAMS((rig_model_t rig_model));
2966 
2967 extern HAMLIB_EXPORT(int)
2968 rig_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rig_caps *, rig_ptr_t),
2969  rig_ptr_t data));
2970 
2971 extern HAMLIB_EXPORT(int)
2972 rig_list_foreach_model HAMLIB_PARAMS((int (*cfunc)(const rig_model_t rig_model, rig_ptr_t),
2973  rig_ptr_t data));
2974 
2975 extern HAMLIB_EXPORT(int)
2976 rig_load_backend HAMLIB_PARAMS((const char *be_name));
2977 
2978 extern HAMLIB_EXPORT(int)
2979 rig_check_backend HAMLIB_PARAMS((rig_model_t rig_model));
2980 
2981 extern HAMLIB_EXPORT(int)
2982 rig_load_all_backends HAMLIB_PARAMS((void));
2983 
2984 typedef int (*rig_probe_func_t)(const hamlib_port_t *, rig_model_t, rig_ptr_t);
2985 
2986 extern HAMLIB_EXPORT(int)
2987 rig_probe_all HAMLIB_PARAMS((hamlib_port_t *p,
2988  rig_probe_func_t,
2989  rig_ptr_t));
2990 
2991 extern HAMLIB_EXPORT(rig_model_t)
2992 rig_probe HAMLIB_PARAMS((hamlib_port_t *p));
2993 
2994 
2995 /* Misc calls */
2996 extern HAMLIB_EXPORT(const char *) rig_strrmode(rmode_t mode);
2997 extern HAMLIB_EXPORT(int) rig_strrmodes(rmode_t modes, char *buf, int buflen);
2998 extern HAMLIB_EXPORT(const char *) rig_strvfo(vfo_t vfo);
2999 extern HAMLIB_EXPORT(const char *) rig_strfunc(setting_t);
3000 extern HAMLIB_EXPORT(const char *) rig_strlevel(setting_t);
3001 extern HAMLIB_EXPORT(const char *) rig_strparm(setting_t);
3002 extern HAMLIB_EXPORT(const char *) rig_strptrshift(rptr_shift_t);
3003 extern HAMLIB_EXPORT(const char *) rig_strvfop(vfo_op_t op);
3004 extern HAMLIB_EXPORT(const char *) rig_strscan(scan_t scan);
3005 extern HAMLIB_EXPORT(const char *) rig_strstatus(enum rig_status_e status);
3006 extern HAMLIB_EXPORT(const char *) rig_strmtype(chan_type_t mtype);
3007 
3008 extern HAMLIB_EXPORT(rmode_t) rig_parse_mode(const char *s);
3009 extern HAMLIB_EXPORT(vfo_t) rig_parse_vfo(const char *s);
3010 extern HAMLIB_EXPORT(setting_t) rig_parse_func(const char *s);
3011 extern HAMLIB_EXPORT(setting_t) rig_parse_level(const char *s);
3012 extern HAMLIB_EXPORT(setting_t) rig_parse_parm(const char *s);
3013 extern HAMLIB_EXPORT(vfo_op_t) rig_parse_vfo_op(const char *s);
3014 extern HAMLIB_EXPORT(scan_t) rig_parse_scan(const char *s);
3015 extern HAMLIB_EXPORT(rptr_shift_t) rig_parse_rptr_shift(const char *s);
3016 extern HAMLIB_EXPORT(chan_type_t) rig_parse_mtype(const char *s);
3017 
3018 extern HAMLIB_EXPORT(const char *) rig_license HAMLIB_PARAMS(());
3019 extern HAMLIB_EXPORT(const char *) rig_version HAMLIB_PARAMS(());
3020 extern HAMLIB_EXPORT(const char *) rig_copyright HAMLIB_PARAMS(());
3021 
3022 extern HAMLIB_EXPORT(void) rig_no_restore_ai();
3023 
3024 extern HAMLIB_EXPORT(int) rig_get_cache_timeout_ms(RIG *rig, hamlib_cache_t selection);
3025 extern HAMLIB_EXPORT(int) rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection, int ms);
3026 
3027 extern HAMLIB_EXPORT(int) rig_set_vfo_opt(RIG *rig, int status);
3028 extern HAMLIB_EXPORT(int) rig_get_vfo_info(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, pbwidth_t *width, split_t *split, int *satmode);
3029 extern HAMLIB_EXPORT(int) rig_get_rig_info(RIG *rig, char *response, int max_response_len);
3030 extern HAMLIB_EXPORT(int) rig_get_cache(RIG *rig, vfo_t vfo, freq_t *freq, int * cache_ms_freq, rmode_t *mode, int *cache_ms_mode, pbwidth_t *width, int *cache_ms_width);
3031 
3032 
3033 typedef unsigned long rig_useconds_t;
3034 extern HAMLIB_EXPORT(int) hl_usleep(rig_useconds_t msec);
3035 
3037 
3038 __END_DECLS
3039 
3040 #endif /* _RIG_H */
3041 
setting_t rig_parse_parm(const char *s)
Convert alpha string to RIG_PARM_...
Definition: misc.c:1100
vfo_t rig_parse_vfo(const char *s)
Convert alpha string to enum RIG_VFO_...
Definition: misc.c:590
const char * rig_strparm(setting_t parm)
Convert enum RIG_PARM_... to alpha string.
Definition: misc.c:1150
const char * rig_strptrshift(rptr_shift_t shift)
convert enum RIG_RPT_SHIFT_... to printable character
Definition: misc.c:1357
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:524
rptr_shift_t rig_parse_rptr_shift(const char *s)
Convert alpha char to enum RIG_RPT_SHIFT_...
Definition: misc.c:1382
uint64_t rig_idx2setting(int i)
Definition: misc.c:700
const char * rig_strstatus(enum rig_status_e status)
Convert enum RIG_STATUS_... to printable string.
Definition: misc.c:392
void rig_set_debug_time_stamp(int flag)
Enbable/disable time stamp on debug output.
Definition: debug.c:142
chan_type_t rig_parse_mtype(const char *s)
Convert alpha string to enum RIG_MTYPE_...
Definition: misc.c:1425
const char * rig_strmtype(chan_type_t mtype)
Convert enum RIG_MTYPE_... to alpha string.
Definition: misc.c:1450
FILE * rig_set_debug_file(FILE *stream)
change stderr to some different output
Definition: debug.c:295
const char * rig_strrmode(rmode_t mode)
Convert enum RIG_MODE to alpha string.
Definition: misc.c:492
vprintf_cb_t rig_set_debug_callback(vprintf_cb_t cb, rig_ptr_t arg)
set callback to handle debug messages
Definition: debug.c:280
int rig_need_debug(enum rig_debug_level_e debug_level)
Useful for dump_hex, etc.
Definition: debug.c:133
const char * rig_strscan(scan_t rscan)
Convert enum RIG_SCAN_... to alpha string.
Definition: misc.c:1328
setting_t rig_parse_level(const char *s)
Convert alpha string to enum RIG_LEVEL_...
Definition: misc.c:901
scan_t rig_parse_scan(const char *s)
Convert alpha string to enum RIG_SCAN_...
Definition: misc.c:1303
setting_t rig_parse_func(const char *s)
Convert alpha string to enum RIG_FUNC_...
Definition: misc.c:712
const char * rig_strvfo(vfo_t vfo)
Convert enum RIG_VFO_... to alpha string.
Definition: misc.c:615
rmode_t rig_parse_mode(const char *s)
Convert alpha string to enum RIG_MODE.
Definition: misc.c:467
const char * rig_strvfop(vfo_op_t op)
Convert enum RIG_OP_... to alpha string.
Definition: misc.c:1258
void rig_set_debug(enum rig_debug_level_e debug_level)
Change the current debug level.
Definition: debug.c:123
const char * rig_strlevel(setting_t level)
Convert enum RIG_LEVEL_... to alpha string.
Definition: misc.c:982
void rig_debug(enum rig_debug_level_e debug_level, const char *fmt,...)
Default is debugging messages are done through stderr.
Definition: debug.c:171
const char * rig_strfunc(setting_t func)
Convert enum RIG_FUNC_... to alpha string.
Definition: misc.c:762
vfo_op_t rig_parse_vfo_op(const char *s)
Convert alpha string to enum RIG_OP_...
Definition: misc.c:1233
int rig_set_vfo(RIG *rig, vfo_t vfo)
set the current VFO
Definition: rig.c:2512
unsigned int vfo_t
VFO definition.
Definition: rig.h:413
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:4271
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:612
int rig_send_dtmf(RIG *rig, vfo_t vfo, const char *digits)
send DTMF digits
Definition: rig.c:5706
int rig_set_twiddle(RIG *rig, int seconds)
timeout (secs) to stop rigctld when VFO is manually changed
Definition: rig.c:1287
meter_level_e
Level display meters.
Definition: rig.h:838
int rig_get_rig_info(RIG *rig, char *response, int max_response_len)
get freq/mode/width for requested VFO
Definition: rig.c:6280
int rig_get_mem_all(RIG *rig, vfo_t vfo, channel_t chans[], const struct confparams cfgps[], value_t vals[])
get all channel and non-channel data
Definition: mem.c:1529
int rig_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
get the status of the DCD
Definition: rig.c:3225
serial_parity_e
Serial parity.
Definition: rig.h:246
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:4424
int rig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
Definition: rig.c:2226
int rig_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan)
set channel data
Definition: mem.c:688
dcd_e
DCD status.
Definition: rig.h:546
int rig_set_freq_callback(RIG *rig, freq_cb_t cb, rig_ptr_t arg)
set the callback for freq events
Definition: event.c:526
const char * hamlib_copyright2
Hamlib copyright notice.
Definition: rig.c:98
int rig_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs)
get the current repeater offset
Definition: rig.c:3557
int rig_set_powerstat(RIG *rig, powerstat_t status)
turn on/off the radio
Definition: rig.c:5317
int rig_get_powerstat(RIG *rig, powerstat_t *status)
get the on/off status of the radio
Definition: rig.c:5354
int rig_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
set the current DCS code
Definition: tones.c:491
serial_control_state_e
Serial control state.
Definition: rig.h:268
int rig_set_mem(RIG *rig, vfo_t vfo, int ch)
set the current memory channel number
Definition: mem.c:72
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:5164
setting_t rig_has_set_func(RIG *rig, setting_t func)
check ability of radio functions
Definition: settings.c:444
int rig_get_vfo(RIG *rig, vfo_t *vfo)
get the current VFO
Definition: rig.c:2633
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:4167
uint64_t rmode_t
Radio mode.
Definition: rig.h:1147
int rig_set_vfo_callback(RIG *rig, vfo_cb_t cb, rig_ptr_t arg)
set the callback for vfo events
Definition: event.c:586
shortfreq_t pbwidth_t
Definition: rig.h:540
int rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
set a radio level setting
Definition: settings.c:71
int rig_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
get the current RIT offset
Definition: rig.c:4622
int rig_cleanup(RIG *rig)
release a rig handle and free associated memory
Definition: rig.c:1243
rig_type_t
Rig type flags.
Definition: rig.h:278
int rig_get_mem(RIG *rig, vfo_t vfo, int *ch)
get the current memory channel number
Definition: mem.c:135
int rig_set_mem_all(RIG *rig, vfo_t vfo, const channel_t chans[], const struct confparams cfgps[], const value_t vals[])
set all channel and non-channel data
Definition: mem.c:1461
enum rig_port_e rig_port_t
Port type.
split_t
Split mode.
Definition: rig.h:342
int rig_get_vfo_list(RIG *rig, char *buf, int buflen)
get list of available vfos
Definition: rig.c:6422
rptr_shift_t
Repeater shift type.
Definition: rig.h:332
int rig_set_mem_all_cb(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t arg)
set all channel and non-channel data by call-back
Definition: mem.c:1327
int rig_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code)
get the current DCS code
Definition: tones.c:553
scan_t rig_has_scan(RIG *rig, scan_t scan)
check availability of scanning functions
Definition: rig.c:5603
ptt_type_t
PTT type.
Definition: rig.h:586
int rig_get_mem_all_cb(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, confval_cb_t parm_cb, rig_ptr_t arg)
get all channel and non-channel data by call-back
Definition: mem.c:1395
token_t rig_token_lookup(RIG *rig, const char *name)
lookup a token id
Definition: conf.c:1144
int rig_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
set CTCSS squelch
Definition: tones.c:362
ann_t
Announce.
Definition: rig.h:744
int rig_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code)
set the current encoding DCS code
Definition: tones.c:230
int rig_set_dcd_callback(RIG *rig, dcd_cb_t cb, rig_ptr_t arg)
set the callback for dcd events
Definition: event.c:646
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:678
int rig_get_channel(RIG *rig, vfo_t vfox, channel_t *chan, int read_only)
get channel data
Definition: mem.c:832
int rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
get the frequency of the target VFO
Definition: rig.c:1898
int rig_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
activate/de-activate functions of radio
Definition: settings.c:475
int rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
get the status of the PTT
Definition: rig.c:2975
int rig_get_chan_all_cb(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t arg)
get all channel data, by callback
Definition: mem.c:1129
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:5220
int rig_set_bank(RIG *rig, vfo_t vfo, int bank)
set the current memory bank
Definition: mem.c:198
int rig_ext_func_foreach(RIG *rig, int(*cfunc)(RIG *, const struct confparams *, rig_ptr_t), rig_ptr_t data)
Executes cfunc on all the elements stored in the extfuncs table.
Definition: ext.c:86
int rig_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone)
get the current CTCSS squelch
Definition: tones.c:429
int rig_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
get the current XIT offset
Definition: rig.c:4770
int rig_get_parm(RIG *rig, setting_t parm, value_t *val)
get the value of a parameter
Definition: settings.c:262
int rig_get_trn(RIG *rig, int *trn)
get the current transceive mode
Definition: event.c:855
int rig_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
set the repeater offset
Definition: rig.c:3487
int rig_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
get the current CTCSS sub-tone frequency
Definition: tones.c:167
int rig_set_ext_func(RIG *rig, vfo_t vfo, token_t token, int status)
set a radio function extra parameter
Definition: settings.c:743
const struct confparams * rig_confparam_lookup(RIG *rig, const char *name)
lookup a confparam struct
Definition: conf.c:1088
setting_t rig_has_set_level(RIG *rig, setting_t level)
check settable ability of level settings
Definition: settings.c:326
rig_parm_e
Rig Parameters.
Definition: rig.h:966
int rig_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
set the antenna
Definition: rig.c:4999
int rig_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
set the split mode
Definition: rig.c:4329
shortfreq_t rig_get_resolution(RIG *rig, rmode_t mode)
get the best frequency resolution of the rig
Definition: rig.c:5276
int rig_get_vfo_info(RIG *rig, vfo_t vfo, freq_t *freq, rmode_t *mode, pbwidth_t *width, split_t *split, int *satmode)
get freq/mode/width for requested VFO
Definition: rig.c:6357
pbwidth_t rig_passband_wide(RIG *rig, rmode_t mode)
get the wide passband of a mode
Definition: rig.c:2459
int hl_usleep(rig_useconds_t usec)
provide sleep and usleep replacements
Definition: sleep.c:53
uint64_t setting_t
Setting.
Definition: rig.h:992
powerstat_t
Radio power state.
Definition: rig.h:602
setting_t rig_has_get_func(RIG *rig, setting_t func)
check ability of radio functions
Definition: settings.c:414
int rig_set_uplink(RIG *rig, int val)
For GPredict to avoid reading frequency on uplink VFO.
Definition: rig.c:1312
enum dcd_e dcd_t
DCD status.
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:548
int rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
set the split frequencies
Definition: rig.c:3632
int rig_probe_all(hamlib_port_t *port, rig_probe_func_t cfunc, rig_ptr_t data)
try to guess rigs
Definition: rig.c:5469
rig_errcode_e
Hamlib error codes Error code definition that can be returned by the Hamlib functions....
Definition: rig.h:122
int rig_ext_parm_foreach(RIG *rig, int(*cfunc)(RIG *, const struct confparams *, rig_ptr_t), rig_ptr_t data)
Executes cfunc on all the elements stored in the extparms table.
Definition: ext.c:186
rig_conf_e
parameter types
Definition: rig.h:702
scan_t
Rig Scan operation.
Definition: rig.h:664
int rig_send_voice_mem(RIG *rig, vfo_t vfo, int ch)
send voice memory content
Definition: rig.c:6085
int rig_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length)
receive DTMF digits
Definition: rig.c:5782
int rig_set_mode_callback(RIG *rig, mode_cb_t cb, rig_ptr_t arg)
set the callback for mode events
Definition: event.c:556
int rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
set the frequency of the target VFO
Definition: rig.c:1697
int rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
set PTT on/off
Definition: rig.c:2713
int rig_get_conf(RIG *rig, token_t token, char *val)
get the value of a configuration parameter
Definition: conf.c:1228
double freq_t
Frequency type,.
Definition: rig.h:353
int rig_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
perform Memory/VFO operations
Definition: rig.c:5635
int rig_send_morse(RIG *rig, vfo_t vfo, const char *msg)
send morse code
Definition: rig.c:5857
int rig_setting2idx(setting_t s)
basically convert setting_t expressed 2^n to n
Definition: settings.c:933
int rig_get_ext_parm(RIG *rig, token_t token, value_t *val)
get the value of a parm extra parameter
Definition: settings.c:906
int rig_mem_count(RIG *rig)
get memory channel count
Definition: mem.c:1654
ptt_t
PTT status.
Definition: rig.h:573
RIG * rig_init(rig_model_t rig_model)
allocate a new RIG handle
Definition: rig.c:379
setting_t rig_has_get_parm(RIG *rig, setting_t parm)
check retrieval ability of parameter settings
Definition: settings.c:356
int rig_ext_level_foreach(RIG *rig, int(*cfunc)(RIG *, const struct confparams *, rig_ptr_t), rig_ptr_t data)
Executes cfunc on all the elements stored in the extlevels table.
Definition: ext.c:136
int rig_set_pltune_callback(RIG *rig, pltune_cb_t cb, rig_ptr_t arg)
set the callback for pipelined tuning module
Definition: event.c:678
struct freq_range_list freq_range_t
Frequency range.
int rig_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
set CTCSS sub-tone frequency
Definition: tones.c:100
int rig_set_ext_parm(RIG *rig, token_t token, value_t val)
set a radio parm extra parameter
Definition: settings.c:874
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:2137
vfo_op_t
VFO operation.
Definition: rig.h:638
int rig_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts)
get the current Tuning Step
Definition: rig.c:4918
signed long shortfreq_t
Short frequency type.
Definition: rig.h:375
token_t rig_ext_token_lookup(RIG *rig, const char *name)
Simple lookup returning token id associated with name.
Definition: ext.c:327
const char * rig_version()
get the Hamlib version
Definition: rig.c:6450
int rig_set_conf(RIG *rig, token_t token, const char *val)
set a radio configuration parameter
Definition: conf.c:1175
rig_port_e
Port type.
Definition: rig.h:225
int rig_wait_morse(RIG *rig, vfo_t vfo)
wait morse code
Definition: rig.c:6027
int rig_close(RIG *rig)
close the communication to the rig
Definition: rig.c:1087
pbwidth_t rig_passband_narrow(RIG *rig, rmode_t mode)
get the narrow passband of a mode
Definition: rig.c:2407
serial_handshake_e
Serial handshake.
Definition: rig.h:258
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:809
const chan_t * rig_lookup_mem_caps(RIG *rig, int ch)
lookup the memory type and capabilities
Definition: mem.c:1588
agc_level_e
AGC delay settings.
Definition: rig.h:821
dcd_type_t
DCD type.
Definition: rig.h:557
int rig_get_chan_all(RIG *rig, vfo_t vfo, channel_t chans[])
get all channel data
Definition: mem.c:1212
int rig_set_chan_all(RIG *rig, vfo_t vfo, const channel_t chans[])
set all channel data
Definition: mem.c:1170
int rig_set_vfo_opt(RIG *rig, int status)
set the vfo option for rigctld
Definition: rig.c:6185
int rig_set_ptt_callback(RIG *rig, ptt_cb_t cb, rig_ptr_t arg)
set the callback for ptt events
Definition: event.c:616
pbwidth_t rig_passband_normal(RIG *rig, rmode_t mode)
get the normal passband of a mode
Definition: rig.c:2357
rig_debug_level_e
Hamlib debug levels.
Definition: rig.h:165
#define RIG_SETTING_MAX
Maximum # of rig settings.
Definition: rig.h:998
const struct confparams * rig_ext_lookup_tok(RIG *rig, token_t token)
lookup ext token, return pointer to confparams struct.
Definition: ext.c:283
setting_t rig_has_set_parm(RIG *rig, setting_t parm)
check settable ability of parameter settings
Definition: settings.c:385
const char * rig_license()
get the Hamlib license
Definition: rig.c:6440
int rig_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
set the RIT
Definition: rig.c:4551
const char * rig_copyright()
get the Hamlib copyright
Definition: rig.c:6460
int rig_get_twiddle(RIG *rig, int *seconds)
get the twiddle timeout value (secs)
Definition: rig.c:1338
char debugmsgsave[DEBUGMSGSAVE_SIZE]
get string describing the error code
Definition: rig.c:297
int rig_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
set the Tuning Step
Definition: rig.c:4847
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:5075
int rig_open(RIG *rig)
open the communication to the rig
Definition: rig.c:660
int rig_set_parm(RIG *rig, setting_t parm, value_t val)
set a radio parameter
Definition: settings.c:228
int rig_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code)
get the current encoding DCS code
Definition: tones.c:292
hamlib_port_t port_t
Rig data structure.
Definition: rig.h:2079
int rig_stop_morse(RIG *rig, vfo_t vfo)
stop morse code
Definition: rig.c:5929
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:236
const char * rig_get_info(RIG *rig)
get general information from the radio
Definition: rig.c:6212
setting_t rig_has_get_level(RIG *rig, setting_t level)
check retrieval ability of level settings
Definition: settings.c:296
uint64_t rig_level_e
Rig Level Settings.
Definition: rig.h:878
long token_t
configuration token
Definition: rig.h:680
int rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
get the value of a level
Definition: settings.c:141
int rig_set_chan_all_cb(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t arg)
set all channel data, by callback
Definition: mem.c:1082
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:3912
int rig_reset(RIG *rig, reset_t reset)
reset the radio
Definition: rig.c:5395
int rig_token_foreach(RIG *rig, int(*cfunc)(const struct confparams *, rig_ptr_t), rig_ptr_t data)
call a function against each configuration token of a rig
Definition: conf.c:1034
int rig_set_trn(RIG *rig, int trn)
control the transceive mode
Definition: event.c:707
vfo_op_t rig_has_vfo_op(RIG *rig, vfo_op_t op)
check retrieval ability of VFO operations
Definition: rig.c:5500
unsigned int ant_t
Antenna typedef.
Definition: rig.h:801
int rig_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
get the current repeater shift
Definition: rig.c:3411
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:4034
int rig_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
set the repeater shift
Definition: rig.c:3340
reset_t
Reset operation.
Definition: rig.h:614
int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
get the current split frequencies
Definition: rig.c:3774
int rig_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
perform Memory/VFO operations
Definition: rig.c:5531
rig_status_e
Development status of the backend.
Definition: rig.h:312
int rig_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit)
set the XIT
Definition: rig.c:4699
rig_model_t rig_probe(hamlib_port_t *port)
try to guess a rig
Definition: rig.c:5439
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:6154
chan_type_t
Memory channel type definition.
Definition: rig.h:1446
@ RIG_PARITY_MARK
Definition: rig.h:250
@ RIG_PARITY_NONE
Definition: rig.h:247
@ RIG_PARITY_EVEN
Definition: rig.h:249
@ RIG_PARITY_SPACE
Definition: rig.h:251
@ RIG_PARITY_ODD
Definition: rig.h:248
@ RIG_DCD_ON
Definition: rig.h:548
@ RIG_DCD_OFF
Definition: rig.h:547
@ RIG_SIGNAL_ON
Definition: rig.h:270
@ RIG_SIGNAL_OFF
Definition: rig.h:271
@ RIG_SIGNAL_UNSET
Definition: rig.h:269
@ RIG_FLAG_COMPUTER
Definition: rig.h:284
@ RIG_FLAG_TUNER
Definition: rig.h:289
@ RIG_FLAG_SCANNER
Definition: rig.h:281
@ RIG_FLAG_TRANSMITTER
Definition: rig.h:280
@ RIG_FLAG_MOBILE
Definition: rig.h:282
@ RIG_FLAG_TRUNKING
Definition: rig.h:285
@ RIG_FLAG_APRS
Definition: rig.h:286
@ RIG_FLAG_TNC
Definition: rig.h:287
@ RIG_FLAG_HANDHELD
Definition: rig.h:283
@ RIG_FLAG_DXCLUSTER
Definition: rig.h:288
@ RIG_FLAG_RECEIVER
Definition: rig.h:279
@ RIG_SPLIT_ON
Definition: rig.h:344
@ RIG_SPLIT_OFF
Definition: rig.h:343
@ RIG_RPT_SHIFT_PLUS
Definition: rig.h:335
@ RIG_RPT_SHIFT_MINUS
Definition: rig.h:334
@ RIG_RPT_SHIFT_NONE
Definition: rig.h:333
@ RIG_PTT_RIG
Definition: rig.h:588
@ RIG_PTT_RIG_MICDATA
Definition: rig.h:592
@ RIG_PTT_SERIAL_DTR
Definition: rig.h:589
@ RIG_PTT_NONE
Definition: rig.h:587
@ RIG_PTT_PARALLEL
Definition: rig.h:591
@ RIG_PTT_GPION
Definition: rig.h:595
@ RIG_PTT_GPIO
Definition: rig.h:594
@ RIG_PTT_CM108
Definition: rig.h:593
@ RIG_PTT_SERIAL_RTS
Definition: rig.h:590
@ RIG_ANN_RXMODE
Definition: rig.h:748
@ RIG_ANN_OFF
Definition: rig.h:746
@ RIG_ANN_ENG
Definition: rig.h:750
@ RIG_ANN_FREQ
Definition: rig.h:747
@ RIG_ANN_NONE
Definition: rig.h:745
@ RIG_ANN_CW
Definition: rig.h:749
@ RIG_ANN_JAP
Definition: rig.h:751
@ RIG_PARM_BEEP
Definition: rig.h:971
@ RIG_PARM_TIME
Definition: rig.h:972
@ RIG_PARM_SCREENSAVER
Definition: rig.h:975
@ RIG_PARM_ANN
Definition: rig.h:968
@ RIG_PARM_NONE
Definition: rig.h:967
@ RIG_PARM_BACKLIGHT
Definition: rig.h:970
@ RIG_PARM_KEYLIGHT
Definition: rig.h:974
@ RIG_PARM_BAT
Definition: rig.h:973
@ RIG_PARM_APO
Definition: rig.h:969
@ RIG_POWER_OPERATE
Definition: rig.h:606
@ RIG_POWER_UNKNOWN
Definition: rig.h:607
@ RIG_POWER_STANDBY
Definition: rig.h:605
@ RIG_POWER_OFF
Definition: rig.h:603
@ RIG_POWER_ON
Definition: rig.h:604
@ RIG_ENIMPL
Definition: rig.h:127
@ RIG_ECONF
Definition: rig.h:125
@ RIG_ENAVAIL
Definition: rig.h:134
@ RIG_OK
Definition: rig.h:123
@ RIG_EPROTO
Definition: rig.h:131
@ RIG_EINTERNAL
Definition: rig.h:130
@ RIG_EDOM
Definition: rig.h:140
@ RIG_EIO
Definition: rig.h:129
@ RIG_EVFO
Definition: rig.h:139
@ RIG_ETIMEOUT
Definition: rig.h:128
@ RIG_ENOMEM
Definition: rig.h:126
@ RIG_EARG
Definition: rig.h:138
@ RIG_ERJCTED
Definition: rig.h:132
@ RIG_BUSERROR
Definition: rig.h:136
@ RIG_BUSBUSY
Definition: rig.h:137
@ RIG_ENTARGET
Definition: rig.h:135
@ RIG_EINVAL
Definition: rig.h:124
@ RIG_ETRUNC
Definition: rig.h:133
@ RIG_CONF_STRING
Definition: rig.h:703
@ RIG_CONF_BUTTON
Definition: rig.h:707
@ RIG_CONF_CHECKBUTTON
Definition: rig.h:706
@ RIG_CONF_BINARY
Definition: rig.h:708
@ RIG_CONF_COMBO
Definition: rig.h:704
@ RIG_CONF_NUMERIC
Definition: rig.h:705
@ RIG_SCAN_DELTA
Definition: rig.h:670
@ RIG_SCAN_PLT
Definition: rig.h:672
@ RIG_SCAN_PROG
Definition: rig.h:669
@ RIG_SCAN_MEM
Definition: rig.h:666
@ RIG_SCAN_NONE
Definition: rig.h:665
@ RIG_SCAN_VFO
Definition: rig.h:671
@ RIG_SCAN_PRIO
Definition: rig.h:668
@ RIG_SCAN_SLCT
Definition: rig.h:667
@ RIG_SCAN_STOP
Definition: rig.h:673
@ RIG_PTT_OFF
Definition: rig.h:574
@ RIG_PTT_ON_DATA
Definition: rig.h:577
@ RIG_PTT_ON_MIC
Definition: rig.h:576
@ RIG_PTT_ON
Definition: rig.h:575
@ RIG_OP_CPY
Definition: rig.h:640
@ RIG_OP_DOWN
Definition: rig.h:646
@ RIG_OP_TO_VFO
Definition: rig.h:643
@ RIG_OP_TUNE
Definition: rig.h:651
@ RIG_OP_FROM_VFO
Definition: rig.h:642
@ RIG_OP_MCL
Definition: rig.h:644
@ RIG_OP_RIGHT
Definition: rig.h:650
@ RIG_OP_UP
Definition: rig.h:645
@ RIG_OP_TOGGLE
Definition: rig.h:652
@ RIG_OP_NONE
Definition: rig.h:639
@ RIG_OP_BAND_UP
Definition: rig.h:647
@ RIG_OP_BAND_DOWN
Definition: rig.h:648
@ RIG_OP_LEFT
Definition: rig.h:649
@ RIG_OP_XCHG
Definition: rig.h:641
@ RIG_PORT_PACKET
Definition: rig.h:230
@ RIG_PORT_UDP_NETWORK
Definition: rig.h:236
@ RIG_PORT_NONE
Definition: rig.h:226
@ RIG_PORT_CM108
Definition: rig.h:237
@ RIG_PORT_GPIO
Definition: rig.h:238
@ RIG_PORT_ULTRA
Definition: rig.h:232
@ RIG_PORT_GPION
Definition: rig.h:239
@ RIG_PORT_SERIAL
Definition: rig.h:227
@ RIG_PORT_PARALLEL
Definition: rig.h:234
@ RIG_PORT_NETWORK
Definition: rig.h:228
@ RIG_PORT_DEVICE
Definition: rig.h:229
@ RIG_PORT_RPC
Definition: rig.h:233
@ RIG_PORT_DTMF
Definition: rig.h:231
@ RIG_PORT_USB
Definition: rig.h:235
@ RIG_HANDSHAKE_HARDWARE
Definition: rig.h:261
@ RIG_HANDSHAKE_NONE
Definition: rig.h:259
@ RIG_HANDSHAKE_XONXOFF
Definition: rig.h:260
@ RIG_AGC_USER
Definition: rig.h:826
@ RIG_DCD_SERIAL_CTS
Definition: rig.h:561
@ RIG_DCD_PARALLEL
Definition: rig.h:563
@ RIG_DCD_CM108
Definition: rig.h:564
@ RIG_DCD_RIG
Definition: rig.h:559
@ RIG_DCD_GPION
Definition: rig.h:566
@ RIG_DCD_NONE
Definition: rig.h:558
@ RIG_DCD_SERIAL_DSR
Definition: rig.h:560
@ RIG_DCD_GPIO
Definition: rig.h:565
@ RIG_DCD_SERIAL_CAR
Definition: rig.h:562
@ RIG_DEBUG_ERR
Definition: rig.h:168
@ RIG_DEBUG_BUG
Definition: rig.h:167
@ RIG_DEBUG_WARN
Definition: rig.h:169
@ RIG_DEBUG_TRACE
Definition: rig.h:171
@ RIG_DEBUG_VERBOSE
Definition: rig.h:170
@ RIG_DEBUG_CACHE
Definition: rig.h:172
@ RIG_DEBUG_NONE
Definition: rig.h:166
@ RIG_RESET_MCALL
Definition: rig.h:618
@ RIG_RESET_MASTER
Definition: rig.h:619
@ RIG_RESET_NONE
Definition: rig.h:615
@ RIG_RESET_VFO
Definition: rig.h:617
@ RIG_RESET_SOFT
Definition: rig.h:616
@ RIG_STATUS_STABLE
Definition: rig.h:316
@ RIG_STATUS_BUGGY
Definition: rig.h:317
@ RIG_STATUS_UNTESTED
Definition: rig.h:314
@ RIG_STATUS_BETA
Definition: rig.h:315
@ RIG_STATUS_ALPHA
Definition: rig.h:313
@ RIG_MTYPE_PRIO
Definition: rig.h:1454
@ RIG_MTYPE_EDGE
Definition: rig.h:1449
@ RIG_MTYPE_MEM
Definition: rig.h:1448
@ RIG_MTYPE_CALL
Definition: rig.h:1450
@ RIG_MTYPE_SAT
Definition: rig.h:1452
@ RIG_MTYPE_MEMOPAD
Definition: rig.h:1451
@ RIG_MTYPE_NONE
Definition: rig.h:1447
@ RIG_MTYPE_BAND
Definition: rig.h:1453
Calibration table struct for float values.
Definition: rig.h:1551
float val
Definition: rig.h:1555
struct cal_table_float::@4 table[HAMLIB_MAX_CAL_LENGTH]
int size
Definition: rig.h:1552
int raw
Definition: rig.h:1554
Calibration table struct.
Definition: rig.h:1521
int val
Definition: rig.h:1525
struct cal_table::@3 table[HAMLIB_MAX_CAL_LENGTH]
int raw
Definition: rig.h:1524
int size
Definition: rig.h:1522
Memory channel list definition.
Definition: rig.h:1471
int startc
Definition: rig.h:1472
chan_type_t type
Definition: rig.h:1474
channel_cap_t mem_caps
Definition: rig.h:1476
int endc
Definition: rig.h:1473
Channel capability definition.
Definition: rig.h:1399
unsigned tx_vfo
Definition: rig.h:1412
unsigned tx_freq
Definition: rig.h:1407
unsigned mode
Definition: rig.h:1404
unsigned dcs_code
Definition: rig.h:1422
unsigned rit
Definition: rig.h:1416
unsigned dcs_sql
Definition: rig.h:1423
unsigned rptr_offs
Definition: rig.h:1414
unsigned bank_num
Definition: rig.h:1400
setting_t levels
Definition: rig.h:1419
unsigned width
Definition: rig.h:1405
unsigned rptr_shift
Definition: rig.h:1413
unsigned tx_width
Definition: rig.h:1409
unsigned ctcss_sql
Definition: rig.h:1421
unsigned tx_mode
Definition: rig.h:1408
unsigned freq
Definition: rig.h:1403
setting_t funcs
Definition: rig.h:1418
unsigned ctcss_tone
Definition: rig.h:1420
unsigned ext_levels
Definition: rig.h:1427
unsigned vfo
Definition: rig.h:1401
unsigned ant
Definition: rig.h:1402
unsigned split
Definition: rig.h:1411
unsigned scan_group
Definition: rig.h:1424
unsigned flags
Definition: rig.h:1425
unsigned tuning_step
Definition: rig.h:1415
unsigned xit
Definition: rig.h:1417
unsigned channel_desc
Definition: rig.h:1426
Channel structure.
Definition: rig.h:1355
shortfreq_t tuning_step
Definition: rig.h:1373
rmode_t mode
Definition: rig.h:1361
tone_t ctcss_tone
Definition: rig.h:1378
pbwidth_t tx_width
Definition: rig.h:1366
vfo_t vfo
Definition: rig.h:1358
value_t levels[64]
Definition: rig.h:1377
shortfreq_t rptr_offs
Definition: rig.h:1372
vfo_t tx_vfo
Definition: rig.h:1369
tone_t dcs_code
Definition: rig.h:1380
setting_t funcs
Definition: rig.h:1376
struct ext_list * ext_levels
Definition: rig.h:1385
tone_t ctcss_sql
Definition: rig.h:1379
shortfreq_t xit
Definition: rig.h:1375
int bank_num
Definition: rig.h:1357
pbwidth_t width
Definition: rig.h:1362
freq_t freq
Definition: rig.h:1360
rptr_shift_t rptr_shift
Definition: rig.h:1371
shortfreq_t rit
Definition: rig.h:1374
char channel_desc[HAMLIB_MAXCHANDESC]
Definition: rig.h:1384
rmode_t tx_mode
Definition: rig.h:1365
split_t split
Definition: rig.h:1368
freq_t tx_freq
Definition: rig.h:1364
ant_t ant
Definition: rig.h:1359
unsigned int flags
Definition: rig.h:1383
int scan_group
Definition: rig.h:1382
int channel_num
Definition: rig.h:1356
tone_t dcs_sql
Definition: rig.h:1381
Configuration parameter structure.
Definition: rig.h:719
const char * combostr[RIG_COMBO_MAX]
Definition: rig.h:733
const char * tooltip
Definition: rig.h:723
struct confparams::@0::@2 c
const char * dflt
Definition: rig.h:724
float min
Definition: rig.h:728
token_t token
Definition: rig.h:720
float step
Definition: rig.h:730
const char * label
Definition: rig.h:722
float max
Definition: rig.h:729
const char * name
Definition: rig.h:721
struct confparams::@0::@1 n
enum rig_conf_e type
Definition: rig.h:725
union confparams::@0 u
Extension attribute definition.
Definition: rig.h:1338
token_t token
Definition: rig.h:1339
value_t val
Definition: rig.h:1340
Filter definition.
Definition: rig.h:1306
rmode_t modes
Definition: rig.h:1307
pbwidth_t width
Definition: rig.h:1308
Frequency range.
Definition: rig.h:1239
freq_t startf
Definition: rig.h:1240
freq_t endf
Definition: rig.h:1241
int low_power
Definition: rig.h:1243
char * label
Definition: rig.h:1247
ant_t ant
Definition: rig.h:1246
int high_power
Definition: rig.h:1244
vfo_t vfo
Definition: rig.h:1245
rmode_t modes
Definition: rig.h:1242
level/parm granularity definition
Definition: rig.h:1506
value_t max
Definition: rig.h:1508
value_t step
Definition: rig.h:1509
value_t min
Definition: rig.h:1507
Rig cache data.
Definition: rig.h:2106
Callback functions and args for rig event.
Definition: rig.h:2304
rig_ptr_t mode_arg
Definition: rig.h:2308
ptt_cb_t ptt_event
Definition: rig.h:2311
vfo_cb_t vfo_event
Definition: rig.h:2309
mode_cb_t mode_event
Definition: rig.h:2307
rig_ptr_t freq_arg
Definition: rig.h:2306
rig_ptr_t ptt_arg
Definition: rig.h:2312
rig_ptr_t dcd_arg
Definition: rig.h:2314
dcd_cb_t dcd_event
Definition: rig.h:2313
rig_ptr_t pltune_arg
Definition: rig.h:2316
pltune_cb_t pltune
Definition: rig.h:2315
rig_ptr_t vfo_arg
Definition: rig.h:2310
freq_cb_t freq_event
Definition: rig.h:2305
Rig state containing live data and customized fields.
Definition: rig.h:2179
int auto_power_on
Definition: rig.h:2252
int attenuator[HAMLIB_MAXDBLSTSIZ]
Definition: rig.h:2208
int vfo_opt
Definition: rig.h:2251
int twiddle_rit
Definition: rig.h:2264
setting_t has_set_parm
Definition: rig.h:2215
rmode_t mode_list
Definition: rig.h:2239
shortfreq_t max_rit
Definition: rig.h:2201
freq_t lo_freq
Definition: rig.h:2245
int power_max
Definition: rig.h:2262
gran_t parm_gran[64]
Definition: rig.h:2218
freq_range_t rx_range_list[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2190
int hold_decode
Definition: rig.h:2225
int transceive
Definition: rig.h:2232
rmode_t current_mode
Definition: rig.h:2235
setting_t has_set_func
Definition: rig.h:2211
int uplink
Definition: rig.h:2249
rig_ptr_t obj
Definition: rig.h:2230
int twiddle_state
Definition: rig.h:2265
struct filter_list filters[HAMLIB_FLTLSTSIZ]
Definition: rig.h:2195
pbwidth_t current_width
Definition: rig.h:2237
int ptt_share
Definition: rig.h:2259
rig_ptr_t priv
Definition: rig.h:2229
freq_range_t tx_range_list[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2191
freq_t current_freq
Definition: rig.h:2234
hamlib_port_t dcdport
Definition: rig.h:2185
time_t twiddle_time
Definition: rig.h:2246
vfo_t tx_vfo
Definition: rig.h:2238
int deprecated_itu_region
Definition: rig.h:2189
int power_min
Definition: rig.h:2261
double vfo_comp
Definition: rig.h:2187
setting_t has_set_level
Definition: rig.h:2213
shortfreq_t max_xit
Definition: rig.h:2202
hamlib_port_t rigport
Definition: rig.h:2183
int power_now
Definition: rig.h:2260
int twiddle_timeout
Definition: rig.h:2247
int poll_interval
Definition: rig.h:2233
unsigned char disable_yaesu_bandselect
Definition: rig.h:2263
int auto_power_off
Definition: rig.h:2254
setting_t has_get_parm
Definition: rig.h:2214
int preamp[HAMLIB_MAXDBLSTSIZ]
Definition: rig.h:2207
vfo_t current_vfo
Definition: rig.h:2226
int auto_disable_screensaver
Definition: rig.h:2256
int comm_state
Definition: rig.h:2228
int vfo_list
Definition: rig.h:2227
setting_t has_get_level
Definition: rig.h:2212
setting_t has_get_func
Definition: rig.h:2210
int transmit
Definition: rig.h:2242
ann_t announces
Definition: rig.h:2205
cal_table_t str_cal
Definition: rig.h:2197
shortfreq_t max_ifshift
Definition: rig.h:2203
gran_t level_gran[64]
Definition: rig.h:2217
hamlib_port_t pttport
Definition: rig.h:2184
struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ]
Definition: rig.h:2193
The Rig structure.
Definition: rig.h:2330
struct rig_callbacks callbacks
Definition: rig.h:2333
struct rig_state state
Definition: rig.h:2332
struct rig_caps * caps
Definition: rig.h:2331
Tuning step definition.
Definition: rig.h:1271
rmode_t modes
Definition: rig.h:1272
shortfreq_t ts
Definition: rig.h:1273
Universal approach for passing values.
Definition: rig.h:856
char * s
Definition: rig.h:859
float f
Definition: rig.h:858
const char * cs
Definition: rig.h:860
signed int i
Definition: rig.h:857