Hamlib  4.7~git
rig.h
Go to the documentation of this file.
1 /*
2  * Hamlib Interface - API header
3  * Copyright (c) 2000-2003 by Frank Singleton
4  * Copyright (c) 2000-2012 by Stephane Fillod
5  *
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  *
21  */
22 /* SPDX-License-Identifier: LGPL-2.1-or-later */
23 
24 #ifndef _RIG_H
25 #define _RIG_H 1
26 
27 // as of 2023-11-23 rig_caps is no longer constant
28 // this #define allows clients to test which declaration to use for backwards compatibility
29 #define RIGCAPS_NOT_CONST 1
30 
31 #define BUILTINFUNC 0
32 
33 // Our shared secret password
34 #define HAMLIB_SECRET_LENGTH 32
35 
36 #define HAMLIB_TRACE rig_debug(RIG_DEBUG_TRACE,"%s%s(%d) trace\n",spaces(STATE(rig)->depth), __FILE__, __LINE__)
37 #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
38 
39 #include <stdio.h>
40 #include <stdarg.h>
41 #include <string.h>
42 #include <inttypes.h>
43 #include <time.h>
44 
45 // to stop warnings about including winsock2.h before windows.h
46 #if defined(_WIN32)
47 #include <winsock2.h>
48 #include <windows.h>
49 #include <ws2tcpip.h>
50 #else
51 #include <sys/socket.h>
52 #include <netinet/in.h>
53 #include <arpa/inet.h>
54 #endif
55 
56 // mingw64 still shows __TIMESIZE != 64
57 // need to do more testing
58 #if 0
59 #if __TIMESIZE != 64
60 #warning TIMESIZE != 64 -- Please report your OS system to hamlib-developer@lists.sourceforge.net
61 #endif
62 #endif
63 
64 // For MSVC install the NUGet pthread package
65 #if defined(_MSC_VER)
66 #define HAVE_STRUCT_TIMESPEC
67 #endif
68 #include <pthread.h>
69 
70 /* Rig list is in a separate file so as not to mess up w/ this one */
71 #include <hamlib/riglist.h>
72 //#include <hamlib/config.h>
73 
87 /* __BEGIN_DECLS should be used at the beginning of your declarations,
88  * so that C++ compilers don't mangle their names. Use __END_DECLS at
89  * the end of C declarations. */
91 #undef __BEGIN_DECLS
92 #undef __END_DECLS
93 #ifdef __cplusplus
94 # define __BEGIN_DECLS extern "C" {
95 # define __END_DECLS }
96 #else
97 # define __BEGIN_DECLS /* empty */
98 # define __END_DECLS /* empty */
99 #endif
101 
102 /* HAMLIB_PARAMS is a macro used to wrap function prototypes, so that compilers
103  * that don't understand ANSI C prototypes still work, and ANSI C
104  * compilers can issue warnings about type mismatches. */
106 #undef HAMLIB_PARAMS
107 #if defined (__STDC__) \
108  || defined (_AIX) \
109  || (defined (__mips) && defined (_SYSTYPE_SVR4)) \
110  || defined(__CYGWIN__) \
111  || defined(_WIN32) \
112  || defined(__cplusplus)
113 # define HAMLIB_PARAMS(protos) protos
114 # define rig_ptr_t void *
115 # define amp_ptr_t void *
116 #else
117 # define HAMLIB_PARAMS(protos) ()
118 # define rig_ptr_t char *
119 # define amp_ptr_t char *
120 #endif
122 
123 #include <hamlib/rig_dll.h>
124 
125 #ifndef SWIGLUA
127 #define CONSTANT_64BIT_FLAG(BIT) (1ull << (BIT))
129 #else
130 /* SWIG's older Lua generator doesn't grok ull due to Lua using a
131  double-precision floating point type internally for number
132  representations (max 53 bits of precision) so makes a string
133  constant from a constant number literal using ull */
134 // #define CONSTANT_64BIT_FLAG(BIT) (1 << (BIT))
135 // #define SWIGLUAHIDE
136 /* But this appears to have been fixed so we'll use the correct one now
137  If you have the older version of SWIG comment out this line and use
138  the two above */
139 // This 1ul definition works on swig 4.0.1 and lua 5.3.5
140 #define CONSTANT_64BIT_FLAG(BIT) (1ul << (BIT))
141 #endif
142 
143 __BEGIN_DECLS
144 
145 // FIFO currently used for send_morse queue
146 #define HAMLIB_FIFO_SIZE 1024
147 
148 typedef struct
149 {
150  char data[HAMLIB_FIFO_SIZE];
151  int head;
152  int tail;
153  int flush; // flush flag for stop_morse
154 #ifdef _PTHREAD_H
155  pthread_mutex_t mutex;
156 #else
157  int mutex;
158 #endif
159 } FIFO_RIG;
160 
161 
166 // cookie is 26-char time code plus 10-char (2^31-1) random number
167 #define HAMLIB_COOKIE_SIZE 37
168 extern int cookie_use; // this is global as once one client requests it everybody needs to honor it
169 extern int skip_init; // allow rigctl to skip any radio commands at startup
170 
172 extern HAMLIB_EXPORT_VAR(const char) hamlib_version[];
173 extern HAMLIB_EXPORT_VAR(const char) hamlib_copyright[];
174 extern HAMLIB_EXPORT_VAR(const char *) hamlib_version2;
175 extern HAMLIB_EXPORT_VAR(const char *) hamlib_copyright2;
177 
189  RIG_OK = 0,
212  RIG_EEND // MUST BE LAST ITEM IN LAST
213 };
223 #define RIG_IS_SOFT_ERRCODE(errcode) (errcode == RIG_EINVAL || errcode == RIG_ENIMPL || errcode == RIG_ERJCTED \
224  || errcode == RIG_ETRUNC || errcode == RIG_ENAVAIL || errcode == RIG_ENTARGET \
225  || errcode == RIG_EVFO || errcode == RIG_EDOM || errcode == RIG_EDEPRECATED \
226  || errcode == RIG_ESECURITY || errcode == RIG_EPOWER)
227 
231 #define NETRIGCTL_RET "RPRT "
232 
233 
249 };
250 
251 
252 /* --------------- Rig capabilities -----------------*/
253 
254 /* Forward struct references */
255 
256 struct rig;
257 struct rig_state;
258 
262 typedef struct s_rig RIG;
263 
265 #define HAMLIB_RIGNAMSIZ 30
266 #define HAMLIB_RIGVERSIZ 8
267 #define HAMLIB_FILPATHLEN 512
268 #define HAMLIB_FRQRANGESIZ 30
269 #define HAMLIB_MAXCHANDESC 30 /* describe channel eg: "WWV 5Mhz" */
270 #define HAMLIB_TSLSTSIZ 20 /* max tuning step list size, zero ended */
271 #define HAMLIB_FLTLSTSIZ 60 /* max mode/filter list size, zero ended */
272 #define HAMLIB_MAXDBLSTSIZ 8 /* max preamp/att levels supported, zero ended */
273 #define HAMLIB_CHANLSTSIZ 16 /* max mem_list size, zero ended */
274 #define HAMLIB_MAX_AGC_LEVELS 8 /* max AGC levels supported */
275 #define HAMLIB_MAX_SPECTRUM_SCOPES 4 /* max number of spectrum scopes supported */
276 #define HAMLIB_MAX_SPECTRUM_MODES 5 /* max number of spectrum modes supported */
277 #define HAMLIB_MAX_SPECTRUM_AVG_MODES 12 /* max number of spectrum averaging modes supported */
278 #define HAMLIB_MAX_SPECTRUM_SPANS 20 /* max number of spectrum modes supported */
279 #define HAMLIB_MAX_SPECTRUM_DATA 2048 /* max number of data bytes in a single spectrum line */
280 #define HAMLIB_MAX_CAL_LENGTH 32 /* max calibration plots in cal_table_t */
281 #define HAMLIB_MAX_MODES 63
282 #define HAMLIB_MAX_VFOS 31
283 #define HAMLIB_MAX_ROTORS 63
284 #define HAMLIB_MAX_VFO_OPS 31
285 #define HAMLIB_MAX_RSCANS 31
286 #define HAMLIB_MAX_SNAPSHOT_PACKET_SIZE 16384 /* maximum number of bytes in a UDP snapshot packet */
288 
289 
300 #define CTCSS_LIST_SIZE 60
301 #define DCS_LIST_SIZE 128
302 typedef unsigned int tone_t;
303 
304 
310 typedef enum rig_port_e {
326 
327 
337 };
338 
339 
347 };
348 
349 
357 };
358 
359 
363 typedef enum {
364  RIG_FLAG_RECEIVER = (1 << 1),
365  RIG_FLAG_TRANSMITTER = (1 << 2),
366  RIG_FLAG_SCANNER = (1 << 3),
367  RIG_FLAG_MOBILE = (1 << 4),
368  RIG_FLAG_HANDHELD = (1 << 5),
369  RIG_FLAG_COMPUTER = (1 << 6),
370  RIG_FLAG_TRUNKING = (1 << 7),
371  RIG_FLAG_APRS = (1 << 8),
372  RIG_FLAG_TNC = (1 << 9),
373  RIG_FLAG_DXCLUSTER = (1 << 10),
374  RIG_FLAG_TUNER = (1 << 11)
376 
380 /* TODO: kill me, and replace by real AGC delay */
382  RIG_AGC_OFF = 0,
383  RIG_AGC_SUPERFAST,
384  RIG_AGC_FAST,
385  RIG_AGC_SLOW,
387  RIG_AGC_MEDIUM,
388  RIG_AGC_AUTO,
389  RIG_AGC_LONG,
391  RIG_AGC_NONE
392 };
393 
394 
396 #define RIG_FLAG_TRANSCEIVER (RIG_FLAG_RECEIVER|RIG_FLAG_TRANSMITTER)
397 #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)
398 
399 #define RIG_TYPE_OTHER 0
400 #define RIG_TYPE_TRANSCEIVER RIG_FLAG_TRANSCEIVER
401 #define RIG_TYPE_HANDHELD (RIG_FLAG_TRANSCEIVER|RIG_FLAG_HANDHELD)
402 #define RIG_TYPE_MOBILE (RIG_FLAG_TRANSCEIVER|RIG_FLAG_MOBILE)
403 #define RIG_TYPE_RECEIVER RIG_FLAG_RECEIVER
404 #define RIG_TYPE_PCRECEIVER (RIG_FLAG_COMPUTER|RIG_FLAG_RECEIVER)
405 #define RIG_TYPE_SCANNER (RIG_FLAG_SCANNER|RIG_FLAG_RECEIVER)
406 #define RIG_TYPE_TRUNKSCANNER (RIG_TYPE_SCANNER|RIG_FLAG_TRUNKING)
407 #define RIG_TYPE_COMPUTER (RIG_FLAG_TRANSCEIVER|RIG_FLAG_COMPUTER)
408 #define RIG_TYPE_TUNER RIG_FLAG_TUNER
410 
411 
421  /* RIG_STATUS_NEW * *!< Initial release of code
422  * !! Use of RIG_STATUS_NEW is deprecated. Do not use it anymore */
423 };
424 
429 #define RIG_STATUS_NEW RIG_STATUS_UNTESTED
430 
431 
435 typedef enum {
440 
441 
445 typedef enum {
448 } split_t;
449 
450 
456 typedef double freq_t;
457 
461 #define PRIfreq ".0f"
462 
466 #define SCNfreq "lf"
470 #define FREQFMT SCNfreq
471 
472 
478 typedef signed long shortfreq_t;
479 
481 #define Hz(f) ((freq_t)(f))
483 #define kHz(f) ((freq_t)((f)*(freq_t)1000))
485 #define MHz(f) ((freq_t)((f)*(freq_t)1000000))
487 #define GHz(f) ((freq_t)((f)*(freq_t)1000000000))
488 
490 #define s_Hz(f) ((shortfreq_t)(f))
492 #define s_kHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000))
494 #define s_MHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000))
496 #define s_GHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000000))
497 
499 #define RIG_FREQ_NONE Hz(0)
500 
501 
516 typedef unsigned int vfo_t;
517 
520 #define RIG_VFO_N(n) (1u<<(n))
521 
523 #define RIG_VFO_NONE 0
524 
526 #define RIG_VFO_A RIG_VFO_N(0)
527 
529 #define RIG_VFO_B RIG_VFO_N(1)
530 
532 #define RIG_VFO_C RIG_VFO_N(2)
533 
534 // Any addition VFOS need to go from 3-20
535 // To maintain backward compatibility these values cannot change
536 
538 #define RIG_VFO_SUB_A RIG_VFO_N(21)
539 
541 #define RIG_VFO_SUB_B RIG_VFO_N(22)
542 
544 #define RIG_VFO_SUB_C RIG_VFO_N(3)
545 
547 #define RIG_VFO_MAIN_A RIG_VFO_N(23)
548 
550 #define RIG_VFO_MAIN_B RIG_VFO_N(24)
551 
553 #define RIG_VFO_MAIN_C RIG_VFO_N(4)
554 
556 #define RIG_VFO_OTHER RIG_VFO_N(5)
557 
559 #define RIG_VFO_SUB RIG_VFO_N(25)
560 
562 #define RIG_VFO_MAIN RIG_VFO_N(26)
563 
565 #define RIG_VFO_VFO RIG_VFO_N(27)
566 
568 #define RIG_VFO_MEM RIG_VFO_N(28)
569 
571 #define RIG_VFO_CURR RIG_VFO_N(29)
572 
574 #define RIG_VFO_TX_FLAG RIG_VFO_N(30)
575 
577 #define RIG_VFO_ALL RIG_VFO_N(31)
578 
579 // we can also use RIG_VFO_N(31) if needed
580 
581 // Misc VFO Macros
582 
584 #define RIG_VFO_TX_VFO(v) ((v)|RIG_VFO_TX_FLAG)
585 
587 #define RIG_VFO_TX RIG_VFO_TX_VFO(RIG_VFO_CURR)
588 
590 #define RIG_VFO_RX RIG_VFO_CURR
591 
592 
593 /*
594  * targetable bitfields, for internal use.
595  * In rig.c lack of a flag will case a VFO change if needed
596  * So setting this flag will mean the backend handles any VFO needs
597  * For many rigs RITXIT, PTT, MEM, and BANK are non-VFO commands so need these flags to avoid unnecessary VFO swapping
598  */
600 #define RIG_TARGETABLE_NONE 0
601 #define RIG_TARGETABLE_FREQ (1<<0)
602 #define RIG_TARGETABLE_MODE (1<<1) // mode by vfo or same mode on both vfos
603 #define RIG_TARGETABLE_PURE (1<<2) // deprecated -- not used -- reuse it
604 #define RIG_TARGETABLE_TONE (1<<3)
605 #define RIG_TARGETABLE_FUNC (1<<4)
606 #define RIG_TARGETABLE_LEVEL (1<<5)
607 #define RIG_TARGETABLE_RITXIT (1<<6)
608 #define RIG_TARGETABLE_PTT (1<<7)
609 #define RIG_TARGETABLE_MEM (1<<8)
610 #define RIG_TARGETABLE_BANK (1<<9)
611 #define RIG_TARGETABLE_ANT (1<<10)
612 #define RIG_TARGETABLE_ROOFING (1<<11) // roofing filter targetable by VFO
613 #define RIG_TARGETABLE_SPECTRUM (1<<12) // spectrum scope targetable by VFO
614 #define RIG_TARGETABLE_BAND (1<<13) // Band select -- e.g. Yaesu BS command
615 #define RIG_TARGETABLE_COMMON (RIG_TARGETABLE_RITXIT | RIG_TARGETABLE_PTT | RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK)
616 #define RIG_TARGETABLE_ALL 0x7fffffff
618 //
619 //
620 // Newer Icoms like the 9700 and 910 have VFOA/B on both Main & Sub
621 // Compared to older rigs which have one or the other
622 // So we need to distinguish between them
624 #define VFO_HAS_A_B ((STATE(rig)->vfo_list & (RIG_VFO_A|RIG_VFO_B)) == (RIG_VFO_A|RIG_VFO_B))
625 #define VFO_HAS_MAIN_SUB ((STATE(rig)->vfo_list & (RIG_VFO_MAIN|RIG_VFO_SUB)) == (RIG_VFO_MAIN|RIG_VFO_SUB))
626 #define VFO_HAS_MAIN_SUB_ONLY ((!VFO_HAS_A_B) & VFO_HAS_MAIN_SUB)
627 #define VFO_HAS_MAIN_SUB_A_B_ONLY (VFO_HAS_A_B & VFO_HAS_MAIN_SUB)
628 #define VFO_HAS_A_B_ONLY (VFO_HAS_A_B & (!VFO_HAS_MAIN_SUB))
629 #define VFO_DUAL (RIG_VFO_MAIN_A|RIG_VFO_MAIN_B|RIG_VFO_SUB_A|RIG_VFO_SUB_B)
630 #define VFO_HAS_DUAL ((STATE(rig)->vfo_list & VFO_DUAL) == VFO_DUAL)
632 
637 #define RIG_PASSBAND_NORMAL s_Hz(0)
638 
642 #define RIG_PASSBAND_NOCHANGE s_Hz(-1)
643 
649 
650 typedef float agc_time_t;
651 
652 typedef enum dcd_e {
654  RIG_DCD_ON
655 } dcd_t;
656 
657 
663 typedef enum {
673 } dcd_type_t;
674 
675 
679 typedef enum {
685 
686 
692 typedef enum {
702 } ptt_type_t;
703 
704 
708 typedef enum {
710  RIG_POWER_ON = (1 << 0),
711  RIG_POWER_STANDBY = (1 << 1),
712  RIG_POWER_OPERATE = (1 << 2),
713  RIG_POWER_UNKNOWN = (1 << 3)
715 
716 
720 typedef enum {
722  RIG_RESET_SOFT = (1 << 0),
723  RIG_RESET_VFO = (1 << 1),
724  RIG_RESET_MCALL = (1 << 2),
725  RIG_RESET_MASTER = (1 << 3)
727 
728 typedef enum {
729  RIG_CLIENT_UNKNOWN,
730  RIG_CLIENT_WSJTX,
731  RIG_CLIENT_GPREDICT
732 } client_t;
733 
734 
750 typedef enum {
752  RIG_OP_CPY = (1 << 0),
753  RIG_OP_XCHG = (1 << 1),
754  RIG_OP_FROM_VFO = (1 << 2),
755  RIG_OP_TO_VFO = (1 << 3),
756  RIG_OP_MCL = (1 << 4),
757  RIG_OP_UP = (1 << 5),
758  RIG_OP_DOWN = (1 << 6),
759  RIG_OP_BAND_UP = (1 << 7),
760  RIG_OP_BAND_DOWN = (1 << 8),
761  RIG_OP_LEFT = (1 << 9),
762  RIG_OP_RIGHT = (1 << 10),
763  RIG_OP_TUNE = (1 << 11),
764  RIG_OP_TOGGLE = (1 << 12)
766 
774 typedef enum { // numbers here reflect the Yaesu values
785  RIG_BAND_6M = 10,
787  RIG_BAND_MW = 12,
792 } hamlib_band_t;
793 
794 typedef enum { // numbers here reflect generic values -- need to map to rig values
795  RIG_BANDSELECT_UNUSED = CONSTANT_64BIT_FLAG(0),
796  RIG_BANDSELECT_2200M = CONSTANT_64BIT_FLAG(1),
797  RIG_BANDSELECT_600M = CONSTANT_64BIT_FLAG(2),
798  RIG_BANDSELECT_160M = CONSTANT_64BIT_FLAG(3),
799  RIG_BANDSELECT_80M = CONSTANT_64BIT_FLAG(4),
800  RIG_BANDSELECT_60M = CONSTANT_64BIT_FLAG(5),
801  RIG_BANDSELECT_40M = CONSTANT_64BIT_FLAG(6),
802  RIG_BANDSELECT_30M = CONSTANT_64BIT_FLAG(7),
803  RIG_BANDSELECT_20M = CONSTANT_64BIT_FLAG(8),
804  RIG_BANDSELECT_17M = CONSTANT_64BIT_FLAG(9),
805  RIG_BANDSELECT_15M = CONSTANT_64BIT_FLAG(10),
806  RIG_BANDSELECT_12M = CONSTANT_64BIT_FLAG(11),
807  RIG_BANDSELECT_10M = CONSTANT_64BIT_FLAG(12),
808  RIG_BANDSELECT_6M = CONSTANT_64BIT_FLAG(13),
809  RIG_BANDSELECT_WFM = CONSTANT_64BIT_FLAG(14),
810  RIG_BANDSELECT_GEN = CONSTANT_64BIT_FLAG(15),
811  RIG_BANDSELECT_MW = CONSTANT_64BIT_FLAG(16),
812  RIG_BANDSELECT_AIR = CONSTANT_64BIT_FLAG(17),
813  RIG_BANDSELECT_4M = CONSTANT_64BIT_FLAG(18),
814  RIG_BANDSELECT_2M = CONSTANT_64BIT_FLAG(19),
815  RIG_BANDSELECT_1_25M = CONSTANT_64BIT_FLAG(20),
816  RIG_BANDSELECT_70CM = CONSTANT_64BIT_FLAG(21),
817  RIG_BANDSELECT_33CM = CONSTANT_64BIT_FLAG(22),
818  RIG_BANDSELECT_23CM = CONSTANT_64BIT_FLAG(23),
819  RIG_BANDSELECT_13CM = CONSTANT_64BIT_FLAG(24),
820  RIG_BANDSELECT_9CM = CONSTANT_64BIT_FLAG(25),
821  RIG_BANDSELECT_5CM = CONSTANT_64BIT_FLAG(26),
822  RIG_BANDSELECT_3CM = CONSTANT_64BIT_FLAG(27),
824 
825 
826 #define RIG_BANDSELECT_ALL
827 #define RIG_BANDSELECT_LF (RIG_BANDSELECT_2200M | RIG_BANDSELECT_600M)
828 #define RIG_BANDSELECT_HF (RIG_BANDSELECT_160M | RIG_BANDSELECT_80M | RIG_BANDSELECT_60M | RIG_BANDSELECT_40M\
829 | RIG_BANDSELECT_30M | RIG_BANDSELECT_20M | RIG_BANDSELECT_17M | RIG_BANDSELECT_15M | RIG_BANDSELECT_12M\
830 RIG_BANDSELECT_10M | RIG_BANDSELECT_6M)
831 #define RIG_BANDSELECT_VHF (RIG_BANDSELECT_AIR | RIG_BANDSELECT_2M| RIG_BANDSELECT_1_25M(
832 #define RIG_BANDSELECT_UHF (RIG_BANDSELECT_70CM)
833 
834 
843 typedef enum {
845  RIG_SCAN_MEM = (1 << 0),
846  RIG_SCAN_SLCT = (1 << 1),
847  RIG_SCAN_PRIO = (1 << 2),
848  RIG_SCAN_PROG = (1 << 3),
849  RIG_SCAN_DELTA = (1 << 4),
850  RIG_SCAN_VFO = (1 << 5),
851  RIG_SCAN_PLT = (1 << 6),
852  RIG_SCAN_STOP = (1 << 7)
854 
855 
859 typedef long hamlib_token_t;
860 #define token_t hamlib_token_t
861 
862 
864 #define RIG_CONF_END 0
866 
867 
881 /* strongly inspired from soundmodem. Thanks Thomas! */
889  RIG_CONF_INT
890 };
891 
893 #define RIG_COMBO_MAX 16
894 #define RIG_BIN_MAX 80
896 
900 struct confparams {
902  const char *name;
903  const char *label;
904  const char *tooltip;
905  const char *dflt;
906  enum rig_conf_e type;
907  union {
908  struct {
909  float min;
910  float max;
911  float step;
912  } n;
913  struct {
914  const char *combostr[RIG_COMBO_MAX];
915  } c;
916  } u;
917 };
918 
919 
925 typedef enum {
928  RIG_ANN_FREQ = (1 << 0),
929  RIG_ANN_RXMODE = (1 << 1),
930  RIG_ANN_CW = (1 << 2),
931  RIG_ANN_ENG = (1 << 3),
932  RIG_ANN_JAP = (1 << 4)
934 
935 
982 typedef unsigned int ant_t;
983 
984 #define RIG_ANT_NONE 0
985 #define RIG_ANT_N(n) ((ant_t)1<<(n))
986 #define RIG_ANT_1 RIG_ANT_N(0)
987 #define RIG_ANT_2 RIG_ANT_N(1)
988 #define RIG_ANT_3 RIG_ANT_N(2)
989 #define RIG_ANT_4 RIG_ANT_N(3)
990 #define RIG_ANT_5 RIG_ANT_N(4)
991 
992 #define RIG_ANT_UNKNOWN RIG_ANT_N(30)
993 #define RIG_ANT_CURR RIG_ANT_N(31)
994 
995 #define RIG_ANT_MAX 32
996 
997 
999 #define RIG_AGC_LAST 99999
1001 
1002 #if 1 // deprecated
1006 enum meter_level_e {
1007  RIG_METER_NONE = 0, /*< No display meter */
1008  RIG_METER_SWR = (1 << 0), /*< Stationary Wave Ratio */
1009  RIG_METER_COMP = (1 << 1), /*< Compression level */
1010  RIG_METER_ALC = (1 << 2), /*< ALC */
1011  RIG_METER_IC = (1 << 3), /*< IC */
1012  RIG_METER_DB = (1 << 4), /*< DB */
1013  RIG_METER_PO = (1 << 5), /*< Power Out */
1014  RIG_METER_VDD = (1 << 6), /*< Final Amp Voltage */
1015  RIG_METER_TEMP = (1 << 7) /*< Final Amp Temperature */
1016 };
1017 #endif
1018 
1019 
1025 typedef union {
1026  signed int i;
1027  unsigned int u;
1028  float f;
1029  char *s;
1030  const char *cs;
1032  struct {
1033  int l;
1034  unsigned char *d; /* Pointer to data buffer */
1035  } b;
1037 } value_t;
1038 
1039 
1048 typedef uint64_t rig_level_e;
1049 #define RIG_LEVEL_NONE 0
1050 #define RIG_LEVEL_PREAMP CONSTANT_64BIT_FLAG(0)
1051 #define RIG_LEVEL_ATT CONSTANT_64BIT_FLAG(1)
1052 #define RIG_LEVEL_VOXDELAY CONSTANT_64BIT_FLAG(2)
1053 #define RIG_LEVEL_AF CONSTANT_64BIT_FLAG(3)
1054 #define RIG_LEVEL_RF CONSTANT_64BIT_FLAG(4)
1055 #define RIG_LEVEL_SQL CONSTANT_64BIT_FLAG(5)
1056 #define RIG_LEVEL_IF CONSTANT_64BIT_FLAG(6)
1057 #define RIG_LEVEL_APF CONSTANT_64BIT_FLAG(7)
1058 #define RIG_LEVEL_NR CONSTANT_64BIT_FLAG(8)
1059 #define RIG_LEVEL_PBT_IN CONSTANT_64BIT_FLAG(9)
1060 #define RIG_LEVEL_PBT_OUT CONSTANT_64BIT_FLAG(10)
1061 #define RIG_LEVEL_CWPITCH CONSTANT_64BIT_FLAG(11)
1062 #define RIG_LEVEL_RFPOWER CONSTANT_64BIT_FLAG(12)
1063 #define RIG_LEVEL_MICGAIN CONSTANT_64BIT_FLAG(13)
1064 #define RIG_LEVEL_KEYSPD CONSTANT_64BIT_FLAG(14)
1065 #define RIG_LEVEL_NOTCHF CONSTANT_64BIT_FLAG(15)
1066 #define RIG_LEVEL_COMP CONSTANT_64BIT_FLAG(16)
1067 #define RIG_LEVEL_AGC CONSTANT_64BIT_FLAG(17)
1068 #define RIG_LEVEL_BKINDL CONSTANT_64BIT_FLAG(18)
1069 #define RIG_LEVEL_BALANCE CONSTANT_64BIT_FLAG(19)
1070 #define RIG_LEVEL_METER CONSTANT_64BIT_FLAG(20)
1071 #define RIG_LEVEL_VOXGAIN CONSTANT_64BIT_FLAG(21)
1072 #define RIG_LEVEL_ANTIVOX CONSTANT_64BIT_FLAG(22)
1073 #define RIG_LEVEL_SLOPE_LOW CONSTANT_64BIT_FLAG(23)
1074 #define RIG_LEVEL_SLOPE_HIGH CONSTANT_64BIT_FLAG(24)
1075 #define RIG_LEVEL_BKIN_DLYMS CONSTANT_64BIT_FLAG(25)
1078 #define RIG_LEVEL_RAWSTR CONSTANT_64BIT_FLAG(26)
1079 //#define RIG_LEVEL_SQLSTAT CONSTANT_64BIT_FLAG(27) /*!< \c SQLSTAT -- SQL status, arg int (open=1/closed=0). Deprecated, use get_dcd instead */
1080 #define RIG_LEVEL_SWR CONSTANT_64BIT_FLAG(28)
1081 #define RIG_LEVEL_ALC CONSTANT_64BIT_FLAG(29)
1082 #define RIG_LEVEL_STRENGTH CONSTANT_64BIT_FLAG(30)
1083  /* RIG_LEVEL_BWC (1<<31) */
1084 #define RIG_LEVEL_RFPOWER_METER CONSTANT_64BIT_FLAG(32)
1085 #define RIG_LEVEL_COMP_METER CONSTANT_64BIT_FLAG(33)
1086 #define RIG_LEVEL_VD_METER CONSTANT_64BIT_FLAG(34)
1087 #define RIG_LEVEL_ID_METER CONSTANT_64BIT_FLAG(35)
1089 #define RIG_LEVEL_NOTCHF_RAW CONSTANT_64BIT_FLAG(36)
1090 #define RIG_LEVEL_MONITOR_GAIN CONSTANT_64BIT_FLAG(37)
1091 #define RIG_LEVEL_NB CONSTANT_64BIT_FLAG(38)
1092 #define RIG_LEVEL_RFPOWER_METER_WATTS CONSTANT_64BIT_FLAG(39)
1093 #define RIG_LEVEL_SPECTRUM_MODE CONSTANT_64BIT_FLAG(40)
1094 #define RIG_LEVEL_SPECTRUM_SPAN CONSTANT_64BIT_FLAG(41)
1095 #define RIG_LEVEL_SPECTRUM_EDGE_LOW CONSTANT_64BIT_FLAG(42)
1096 #define RIG_LEVEL_SPECTRUM_EDGE_HIGH CONSTANT_64BIT_FLAG(43)
1097 #define RIG_LEVEL_SPECTRUM_SPEED CONSTANT_64BIT_FLAG(44)
1098 #define RIG_LEVEL_SPECTRUM_REF CONSTANT_64BIT_FLAG(45)
1099 #define RIG_LEVEL_SPECTRUM_AVG CONSTANT_64BIT_FLAG(46)
1100 #define RIG_LEVEL_SPECTRUM_ATT CONSTANT_64BIT_FLAG(47)
1101 #define RIG_LEVEL_TEMP_METER CONSTANT_64BIT_FLAG(48)
1102 #define RIG_LEVEL_BAND_SELECT CONSTANT_64BIT_FLAG(49)
1103 #define RIG_LEVEL_USB_AF CONSTANT_64BIT_FLAG(50)
1104 #define RIG_LEVEL_USB_AF_INPUT CONSTANT_64BIT_FLAG(51)
1105 #define RIG_LEVEL_AGC_TIME CONSTANT_64BIT_FLAG(52)
1106 #define RIG_LEVEL_53 CONSTANT_64BIT_FLAG(53)
1107 #define RIG_LEVEL_54 CONSTANT_64BIT_FLAG(54)
1108 #define RIG_LEVEL_55 CONSTANT_64BIT_FLAG(55)
1109 #define RIG_LEVEL_56 CONSTANT_64BIT_FLAG(56)
1110 #define RIG_LEVEL_57 CONSTANT_64BIT_FLAG(57)
1111 #define RIG_LEVEL_58 CONSTANT_64BIT_FLAG(58)
1112 #define RIG_LEVEL_59 CONSTANT_64BIT_FLAG(59)
1113 #define RIG_LEVEL_60 CONSTANT_64BIT_FLAG(60)
1114 #define RIG_LEVEL_61 CONSTANT_64BIT_FLAG(61)
1115 #define RIG_LEVEL_62 CONSTANT_64BIT_FLAG(62)
1116 #define RIG_LEVEL_63 CONSTANT_64BIT_FLAG(63)
1119 #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|RIG_LEVEL_SPECTRUM_REF|RIG_LEVEL_TEMP_METER|RIG_LEVEL_USB_AF|RIG_LEVEL_USB_AF_INPUT|RIG_LEVEL_AGC_TIME)
1120 
1121 #define RIG_LEVEL_READONLY_LIST (RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_STRENGTH|RIG_LEVEL_RAWSTR|RIG_LEVEL_COMP_METER|RIG_LEVEL_VD_METER|RIG_LEVEL_ID_METER|RIG_LEVEL_TEMP_METER|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS)
1122 
1123 #define RIG_LEVEL_IS_FLOAT(l) ((l)&RIG_LEVEL_FLOAT_LIST)
1124 #define RIG_LEVEL_SET(l) ((l)&~RIG_LEVEL_READONLY_LIST)
1126 
1127 
1138  RIG_PARM_ANN = (1 << 0),
1139  RIG_PARM_APO = (1 << 1),
1140  RIG_PARM_BACKLIGHT = (1 << 2),
1141  RIG_PARM_BEEP = (1 << 4),
1142  RIG_PARM_TIME = (1 << 5),
1143  RIG_PARM_BAT = (1 << 6),
1144  RIG_PARM_KEYLIGHT = (1 << 7),
1146  RIG_PARM_AFIF = (1 << 9),
1147  RIG_PARM_BANDSELECT = (1 << 10),
1148  RIG_PARM_KEYERTYPE = (1 << 11),
1149  RIG_PARM_AFIF_LAN = (1 << 12),
1150  RIG_PARM_AFIF_WLAN = (1 << 13),
1151  RIG_PARM_AFIF_ACC = (1 << 14)
1152 };
1153 
1154 enum rig_keyertype_e {
1155  RIG_KEYERTYPE_STRAIGHT = 0,
1156  RIG_KEYERTYPE_BUG = (1 << 0),
1157  RIG_KEYERTYPE_PADDLE = (1 << 1),
1158  RIG_KEYERTYPE_UNKNOWN = (1 << 2)
1159 };
1160 
1169 enum cookie_e {
1173 };
1174 
1180  RIG_MULTICAST_POLL, // hamlib will be polling the rig for all rig items
1181  RIG_MULTICAST_TRANSCEIVE, // transceive will be turned on and processed
1182  RIG_MULTICAST_SPECTRUM // spectrum data will be included
1183 };
1184 
1186 #define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT|RIG_PARM_BACKLIGHT)
1187 #define RIG_PARM_STRING_LIST (RIG_PARM_BANDSELECT|RIG_PARM_KEYERTYPE)
1188 #define RIG_PARM_READONLY_LIST (RIG_PARM_BAT)
1189 
1190 #define RIG_PARM_IS_FLOAT(l) ((l)&RIG_PARM_FLOAT_LIST)
1191 #define RIG_PARM_IS_STRING(l) ((l)&RIG_PARM_STRING_LIST)
1192 #define RIG_PARM_SET(l) ((l)&~RIG_PARM_READONLY_LIST)
1194 
1201 typedef uint64_t setting_t;
1202 
1207 #define RIG_SETTING_MAX 64
1208 
1225 #define RIG_TRN_OFF 0
1226 #define RIG_TRN_RIG 1
1227 #define RIG_TRN_POLL 2
1228 
1229 
1238 /*
1239  * The C standard dictates that an enum constant is a 32 bit signed integer.
1240  * Setting a constant's bit 31 created a negative value that on amd64 had the
1241  * upper 32 bits set as well when assigned to the misc.c:rig_func_str structure.
1242  * This caused misc.c:rig_strfunc() to fail its comparison for RIG_FUNC_XIT
1243  * on amd64 (x86_64). To use bit 31 as an unsigned long, preprocessor macros
1244  * have been used instead as a 'const unsigned long' which cannot be used to
1245  * initialize the rig_func_str.func members. TNX KA6MAL, AC6SL. - N0NB
1246  */
1247 #define RIG_FUNC_NONE 0
1248 #define RIG_FUNC_FAGC CONSTANT_64BIT_FLAG (0)
1249 #define RIG_FUNC_NB CONSTANT_64BIT_FLAG (1)
1250 #define RIG_FUNC_COMP CONSTANT_64BIT_FLAG (2)
1251 #define RIG_FUNC_VOX CONSTANT_64BIT_FLAG (3)
1252 #define RIG_FUNC_TONE CONSTANT_64BIT_FLAG (4)
1253 #define RIG_FUNC_TSQL CONSTANT_64BIT_FLAG (5)
1254 #define RIG_FUNC_SBKIN CONSTANT_64BIT_FLAG (6)
1255 #define RIG_FUNC_FBKIN CONSTANT_64BIT_FLAG (7)
1256 #define RIG_FUNC_ANF CONSTANT_64BIT_FLAG (8)
1257 #define RIG_FUNC_NR CONSTANT_64BIT_FLAG (9)
1258 #define RIG_FUNC_AIP CONSTANT_64BIT_FLAG (10)
1259 #define RIG_FUNC_APF CONSTANT_64BIT_FLAG (11)
1260 #define RIG_FUNC_MON CONSTANT_64BIT_FLAG (12)
1261 #define RIG_FUNC_MN CONSTANT_64BIT_FLAG (13)
1262 #define RIG_FUNC_RF CONSTANT_64BIT_FLAG (14)
1263 #define RIG_FUNC_ARO CONSTANT_64BIT_FLAG (15)
1264 #define RIG_FUNC_LOCK CONSTANT_64BIT_FLAG (16)
1265 #define RIG_FUNC_MUTE CONSTANT_64BIT_FLAG (17)
1266 #define RIG_FUNC_VSC CONSTANT_64BIT_FLAG (18)
1267 #define RIG_FUNC_REV CONSTANT_64BIT_FLAG (19)
1268 #define RIG_FUNC_SQL CONSTANT_64BIT_FLAG (20)
1269 #define RIG_FUNC_ABM CONSTANT_64BIT_FLAG (21)
1270 #define RIG_FUNC_BC CONSTANT_64BIT_FLAG (22)
1271 #define RIG_FUNC_MBC CONSTANT_64BIT_FLAG (23)
1272 #define RIG_FUNC_RIT CONSTANT_64BIT_FLAG (24)
1273 #define RIG_FUNC_AFC CONSTANT_64BIT_FLAG (25)
1274 #define RIG_FUNC_SATMODE CONSTANT_64BIT_FLAG (26)
1275 #define RIG_FUNC_SCOPE CONSTANT_64BIT_FLAG (27)
1276 #define RIG_FUNC_RESUME CONSTANT_64BIT_FLAG (28)
1277 #define RIG_FUNC_TBURST CONSTANT_64BIT_FLAG (29)
1278 #define RIG_FUNC_TUNER CONSTANT_64BIT_FLAG (30)
1279 #define RIG_FUNC_XIT CONSTANT_64BIT_FLAG (31)
1280 #ifndef SWIGLUAHIDE
1281 /* Hide the top 32 bits from the old Lua binding as they can't be represented */
1282 #define RIG_FUNC_NB2 CONSTANT_64BIT_FLAG (32)
1283 #define RIG_FUNC_CSQL CONSTANT_64BIT_FLAG (33)
1284 #define RIG_FUNC_AFLT CONSTANT_64BIT_FLAG (34)
1285 #define RIG_FUNC_ANL CONSTANT_64BIT_FLAG (35)
1286 #define RIG_FUNC_BC2 CONSTANT_64BIT_FLAG (36)
1287 #define RIG_FUNC_DUAL_WATCH CONSTANT_64BIT_FLAG (37)
1288 #define RIG_FUNC_DIVERSITY CONSTANT_64BIT_FLAG (38)
1289 #define RIG_FUNC_DSQL CONSTANT_64BIT_FLAG (39)
1290 #define RIG_FUNC_SCEN CONSTANT_64BIT_FLAG (40)
1291 #define RIG_FUNC_SLICE CONSTANT_64BIT_FLAG (41)
1292 #define RIG_FUNC_TRANSCEIVE CONSTANT_64BIT_FLAG (42)
1293 #define RIG_FUNC_SPECTRUM CONSTANT_64BIT_FLAG (43)
1294 #define RIG_FUNC_SPECTRUM_HOLD CONSTANT_64BIT_FLAG (44)
1295 #define RIG_FUNC_SEND_MORSE CONSTANT_64BIT_FLAG (45)
1296 #define RIG_FUNC_SEND_VOICE_MEM CONSTANT_64BIT_FLAG (46)
1297 #define RIG_FUNC_OVF_STATUS CONSTANT_64BIT_FLAG (47)
1298 #define RIG_FUNC_SYNC CONSTANT_64BIT_FLAG (48)
1299 #define RIG_FUNC_BIT49 CONSTANT_64BIT_FLAG (49)
1300 #define RIG_FUNC_BIT50 CONSTANT_64BIT_FLAG (50)
1301 #define RIG_FUNC_BIT51 CONSTANT_64BIT_FLAG (51)
1302 #define RIG_FUNC_BIT52 CONSTANT_64BIT_FLAG (52)
1303 #define RIG_FUNC_BIT53 CONSTANT_64BIT_FLAG (53)
1304 #define RIG_FUNC_BIT54 CONSTANT_64BIT_FLAG (54)
1305 #define RIG_FUNC_BIT55 CONSTANT_64BIT_FLAG (55)
1306 #define RIG_FUNC_BIT56 CONSTANT_64BIT_FLAG (56)
1307 #define RIG_FUNC_BIT57 CONSTANT_64BIT_FLAG (57)
1308 #define RIG_FUNC_BIT58 CONSTANT_64BIT_FLAG (58)
1309 #define RIG_FUNC_BIT59 CONSTANT_64BIT_FLAG (59)
1310 #define RIG_FUNC_BIT60 CONSTANT_64BIT_FLAG (60)
1311 #define RIG_FUNC_BIT61 CONSTANT_64BIT_FLAG (61)
1312 #define RIG_FUNC_BIT62 CONSTANT_64BIT_FLAG (62)
1313 #define RIG_FUNC_BIT63 CONSTANT_64BIT_FLAG (63)
1314 /* 63 is this highest bit number that can be used */
1315 #endif
1316 
1323 #define mW(p) ((int)(p))
1331 #define Watts(p) ((int)((p)*1000))
1338 #define W(p) Watts(p)
1339 #if 0 // deprecating kW macro as this doesn't make sense
1346 #define kW(p) ((int)((p)*1000000L))
1347 #endif
1348 
1349 
1359 typedef uint64_t rmode_t;
1360 
1361 #define RIG_MODE_NONE 0
1362 #define RIG_MODE_AM CONSTANT_64BIT_FLAG (0)
1363 #define RIG_MODE_CW CONSTANT_64BIT_FLAG (1)
1364 #define RIG_MODE_USB CONSTANT_64BIT_FLAG (2)
1365 #define RIG_MODE_LSB CONSTANT_64BIT_FLAG (3)
1366 #define RIG_MODE_RTTY CONSTANT_64BIT_FLAG (4)
1367 #define RIG_MODE_FM CONSTANT_64BIT_FLAG (5)
1368 #define RIG_MODE_WFM CONSTANT_64BIT_FLAG (6)
1369 #define RIG_MODE_CWR CONSTANT_64BIT_FLAG (7)
1370 #define RIG_MODE_RTTYR CONSTANT_64BIT_FLAG (8)
1371 #define RIG_MODE_AMS CONSTANT_64BIT_FLAG (9)
1372 #define RIG_MODE_PKTLSB CONSTANT_64BIT_FLAG (10)
1373 #define RIG_MODE_PKTUSB CONSTANT_64BIT_FLAG (11)
1374 #define RIG_MODE_PKTFM CONSTANT_64BIT_FLAG (12)
1375 #define RIG_MODE_ECSSUSB CONSTANT_64BIT_FLAG (13)
1376 #define RIG_MODE_ECSSLSB CONSTANT_64BIT_FLAG (14)
1377 #define RIG_MODE_FAX CONSTANT_64BIT_FLAG (15)
1378 #define RIG_MODE_SAM CONSTANT_64BIT_FLAG (16)
1379 #define RIG_MODE_SAL CONSTANT_64BIT_FLAG (17)
1380 #define RIG_MODE_SAH CONSTANT_64BIT_FLAG (18)
1381 #define RIG_MODE_DSB CONSTANT_64BIT_FLAG (19)
1382 #define RIG_MODE_FMN CONSTANT_64BIT_FLAG (21)
1383 #define RIG_MODE_PKTAM CONSTANT_64BIT_FLAG (22)
1384 #define RIG_MODE_P25 CONSTANT_64BIT_FLAG (23)
1385 #define RIG_MODE_DSTAR CONSTANT_64BIT_FLAG (24)
1386 #define RIG_MODE_DPMR CONSTANT_64BIT_FLAG (25)
1387 #define RIG_MODE_NXDNVN CONSTANT_64BIT_FLAG (26)
1388 #define RIG_MODE_NXDN_N CONSTANT_64BIT_FLAG (27)
1389 #define RIG_MODE_DCR CONSTANT_64BIT_FLAG (28)
1390 #define RIG_MODE_AMN CONSTANT_64BIT_FLAG (29)
1391 #define RIG_MODE_PSK CONSTANT_64BIT_FLAG (30)
1392 #define RIG_MODE_PSKR CONSTANT_64BIT_FLAG (31)
1393 #ifndef SWIGLUAHIDE
1394 /* hide the top 32 bits from the Lua binding as they will not work */
1395 #define RIG_MODE_DD CONSTANT_64BIT_FLAG (32)
1396 #define RIG_MODE_C4FM CONSTANT_64BIT_FLAG (33)
1397 #define RIG_MODE_PKTFMN CONSTANT_64BIT_FLAG (34)
1398 #define RIG_MODE_SPEC CONSTANT_64BIT_FLAG (35)
1399 #define RIG_MODE_CWN CONSTANT_64BIT_FLAG (36)
1400 #define RIG_MODE_IQ CONSTANT_64BIT_FLAG (37)
1401 #define RIG_MODE_ISBUSB CONSTANT_64BIT_FLAG (38)
1402 #define RIG_MODE_ISBLSB CONSTANT_64BIT_FLAG (39)
1403 #define RIG_MODE_USBD1 CONSTANT_64BIT_FLAG (40)
1404 #define RIG_MODE_USBD2 CONSTANT_64BIT_FLAG (41)
1405 #define RIG_MODE_USBD3 CONSTANT_64BIT_FLAG (42)
1406 #define RIG_MODE_LSBD1 CONSTANT_64BIT_FLAG (43)
1407 #define RIG_MODE_LSBD2 CONSTANT_64BIT_FLAG (44)
1408 #define RIG_MODE_LSBD3 CONSTANT_64BIT_FLAG (45)
1409 #define RIG_MODE_BIT46 CONSTANT_64BIT_FLAG (46)
1410 #define RIG_MODE_BIT47 CONSTANT_64BIT_FLAG (47)
1411 #define RIG_MODE_BIT48 CONSTANT_64BIT_FLAG (48)
1412 #define RIG_MODE_BIT49 CONSTANT_64BIT_FLAG (49)
1413 #define RIG_MODE_BIT50 CONSTANT_64BIT_FLAG (50)
1414 #define RIG_MODE_BIT51 CONSTANT_64BIT_FLAG (51)
1415 #define RIG_MODE_BIT52 CONSTANT_64BIT_FLAG (52)
1416 #define RIG_MODE_BIT53 CONSTANT_64BIT_FLAG (53)
1417 #define RIG_MODE_BIT54 CONSTANT_64BIT_FLAG (54)
1418 #define RIG_MODE_BIT55 CONSTANT_64BIT_FLAG (55)
1419 #define RIG_MODE_BIT56 CONSTANT_64BIT_FLAG (56)
1420 #define RIG_MODE_BIT57 CONSTANT_64BIT_FLAG (57)
1421 #define RIG_MODE_BIT58 CONSTANT_64BIT_FLAG (58)
1422 #define RIG_MODE_BIT59 CONSTANT_64BIT_FLAG (59)
1423 #define RIG_MODE_BIT60 CONSTANT_64BIT_FLAG (60)
1424 #define RIG_MODE_BIT61 CONSTANT_64BIT_FLAG (61)
1425 #define RIG_MODE_BIT62 CONSTANT_64BIT_FLAG (62)
1426 #define RIG_MODE_TESTS_MAX CONSTANT_64BIT_FLAG (63)
1427 #define RIG_MODE_ALL (0xffffffff)
1428 #endif
1429 
1433 #define RIG_MODE_SSB (RIG_MODE_USB|RIG_MODE_LSB)
1434 
1438 #define RIG_MODE_PKTSSB (RIG_MODE_PKTUSB|RIG_MODE_PKTLSB)
1439 
1443 #define RIG_MODE_ECSS (RIG_MODE_ECSSUSB|RIG_MODE_ECSSLSB)
1444 
1446 #define RIG_DBLST_END 0 /* end marker in a preamp/att level list */
1447 #define RIG_IS_DBLST_END(d) ((d)==0)
1449 
1450 
1457 typedef struct freq_range_list {
1465  char *label;
1467 
1469 #define RIG_FRNG_END {Hz(0),Hz(0),RIG_MODE_NONE,0,0,RIG_VFO_NONE}
1470 #define RIG_IS_FRNG_END(r) ((r).startf == Hz(0) && (r).endf == Hz(0))
1472 
1492 };
1493 
1495 #define RIG_TS_ANY 0
1496 #define RIG_TS_END {RIG_MODE_NONE, 0}
1497 #define RIG_IS_TS_END(t) ((t).modes == RIG_MODE_NONE && (t).ts == 0)
1499 
1500 
1524 struct filter_list {
1527 };
1529 #define RIG_FLT_ANY 0
1530 #define RIG_FLT_END {RIG_MODE_NONE, 0}
1531 #define RIG_IS_FLT_END(f) ((f).modes == RIG_MODE_NONE)
1532 #define DEBUGMSGSAVE_SIZE 24000
1534 
1535 
1539 #define RIG_CHFLAG_NONE 0
1543 #define RIG_CHFLAG_SKIP (1<<0)
1547 #define RIG_CHFLAG_DATA (1<<1)
1551 #define RIG_CHFLAG_PSKIP (1<<2)
1552 
1557 struct ext_list {
1560 };
1561 
1563 #define RIG_EXT_END {0, {.i=0}}
1564 #define RIG_IS_EXT_END(x) ((x).token == 0)
1566 
1574 struct channel {
1576  int bank_num;
1597  tone_t ctcss_tone;
1598  tone_t ctcss_sql;
1599  tone_t dcs_code;
1600  tone_t dcs_sql;
1602  unsigned int flags;
1603  char channel_desc[HAMLIB_MAXCHANDESC];
1604  struct ext_list
1606  char tag[32];
1607 };
1608 
1612 typedef struct channel channel_t;
1613 
1619 struct channel_cap {
1620  unsigned bank_num: 1;
1621  unsigned vfo: 1;
1622  unsigned ant: 1;
1623  unsigned freq: 1;
1624  unsigned mode: 1;
1625  unsigned width: 1;
1627  unsigned tx_freq: 1;
1628  unsigned tx_mode: 1;
1629  unsigned tx_width: 1;
1631  unsigned split: 1;
1632  unsigned tx_vfo: 1;
1633  unsigned rptr_shift: 1;
1634  unsigned rptr_offs: 1;
1635  unsigned tuning_step: 1;
1636  unsigned rit: 1;
1637  unsigned xit: 1;
1640  unsigned ctcss_tone: 1;
1641  unsigned ctcss_sql: 1;
1642  unsigned dcs_code: 1;
1643  unsigned dcs_sql: 1;
1644  unsigned scan_group: 1;
1645  unsigned flags: 1;
1646  unsigned channel_desc: 1;
1647  unsigned ext_levels: 1;
1648  unsigned tag: 1;
1649 };
1650 
1654 typedef struct channel_cap channel_cap_t;
1655 
1656 
1667 typedef enum {
1680 
1681 
1695 struct chan_list {
1696  int startc;
1697  int endc;
1700 };
1701 
1703 #define RIG_CHAN_END {0,0,RIG_MTYPE_NONE}
1704 #define RIG_IS_CHAN_END(c) ((c).type == RIG_MTYPE_NONE)
1706 
1710 #define RIG_MEM_CAPS_ALL -1
1711 
1715 typedef struct chan_list chan_t;
1716 
1717 
1729 struct gran {
1733 };
1734 
1738 typedef struct gran gran_t;
1739 
1740 
1744 struct cal_table {
1745  int size;
1746  struct {
1747  int raw;
1748  int val;
1749  } table[HAMLIB_MAX_CAL_LENGTH];
1750 };
1751 
1764 typedef struct cal_table cal_table_t;
1765 
1767 #define EMPTY_STR_CAL { 0, { { 0, 0 }, } }
1769 
1770 
1775  int size;
1776  struct {
1777  int raw;
1778  float val;
1779  } table[HAMLIB_MAX_CAL_LENGTH];
1780 };
1781 
1794 typedef struct cal_table_float cal_table_float_t;
1795 
1797 #define EMPTY_FLOAT_CAL { 0, { { 0, 0f }, } }
1798 
1799 typedef int (* chan_cb_t)(RIG *, vfo_t vfo, channel_t **, int, const chan_t *, rig_ptr_t);
1800 typedef int (* confval_cb_t)(RIG *,
1801  const struct confparams *,
1802  value_t *,
1803  rig_ptr_t);
1805 
1810 {
1811  int id;
1812  char *name;
1813 };
1814 
1819  RIG_SPECTRUM_MODE_NONE = 0,
1824 };
1825 
1830 {
1831  int id;
1832  char *name;
1833 };
1834 
1847 {
1848  int id;
1864  unsigned char *spectrum_data;
1865 };
1866 
1871  struct deferred_config_item *next;
1872  hamlib_token_t token;
1873  char *value; // strdup'ed, must be freed
1874 };
1876 
1878  struct deferred_config_item *first; // NULL if none
1879  struct deferred_config_item *last;
1880 };
1882 
1903 #define RIG_MODEL(arg) .rig_model=arg,.macro_name=#arg
1904 #define HAMLIB_CHECK_RIG_CAPS "HAMLIB_CHECK_RIG_CAPS"
1905 struct rig_caps {
1906  rig_model_t rig_model;
1907  const char *model_name;
1908  const char *mfg_name;
1909  const char *version;
1910  const char *copyright;
1911  enum rig_status_e status;
1913  int rig_type;
1914  ptt_type_t ptt_type;
1915  dcd_type_t dcd_type;
1916  rig_port_t port_type;
1918  int serial_rate_min;
1919  int serial_rate_max;
1920  int serial_data_bits;
1921  int serial_stop_bits;
1922  enum serial_parity_e serial_parity;
1923  enum serial_handshake_e serial_handshake;
1925  int write_delay;
1926  int post_write_delay;
1927  int timeout;
1928  int retry;
1930  setting_t has_get_func;
1931  setting_t has_set_func;
1932  setting_t has_get_level;
1933  setting_t has_set_level;
1934  setting_t has_get_parm;
1935  setting_t has_set_parm;
1937  gran_t level_gran[RIG_SETTING_MAX];
1938  gran_t parm_gran[RIG_SETTING_MAX];
1940  const struct confparams *extparms;
1941  const struct confparams *extlevels;
1942  const struct confparams *extfuncs;
1943  int *ext_tokens;
1945  tone_t *ctcss_list;
1946  tone_t *dcs_list;
1948  int preamp[HAMLIB_MAXDBLSTSIZ];
1949  int attenuator[HAMLIB_MAXDBLSTSIZ];
1950  shortfreq_t max_rit;
1951  shortfreq_t max_xit;
1952  shortfreq_t max_ifshift;
1954  int agc_level_count;
1955  enum agc_level_e agc_levels[HAMLIB_MAX_AGC_LEVELS];
1957  ann_t announces;
1959  vfo_op_t vfo_ops;
1960  scan_t scan_ops;
1961  int targetable_vfo;
1962  int transceive;
1964  int bank_qty;
1965  int chan_desc_sz;
1967  chan_t chan_list[HAMLIB_CHANLSTSIZ];
1969  // As of 2020-02-12 we know of 5 models from Icom USA, EUR, ITR, TPE, KOR for the IC-9700
1970  // So we currently have 5 ranges we need to deal with
1971  // The backend for the model should fill in the label field to explain what model it is
1972  // The the IC-9700 in ic7300.c for an example
1973  freq_range_t rx_range_list1[HAMLIB_FRQRANGESIZ];
1974  freq_range_t tx_range_list1[HAMLIB_FRQRANGESIZ];
1975  freq_range_t rx_range_list2[HAMLIB_FRQRANGESIZ];
1976  freq_range_t tx_range_list2[HAMLIB_FRQRANGESIZ];
1977  freq_range_t rx_range_list3[HAMLIB_FRQRANGESIZ];
1978  freq_range_t tx_range_list3[HAMLIB_FRQRANGESIZ];
1979  freq_range_t rx_range_list4[HAMLIB_FRQRANGESIZ];
1980  freq_range_t tx_range_list4[HAMLIB_FRQRANGESIZ];
1981  freq_range_t rx_range_list5[HAMLIB_FRQRANGESIZ];
1982  freq_range_t tx_range_list5[HAMLIB_FRQRANGESIZ];
1984  struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ];
1985  struct filter_list filters[HAMLIB_FLTLSTSIZ];
1987  cal_table_t str_cal;
1988  cal_table_float_t swr_cal;
1989  cal_table_float_t alc_cal;
1990  cal_table_float_t rfpower_meter_cal;
1991  cal_table_float_t comp_meter_cal;
1992  cal_table_float_t vd_meter_cal;
1993  cal_table_float_t id_meter_cal;
1995  struct rig_spectrum_scope spectrum_scopes[HAMLIB_MAX_SPECTRUM_SCOPES];
1996  enum rig_spectrum_mode_e spectrum_modes[HAMLIB_MAX_SPECTRUM_MODES];
1997  freq_t spectrum_spans[HAMLIB_MAX_SPECTRUM_SPANS];
1998  struct rig_spectrum_avg_mode spectrum_avg_modes[HAMLIB_MAX_SPECTRUM_AVG_MODES];
1999  int spectrum_attenuator[HAMLIB_MAXDBLSTSIZ];
2001  const struct confparams *cfgparams;
2002  const rig_ptr_t priv;
2004  /*
2005  * Rig API
2006  *
2007  */
2008 
2009  int (*rig_init)(RIG *rig);
2010  int (*rig_cleanup)(RIG *rig);
2011  int (*rig_open)(RIG *rig);
2012  int (*rig_close)(RIG *rig);
2013 
2014  /*
2015  * General API commands, from most primitive to least.. :()
2016  * List Set/Get functions pairs
2017  */
2018 
2019  int (*set_freq)(RIG *rig, vfo_t vfo, freq_t freq);
2020  int (*get_freq)(RIG *rig, vfo_t vfo, freq_t *freq);
2021 
2022  int (*set_mode)(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width);
2023  int (*get_mode)(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width);
2024 
2025  int (*set_vfo)(RIG *rig, vfo_t vfo);
2026  int (*get_vfo)(RIG *rig, vfo_t *vfo);
2027 
2028  int (*set_ptt)(RIG *rig, vfo_t vfo, ptt_t ptt);
2029  int (*get_ptt)(RIG *rig, vfo_t vfo, ptt_t *ptt);
2030 
2031  int (*get_dcd)(RIG *rig, vfo_t vfo, dcd_t *dcd);
2032 
2033  int (*set_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift);
2034  int (*get_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift);
2035 
2036  int (*set_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t offs);
2037  int (*get_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t *offs);
2038 
2039  int (*set_split_freq)(RIG *rig, vfo_t vfo, freq_t tx_freq);
2040  int (*get_split_freq)(RIG *rig, vfo_t vfo, freq_t *tx_freq);
2041 
2042  int (*set_split_mode)(RIG *rig,
2043  vfo_t vfo,
2044  rmode_t tx_mode,
2045  pbwidth_t tx_width);
2046  int (*get_split_mode)(RIG *rig,
2047  vfo_t vfo,
2048  rmode_t *tx_mode,
2049  pbwidth_t *tx_width);
2050 
2051  int (*set_split_freq_mode)(RIG *rig,
2052  vfo_t vfo,
2053  freq_t tx_freq,
2054  rmode_t tx_mode,
2055  pbwidth_t tx_width);
2056  int (*get_split_freq_mode)(RIG *rig,
2057  vfo_t vfo,
2058  freq_t *tx_freq,
2059  rmode_t *tx_mode,
2060  pbwidth_t *tx_width);
2061 
2062  int (*set_split_vfo)(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo);
2063  int (*get_split_vfo)(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo);
2064 
2065  int (*set_rit)(RIG *rig, vfo_t vfo, shortfreq_t rit);
2066  int (*get_rit)(RIG *rig, vfo_t vfo, shortfreq_t *rit);
2067 
2068  int (*set_xit)(RIG *rig, vfo_t vfo, shortfreq_t xit);
2069  int (*get_xit)(RIG *rig, vfo_t vfo, shortfreq_t *xit);
2070 
2071  int (*set_ts)(RIG *rig, vfo_t vfo, shortfreq_t ts);
2072  int (*get_ts)(RIG *rig, vfo_t vfo, shortfreq_t *ts);
2073 
2074  int (*set_dcs_code)(RIG *rig, vfo_t vfo, tone_t code);
2075  int (*get_dcs_code)(RIG *rig, vfo_t vfo, tone_t *code);
2076 
2077  int (*set_tone)(RIG *rig, vfo_t vfo, tone_t tone);
2078  int (*get_tone)(RIG *rig, vfo_t vfo, tone_t *tone);
2079 
2080  int (*set_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t tone);
2081  int (*get_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t *tone);
2082 
2083  int (*set_dcs_sql)(RIG *rig, vfo_t vfo, tone_t code);
2084  int (*get_dcs_sql)(RIG *rig, vfo_t vfo, tone_t *code);
2085 
2086  int (*set_tone_sql)(RIG *rig, vfo_t vfo, tone_t tone);
2087  int (*get_tone_sql)(RIG *rig, vfo_t vfo, tone_t *tone);
2088 
2089  int (*set_ctcss_sql)(RIG *rig, vfo_t vfo, tone_t tone);
2090  int (*get_ctcss_sql)(RIG *rig, vfo_t vfo, tone_t *tone);
2091 
2092  int (*power2mW)(RIG *rig,
2093  unsigned int *mwpower,
2094  float power,
2095  freq_t freq,
2096  rmode_t mode);
2097  int (*mW2power)(RIG *rig,
2098  float *power,
2099  unsigned int mwpower,
2100  freq_t freq,
2101  rmode_t mode);
2102 
2103  int (*set_powerstat)(RIG *rig, powerstat_t status);
2104  int (*get_powerstat)(RIG *rig, powerstat_t *status);
2105 
2106  int (*reset)(RIG *rig, reset_t reset);
2107 
2108  int (*set_ant)(RIG *rig, vfo_t vfo, ant_t ant, value_t option);
2109  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);
2110 
2111  int (*set_level)(RIG *rig, vfo_t vfo, setting_t level, value_t val);
2112  int (*get_level)(RIG *rig, vfo_t vfo, setting_t level, value_t *val);
2113 
2114  int (*set_func)(RIG *rig, vfo_t vfo, setting_t func, int status);
2115  int (*get_func)(RIG *rig, vfo_t vfo, setting_t func, int *status);
2116 
2117  int (*set_parm)(RIG *rig, setting_t parm, value_t val);
2118  int (*get_parm)(RIG *rig, setting_t parm, value_t *val);
2119 
2120  int (*set_ext_level)(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val);
2121  int (*get_ext_level)(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val);
2122 
2123  int (*set_ext_func)(RIG *rig, vfo_t vfo, hamlib_token_t token, int status);
2124  int (*get_ext_func)(RIG *rig, vfo_t vfo, hamlib_token_t token, int *status);
2125 
2126  int (*set_ext_parm)(RIG *rig, hamlib_token_t token, value_t val);
2127  int (*get_ext_parm)(RIG *rig, hamlib_token_t token, value_t *val);
2128 
2129  int (*set_conf)(RIG *rig, hamlib_token_t token, const char *val);
2130  int (*get_conf)(RIG *rig, hamlib_token_t token, char *val);
2131 
2132  int (*send_dtmf)(RIG *rig, vfo_t vfo, const char *digits);
2133  int (*recv_dtmf)(RIG *rig, vfo_t vfo, char *digits, int *length);
2134 
2135  int (*send_morse)(RIG *rig, vfo_t vfo, const char *msg);
2136  int (*stop_morse)(RIG *rig, vfo_t vfo);
2137  int (*wait_morse)(RIG *rig, vfo_t vfo);
2138 
2139  int (*send_voice_mem)(RIG *rig, vfo_t vfo, int ch);
2140  int (*stop_voice_mem)(RIG *rig, vfo_t vfo);
2141 
2142  int (*set_bank)(RIG *rig, vfo_t vfo, int bank);
2143 
2144  int (*set_mem)(RIG *rig, vfo_t vfo, int ch);
2145  int (*get_mem)(RIG *rig, vfo_t vfo, int *ch);
2146 
2147  int (*vfo_op)(RIG *rig, vfo_t vfo, vfo_op_t op);
2148 
2149  int (*scan)(RIG *rig, vfo_t vfo, scan_t scan, int ch);
2150 
2151  int (*set_trn)(RIG *rig, int trn);
2152  int (*get_trn)(RIG *rig, int *trn);
2153 
2154  int (*decode_event)(RIG *rig);
2155 
2156  int (*set_channel)(RIG *rig, vfo_t vfo, const channel_t *chan);
2157  int (*get_channel)(RIG *rig, vfo_t vfo, channel_t *chan, int read_only);
2158 
2159  const char * (*get_info)(RIG *rig);
2160 
2161  int (*set_chan_all_cb)(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t);
2162  int (*get_chan_all_cb)(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t);
2163 
2164  int (*set_mem_all_cb)(RIG *rig,
2165  vfo_t vfo,
2166  chan_cb_t chan_cb,
2167  confval_cb_t parm_cb,
2168  rig_ptr_t);
2169  int (*get_mem_all_cb)(RIG *rig,
2170  vfo_t vfo,
2171  chan_cb_t chan_cb,
2172  confval_cb_t parm_cb,
2173  rig_ptr_t);
2174 
2175  int (*set_vfo_opt)(RIG *rig, int status); // only for Net Rigctl device
2176  int (*rig_get_vfo_info) (RIG *rig,
2177  vfo_t vfo,
2178  freq_t *freq,
2179  rmode_t *mode,
2180  pbwidth_t *width,
2181  split_t *split);
2182  int(*set_clock) (RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset);
2183  int(*get_clock) (RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset);
2184 
2185  const char *clone_combo_set;
2186  const char *clone_combo_get;
2187  const char *macro_name;
2189  int async_data_supported;
2190  int (*read_frame_direct)(RIG *rig,
2191  size_t buffer_length,
2192  const unsigned char *buffer);
2193  int (*is_async_frame)(RIG *rig,
2194  size_t frame_length,
2195  const unsigned char *frame);
2196  int (*process_async_frame)(RIG *rig,
2197  size_t frame_length,
2198  const unsigned char *frame);
2199 // this will be used to check rigcaps structure is compatible with client
2200  char *hamlib_check_rig_caps; // a constant value we can check for hamlib integrity
2201  int (*get_conf2)(RIG *rig, hamlib_token_t token, char *val, int val_len);
2202  int (*password)(RIG *rig, const char *key1); /*< Send encrypted password if rigctld is secured with -A/--password */
2203  int (*set_lock_mode)(RIG *rig, int mode);
2204  int (*get_lock_mode)(RIG *rig, int *mode);
2205  short timeout_retry;
2206  short morse_qsize; /* max length of morse */
2207 // int (*bandwidth2rig)(RIG *rig, enum bandwidth_t bandwidth);
2208 // enum bandwidth_t (*rig2bandwidth)(RIG *rig, int rigbandwidth);
2209 };
2211 
2216 // all functions enumerated for rig_get_function_ptr
2218  RIG_FUNCTION_INIT,
2219  RIG_FUNCTION_CLEANUP,
2220  RIG_FUNCTION_OPEN,
2221  RIG_FUNCTION_CLOSE,
2222  RIG_FUNCTION_SET_FREQ,
2223  RIG_FUNCTION_GET_FREQ,
2224  RIG_FUNCTION_SET_MODE,
2225  RIG_FUNCTION_GET_MODE,
2226  RIG_FUNCTION_SET_VFO,
2227  RIG_FUNCTION_GET_VFO,
2228  RIG_FUNCTION_SET_PTT,
2229  RIG_FUNCTION_GET_PTT,
2230  RIG_FUNCTION_GET_DCD,
2231  RIG_FUNCTION_SET_RPTR_SHIFT,
2232  RIG_FUNCTION_GET_RPTR_SHIFT,
2233  RIG_FUNCTION_SET_RPTR_OFFS,
2234  RIG_FUNCTION_GET_RPTR_OFFS,
2235  RIG_FUNCTION_SET_SPLIT_FREQ,
2236  RIG_FUNCTION_GET_SPLIT_FREQ,
2237  RIG_FUNCTION_SET_SPLIT_MODE,
2238  RIG_FUNCTION_SET_SPLIT_FREQ_MODE,
2239  RIG_FUNCTION_GET_SPLIT_FREQ_MODE,
2240  RIG_FUNCTION_SET_SPLIT_VFO,
2241  RIG_FUNCTION_GET_SPLIT_VFO,
2242  RIG_FUNCTION_SET_RIT,
2243  RIG_FUNCTION_GET_RIT,
2244  RIG_FUNCTION_SET_XIT,
2245  RIG_FUNCTION_GET_XIT,
2246  RIG_FUNCTION_SET_TS,
2247  RIG_FUNCTION_GET_TS,
2248  RIG_FUNCTION_SET_DCS_CODE,
2249  RIG_FUNCTION_GET_DCS_CODE,
2250  RIG_FUNCTION_SET_TONE,
2251  RIG_FUNCTION_GET_TONE,
2252  RIG_FUNCTION_SET_CTCSS_TONE,
2253  RIG_FUNCTION_GET_CTCSS_TONE,
2254  RIG_FUNCTION_SET_DCS_SQL,
2255  RIG_FUNCTION_GET_DCS_SQL,
2256  RIG_FUNCTION_SET_TONE_SQL,
2257  RIG_FUNCTION_GET_TONE_SQL,
2258  RIG_FUNCTION_SET_CTCSS_SQL,
2259  RIG_FUNCTION_GET_CTCSS_SQL,
2260  RIG_FUNCTION_POWER2MW,
2261  RIG_FUNCTION_MW2POWER,
2262  RIG_FUNCTION_SET_POWERSTAT,
2263  RIG_FUNCTION_GET_POWERSTAT,
2264  RIG_FUNCTION_RESET,
2265  RIG_FUNCTION_SET_ANT,
2266  RIG_FUNCTION_GET_ANT,
2267  RIG_FUNCTION_SET_LEVEL,
2268  RIG_FUNCTION_GET_LEVEL,
2269  RIG_FUNCTION_SET_FUNC,
2270  RIG_FUNCTION_GET_FUNC,
2271  RIG_FUNCTION_SET_PARM,
2272  RIG_FUNCTION_GET_PARM,
2273  RIG_FUNCTION_SET_EXT_LEVEL,
2274  RIG_FUNCTION_GET_EXT_LEVEL,
2275  RIG_FUNCTION_SET_EXT_FUNC,
2276  RIG_FUNCTION_GET_EXT_FUNC,
2277  RIG_FUNCTION_SET_EXT_PARM,
2278  RIG_FUNCTION_GET_EXT_PARM,
2279  RIG_FUNCTION_SET_CONF,
2280  RIG_FUNCTION_GET_CONF,
2281  RIG_FUNCTION_SEND_DTMF,
2282  RIG_FUNCTION_SEND_MORSE,
2283  RIG_FUNCTION_STOP_MORSE,
2284  RIG_FUNCTION_WAIT_MORSE,
2285  RIG_FUNCTION_SEND_VOICE_MEM,
2286  RIG_FUNCTION_SET_BANK,
2287  RIG_FUNCTION_SET_MEM,
2288  RIG_FUNCTION_GET_MEM,
2289  RIG_FUNCTION_VFO_OP,
2290  RIG_FUNCTION_SCAN,
2291  RIG_FUNCTION_SET_TRN,
2292  RIG_FUNCTION_GET_TRN,
2293  RIG_FUNCTION_DECODE_EVENT,
2294  RIG_FUNCTION_SET_CHANNEL,
2295  RIG_FUNCTION_GET_CHANNEL,
2296  RIG_FUNCTION_GET_INFO,
2297  RIG_FUNCTION_SET_CHAN_ALL_CB,
2298  RIG_FUNCTION_GET_CHAN_ALL_CB,
2299  RIG_FUNCTION_SET_MEM_ALL_CB,
2300  RIG_FUNCTION_GET_MEM_ALL_CB,
2301  RIG_FUNCTION_SET_VFO_OPT,
2302  RIG_FUNCTION_READ_FRAME_DIRECT,
2303  RIG_FUNCTION_IS_ASYNC_FRAME,
2304  RIG_FUNCTION_PROCESS_ASYNC_FRAME,
2305  RIG_FUNCTION_GET_CONF2,
2306  RIG_FUNCTION_STOP_VOICE_MEM,
2307 };
2308 
2313 extern HAMLIB_EXPORT (void *) rig_get_function_ptr(rig_model_t rig_model, enum rig_function_e rig_function);
2314 
2319 // values enumerated for rig->caps values
2321  RIG_CAPS_TARGETABLE_VFO,
2322  RIG_CAPS_RIG_MODEL,
2323  RIG_CAPS_PORT_TYPE,
2324  RIG_CAPS_PTT_TYPE,
2325  RIG_CAPS_HAS_GET_LEVEL,
2326  RIG_CAPS_HAS_SET_LEVEL,
2327 };
2328 
2329 enum rig_caps_cptr_e {
2330  RIG_CAPS_VERSION_CPTR,
2331  RIG_CAPS_MFG_NAME_CPTR,
2332  RIG_CAPS_MODEL_NAME_CPTR,
2333  RIG_CAPS_STATUS_CPTR
2334 };
2335 
2340 extern HAMLIB_EXPORT (uint64_t) rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps);
2341 
2346 extern HAMLIB_EXPORT (const char *) rig_get_caps_cptr(rig_model_t rig_model, enum rig_caps_cptr_e rig_caps);
2347 
2348 struct hamlib_async_pipe;
2349 
2350 typedef struct hamlib_async_pipe hamlib_async_pipe_t;
2351 
2358 // DO NOT CHANGE THIS STRUCTURE ALL UNTIL 5.0
2359 // Right now it is static inside rig structure
2360 // 5.0 will change it to a pointer which can then be added to
2361 // At that point only add to the end of the structure
2362 typedef struct hamlib_port {
2363  union {
2364  rig_port_t rig;
2365  ptt_type_t ptt;
2366  dcd_type_t dcd;
2367  } type;
2368 
2369  int fd;
2370  void *handle;
2372  int write_delay;
2373  int post_write_delay;
2375  struct {
2376  int tv_sec, tv_usec;
2377  } post_write_date;
2379  int timeout;
2380  short retry;
2381  short flushx;
2383  char pathname[HAMLIB_FILPATHLEN];
2385  union {
2386  struct {
2387  int rate;
2388  int data_bits;
2389  int stop_bits;
2390  enum serial_parity_e parity;
2391  enum serial_handshake_e handshake;
2392  enum serial_control_state_e rts_state;
2393  enum serial_control_state_e dtr_state;
2394  } serial;
2396  struct {
2397  int pin;
2398  } parallel;
2400  struct {
2401  int ptt_bitnum;
2402  } cm108;
2404  struct {
2405  int vid;
2406  int pid;
2407  int conf;
2408  int iface;
2409  int alt;
2410  char *vendor_name;
2411  char *product;
2412  } usb;
2414  struct {
2415  int on_value;
2416  int value;
2417  } gpio;
2418  } parm;
2419  int client_port;
2420  RIG *rig;
2421  int asyncio;
2422 #if defined(_WIN32)
2423  hamlib_async_pipe_t *sync_data_pipe;
2424  hamlib_async_pipe_t *sync_data_error_pipe;
2425 #else
2426  int fd_sync_write;
2427  int fd_sync_read;
2428  int fd_sync_error_write;
2429  int fd_sync_error_read;
2430 #endif
2431  short timeout_retry;
2432 // DO NOT ADD ANYTHING HERE UNTIL 5.0!!
2433 } hamlib_port_t;
2434 
2435 
2436 // DO NOT CHANGE THIS STRUCTURE AT ALL
2437 // Will be removed in 5.0
2438 typedef struct hamlib_port_deprecated {
2439  union {
2440  rig_port_t rig;
2441  ptt_type_t ptt;
2442  dcd_type_t dcd;
2443  } type;
2444 
2445  int fd;
2446  void *handle;
2448  int write_delay;
2449  int post_write_delay;
2451  struct {
2452  int tv_sec, tv_usec;
2453  } post_write_date;
2455  int timeout;
2456  short retry;
2457  short flushx;
2459  char pathname[HAMLIB_FILPATHLEN];
2461  union {
2462  struct {
2463  int rate;
2464  int data_bits;
2465  int stop_bits;
2466  enum serial_parity_e parity;
2467  enum serial_handshake_e handshake;
2468  enum serial_control_state_e rts_state;
2469  enum serial_control_state_e dtr_state;
2470  } serial;
2472  struct {
2473  int pin;
2474  } parallel;
2476  struct {
2477  int ptt_bitnum;
2478  } cm108;
2480  struct {
2481  int vid;
2482  int pid;
2483  int conf;
2484  int iface;
2485  int alt;
2486  char *vendor_name;
2487  char *product;
2488  } usb;
2490  struct {
2491  int on_value;
2492  int value;
2493  } gpio;
2494  } parm;
2495  int client_port;
2496  RIG *rig;
2497 } hamlib_port_t_deprecated;
2499 
2500 #if !defined(__APPLE__) || !defined(__cplusplus)
2501 typedef hamlib_port_t_deprecated port_t_deprecated;
2502 typedef hamlib_port_t port_t;
2503 #endif
2504 
2505 /* Macros to access data structures/pointers
2506  * Make it easier to change location in preparation
2507  * for moving them out of rig->state.
2508  * See https://github.com/Hamlib/Hamlib/issues/1445
2509  * https://github.com/Hamlib/Hamlib/issues/1452
2510  * https://github.com/Hamlib/Hamlib/issues/1420
2511  * https://github.com/Hamlib/Hamlib/issues/536
2512  * https://github.com/Hamlib/Hamlib/issues/487
2513  */
2514 // Note: Experimental, and subject to change!!
2515 #if defined(IN_HAMLIB)
2516 /* These are for internal use only */
2517 #define RIGPORT(r) (&r->state.rigport)
2518 #define PTTPORT(r) (&r->state.pttport)
2519 #define DCDPORT(r) (&r->state.dcdport)
2520 #define CACHE(r) (&r->state.cache)
2521 #define AMPPORT(a) (&a->state.ampport)
2522 #define ROTPORT(r) (&r->state.rotport)
2523 #define ROTPORT2(r) (&r->state.rotport2)
2524 #define STATE(r) (&r->state)
2525 #define AMPSTATE(a) (&(a)->state)
2526 #define ROTSTATE(r) (&(r)->state)
2527 /* Then when the rigport address is stored as a pointer somewhere else(say,
2528  * in the rig structure itself), the definition could be changed to
2529  * #define RIGPORT(r) r->somewhereelse
2530  * and every reference is updated.
2531  */
2532 #else
2533 /* Define external unique names */
2534 #define HAMLIB_RIGPORT(r) ((hamlib_port_t *)rig_data_pointer(r, RIG_PTRX_RIGPORT))
2535 #define HAMLIB_PTTPORT(r) ((hamlib_port_t *)rig_data_pointer(r, RIG_PTRX_PTTPORT))
2536 #define HAMLIB_DCDPORT(r) ((hamlib_port_t *)rig_data_pointer(r, RIG_PTRX_DCDPORT))
2537 #define HAMLIB_CACHE(r) ((struct rig_cache *)rig_data_pointer(r, RIG_PTRX_CACHE))
2538 #define HAMLIB_AMPPORT(a) ((hamlib_port_t *)amp_data_pointer(a, RIG_PTRX_AMPPORT))
2539 #define HAMLIB_ROTPORT(r) ((hamlib_port_t *)rot_data_pointer(r, RIG_PTRX_ROTPORT))
2540 #define HAMLIB_ROTPORT2(r) ((hamlib_port_t *)rot_data_pointer(r, RIG_PTRX_ROTPORT2))
2541 #define HAMLIB_STATE(r) ((struct rig_state *)rig_data_pointer(r, RIG_PTRX_STATE))
2542 #define HAMLIB_AMPSTATE(a) ((struct amp_state *)amp_data_pointer(a, RIG_PTRX_AMPSTATE))
2543 #define HAMLIB_ROTSTATE(r) ((struct rot_state *)rot_data_pointer(r, RIG_PTRX_ROTSTATE))
2544 #endif
2545 
2546 typedef enum {
2547  RIG_PTRX_NONE=0,
2548  RIG_PTRX_RIGPORT,
2549  RIG_PTRX_PTTPORT,
2550  RIG_PTRX_DCDPORT,
2551  RIG_PTRX_CACHE,
2552  RIG_PTRX_AMPPORT,
2553  RIG_PTRX_ROTPORT,
2554  RIG_PTRX_ROTPORT2,
2555  RIG_PTRX_STATE,
2556  RIG_PTRX_AMPSTATE,
2557  RIG_PTRX_ROTSTATE,
2558 // New entries go directly above this line====================
2559  RIG_PTRX_MAXIMUM
2560 } rig_ptrx_t;
2561 
2562 #define HAMLIB_ELAPSED_GET 0
2563 #define HAMLIB_ELAPSED_SET 1
2564 #define HAMLIB_ELAPSED_INVALIDATE 2
2565 
2566 #define HAMLIB_CACHE_ALWAYS (-1)
2568 typedef enum {
2569  HAMLIB_CACHE_ALL, // to set all cache timeouts at once
2570  HAMLIB_CACHE_VFO,
2571  HAMLIB_CACHE_FREQ,
2572  HAMLIB_CACHE_MODE,
2573  HAMLIB_CACHE_PTT,
2574  HAMLIB_CACHE_SPLIT,
2575  HAMLIB_CACHE_WIDTH
2576 } hamlib_cache_t;
2577 
2578 typedef enum {
2579  TWIDDLE_OFF,
2580  TWIDDLE_ON
2581 } twiddle_state_t;
2582 
2589 struct rig_cache {
2590  int timeout_ms; // the cache timeout for invalidating itself
2591  vfo_t vfo;
2592  //freq_t freq; // to be deprecated in 4.1 when full Main/Sub/A/B caching is implemented in 4.1
2593  // other abstraction here is based on dual vfo rigs and mapped to all others
2594  // So we have four possible states of rig
2595  // MainA, MainB, SubA, SubB
2596  // Main is the Main VFO and Sub is for the 2nd VFO
2597  // Most rigs have MainA and MainB
2598  // Dual VFO rigs can have SubA and SubB too
2599  // For dual VFO rigs simplex operations are all done on MainA/MainB -- ergo this abstraction
2600  freq_t freqCurr; // Other VFO
2601  freq_t freqOther; // Other VFO
2602  freq_t freqMainA; // VFO_A, VFO_MAIN, and VFO_MAINA
2603  freq_t freqMainB; // VFO_B, VFO_SUB, and VFO_MAINB
2604  freq_t freqMainC; // VFO_C, VFO_MAINC
2605  freq_t freqSubA; // VFO_SUBA -- only for rigs with dual Sub VFOs
2606  freq_t freqSubB; // VFO_SUBB -- only for rigs with dual Sub VFOs
2607  freq_t freqSubC; // VFO_SUBC -- only for rigs with 3 Sub VFOs
2608  freq_t freqMem; // VFO_MEM -- last MEM channel
2609  rmode_t modeCurr;
2610  rmode_t modeOther;
2611  rmode_t modeMainA;
2612  rmode_t modeMainB;
2613  rmode_t modeMainC;
2614  rmode_t modeSubA;
2615  rmode_t modeSubB;
2616  rmode_t modeSubC;
2617  rmode_t modeMem;
2618  pbwidth_t widthCurr; // if non-zero then rig has separate width for MainA
2619  pbwidth_t widthOther; // if non-zero then rig has separate width for MainA
2620  pbwidth_t widthMainA; // if non-zero then rig has separate width for MainA
2621  pbwidth_t widthMainB; // if non-zero then rig has separate width for MainB
2622  pbwidth_t widthMainC; // if non-zero then rig has separate width for MainC
2623  pbwidth_t widthSubA; // if non-zero then rig has separate width for SubA
2624  pbwidth_t widthSubB; // if non-zero then rig has separate width for SubB
2625  pbwidth_t widthSubC; // if non-zero then rig has separate width for SubC
2626  pbwidth_t widthMem; // if non-zero then rig has separate width for Mem
2627  ptt_t ptt;
2628  split_t split;
2629  vfo_t split_vfo; // split caches two values
2630  struct timespec time_freqCurr;
2631  struct timespec time_freqOther;
2632  struct timespec time_freqMainA;
2633  struct timespec time_freqMainB;
2634  struct timespec time_freqMainC;
2635  struct timespec time_freqSubA;
2636  struct timespec time_freqSubB;
2637  struct timespec time_freqSubC;
2638  struct timespec time_freqMem;
2639  struct timespec time_vfo;
2640  struct timespec time_modeCurr;
2641  struct timespec time_modeOther;
2642  struct timespec time_modeMainA;
2643  struct timespec time_modeMainB;
2644  struct timespec time_modeMainC;
2645  struct timespec time_modeSubA;
2646  struct timespec time_modeSubB;
2647  struct timespec time_modeSubC;
2648  struct timespec time_modeMem;
2649  struct timespec time_widthCurr;
2650  struct timespec time_widthOther;
2651  struct timespec time_widthMainA;
2652  struct timespec time_widthMainB;
2653  struct timespec time_widthMainC;
2654  struct timespec time_widthSubA;
2655  struct timespec time_widthSubB;
2656  struct timespec time_widthSubC;
2657  struct timespec time_widthMem;
2658  struct timespec time_ptt;
2659  struct timespec time_split;
2660  int satmode; // if rig is in satellite mode
2661 };
2662 
2667 #include <hamlib/multicast.h>
2669 {
2670  int multicast_running;
2671  int sock;
2672  int seqnumber;
2673  int runflag; // = 0;
2674  pthread_t threadid;
2675  // this mutex is needed to control serial access
2676  // as of 2023-05-13 we have main thread and multicast thread needing it
2677  // eventually we should be able to use cached info only in the main thread to avoid contention
2678  pthread_mutex_t mutex;
2679  int mutex_initialized;
2680 //#ifdef HAVE_ARPA_INET_H
2681  //struct ip_mreq mreq; // = {0};
2682  struct sockaddr_in dest_addr; // = {0};
2683  int port;
2684 //#endif
2685 };
2686 
2687 typedef unsigned int rig_comm_status_t;
2688 
2689 #define RIG_COMM_STATUS_OK 0x00
2690 #define RIG_COMM_STATUS_CONNECTING 0x01
2691 #define RIG_COMM_STATUS_DISCONNECTED 0x02
2692 #define RIG_COMM_STATUS_TERMINATED 0x03
2693 #define RIG_COMM_STATUS_WARNING 0x04
2694 #define RIG_COMM_STATUS_ERROR 0x05
2695 
2706 struct rig_state {
2707  /********* ENSURE ANY NEW ITEMS ARE ADDED AT BOTTOM OF THIS STRUCTURE *********/
2708  /*
2709  * overridable fields
2710  */
2711  // moving the hamlib_port_t to the end of rig_state and making it a pointer
2712  // this should allow changes to hamlib_port_t without breaking shared libraries
2713  // these will maintain a copy of the new port_t for backwards compatibility
2714  // to these offsets -- note these must stay until a major version update is done like 5.0
2715  hamlib_port_t_deprecated rigport_deprecated;
2716  hamlib_port_t_deprecated pttport_deprecated;
2717  hamlib_port_t_deprecated dcdport_deprecated;
2719  double vfo_comp;
2722  freq_range_t rx_range_list[HAMLIB_FRQRANGESIZ];
2723  freq_range_t tx_range_list[HAMLIB_FRQRANGESIZ];
2725  struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ];
2727  struct filter_list filters[HAMLIB_FLTLSTSIZ];
2731  chan_t chan_list[HAMLIB_CHANLSTSIZ];
2739  int preamp[HAMLIB_MAXDBLSTSIZ];
2740  int attenuator[HAMLIB_MAXDBLSTSIZ];
2753  /*
2754  * non overridable fields, internal use
2755  */
2756 
2759  int vfo_list;
2761  rig_ptr_t priv;
2762  rig_ptr_t obj;
2768  //rmode_t current_modeB; /*!< Mode currently set VFOB */
2772  // mode_list is used by some
2773  // so anything added to this structure must be below here
2774  int transmit;
2778  time_t twiddle_time;
2780  // uplink allows gpredict to behave better by no reading the uplink VFO
2781  int uplink;
2782  struct rig_cache cache;
2783  int vfo_opt;
2800  volatile unsigned int snapshot_packet_sequence_number;
2801 
2802  volatile int multicast_publisher_run;
2804  volatile int async_data_handler_thread_run;
2805  void *async_data_handler_priv_data;
2806  volatile int poll_routine_thread_run;
2807  void *poll_routine_priv_data;
2808  pthread_mutex_t mutex_set_transaction;
2809  hamlib_port_t rigport;
2810  hamlib_port_t pttport;
2811  hamlib_port_t dcdport;
2812  /********* DO NOT ADD or CHANGE anything (or than to rename) ABOVE THIS LINE *********/
2813  /********* ENSURE ANY NEW ITEMS ARE ADDED AFTER HERE *********/
2814  /* flags instructing the rig_get routines to use cached values when asyncio is in use */
2818  int depth;
2822  char client_version[32];
2826  // Adding a number of items so netrigctl can see the real rig information
2827  // Eventually may want to add these so that rigctld can see more of the backend
2828  // But that will come later if requested -- for now they just fill out dumpstate.c
2830  const char *model_name;
2831  const char *mfg_name;
2832  const char *version;
2833  const char *copyright;
2834  enum rig_status_e status;
2835  int rig_type;
2847  int timeout;
2848  int retry;
2852  enum agc_level_e agc_levels[HAMLIB_MAX_AGC_LEVELS];
2853  tone_t *ctcss_list;
2854  tone_t *dcs_list;
2858  int bank_qty;
2860  freq_range_t rx_range_list1[HAMLIB_FRQRANGESIZ];
2861  freq_range_t tx_range_list1[HAMLIB_FRQRANGESIZ];
2862  freq_range_t rx_range_list2[HAMLIB_FRQRANGESIZ];
2863  freq_range_t tx_range_list2[HAMLIB_FRQRANGESIZ];
2864  freq_range_t rx_range_list3[HAMLIB_FRQRANGESIZ];
2865  freq_range_t tx_range_list3[HAMLIB_FRQRANGESIZ];
2866  freq_range_t rx_range_list4[HAMLIB_FRQRANGESIZ];
2867  freq_range_t tx_range_list4[HAMLIB_FRQRANGESIZ];
2868  freq_range_t rx_range_list5[HAMLIB_FRQRANGESIZ];
2869  freq_range_t tx_range_list5[HAMLIB_FRQRANGESIZ];
2870  struct rig_spectrum_scope spectrum_scopes[HAMLIB_MAX_SPECTRUM_SCOPES];
2871  enum rig_spectrum_mode_e spectrum_modes[HAMLIB_MAX_SPECTRUM_MODES];
2872  freq_t spectrum_spans[HAMLIB_MAX_SPECTRUM_SPANS];
2873  struct rig_spectrum_avg_mode spectrum_avg_modes[HAMLIB_MAX_SPECTRUM_AVG_MODES];
2874  int spectrum_attenuator[HAMLIB_MAXDBLSTSIZ];
2875  volatile int morse_data_handler_thread_run;
2876  void *morse_data_handler_priv_data;
2877  FIFO_RIG *fifo_morse;
2878  int doppler;
2883  volatile int multicast_receiver_run;
2885  rig_comm_status_t comm_status;
2886  char device_id[HAMLIB_RIGNAMSIZ];
2889  struct timespec freq_event_elapsed;
2891  client_t client;
2892 // New rig_state items go before this line ============================================
2893 };
2894 
2905  /********* ENSURE YOU DO NOT EVER MODIFY THIS STRUCTURE *********/
2906  /********* It will remain forever to provide DLL backwards compatibility ******/
2907  /*
2908  * overridable fields
2909  */
2910  // moving the hamlib_port_t to the end of rig_state and making it a pointer
2911  // this should allow changes to hamlib_port_t without breaking shared libraries
2912  // these will maintain a copy of the new port_t for backwards compatibility
2913  // to these offsets -- note these must stay until a major version update is done like 5.0
2914  hamlib_port_t_deprecated rigport_deprecated;
2915  hamlib_port_t_deprecated pttport_deprecated;
2916  hamlib_port_t_deprecated dcdport_deprecated;
2918  double vfo_comp;
2921  freq_range_t rx_range_list[HAMLIB_FRQRANGESIZ];
2922  freq_range_t tx_range_list[HAMLIB_FRQRANGESIZ];
2924  struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ];
2926  struct filter_list filters[HAMLIB_FLTLSTSIZ];
2930  chan_t chan_list[HAMLIB_CHANLSTSIZ];
2938  int preamp[HAMLIB_MAXDBLSTSIZ];
2939  int attenuator[HAMLIB_MAXDBLSTSIZ];
2952  /*
2953  * non overridable fields, internal use
2954  */
2955 
2958  int vfo_list;
2960  rig_ptr_t priv;
2961  rig_ptr_t obj;
2967  //rmode_t current_modeB; /*!< Mode currently set VFOB */
2971  // mode_list is used by some
2972  // so anything added to this structure must be below here
2973  int transmit;
2977  time_t twiddle_time;
2979  // uplink allows gpredict to behave better by no reading the uplink VFO
2980  int uplink;
2981  struct rig_cache cache;
2982  int vfo_opt;
2999  volatile unsigned int snapshot_packet_sequence_number;
3000 
3001  volatile int multicast_publisher_run;
3003  volatile int async_data_handler_thread_run;
3004  void *async_data_handler_priv_data;
3005  volatile int poll_routine_thread_run;
3006  void *poll_routine_priv_data;
3007  pthread_mutex_t mutex_set_transaction;
3008  hamlib_port_t rigport;
3009  hamlib_port_t pttport;
3010  hamlib_port_t dcdport;
3011  /********* DO NOT ADD or CHANGE anything (or than to rename) ABOVE THIS LINE *********/
3012  /********* ENSURE ANY NEW ITEMS ARE ADDED AFTER HERE *********/
3013  /* flags instructing the rig_get routines to use cached values when asyncio is in use */
3017  int depth;
3021  char client_version[32];
3025 };
3026 
3028 typedef int (*vprintf_cb_t)(enum rig_debug_level_e,
3029  rig_ptr_t,
3030  const char *,
3031  va_list);
3032 
3033 typedef int (*freq_cb_t)(RIG *, vfo_t, freq_t, rig_ptr_t);
3034 typedef int (*mode_cb_t)(RIG *, vfo_t, rmode_t, pbwidth_t, rig_ptr_t);
3035 typedef int (*vfo_cb_t)(RIG *, vfo_t, rig_ptr_t);
3036 typedef int (*ptt_cb_t)(RIG *, vfo_t, ptt_t, rig_ptr_t);
3037 typedef int (*dcd_cb_t)(RIG *, vfo_t, dcd_t, rig_ptr_t);
3038 typedef int (*pltune_cb_t)(RIG *,
3039  vfo_t, freq_t *,
3040  rmode_t *,
3041  pbwidth_t *,
3042  rig_ptr_t);
3043 typedef int (*spectrum_cb_t)(RIG *,
3044  struct rig_spectrum_line *,
3045  rig_ptr_t);
3046 
3048 
3066 // Do NOT add/remove from this structure -- it will break DLL backwards compatibility
3068  freq_cb_t freq_event;
3069  rig_ptr_t freq_arg;
3070  mode_cb_t mode_event;
3071  rig_ptr_t mode_arg;
3072  vfo_cb_t vfo_event;
3073  rig_ptr_t vfo_arg;
3074  ptt_cb_t ptt_event;
3075  rig_ptr_t ptt_arg;
3076  dcd_cb_t dcd_event;
3077  rig_ptr_t dcd_arg;
3078  pltune_cb_t pltune;
3079  rig_ptr_t pltune_arg;
3080  spectrum_cb_t spectrum_event;
3081  rig_ptr_t spectrum_arg;
3082  /* etc.. */
3083 };
3084 
3085 
3095 struct s_rig {
3096  struct rig_caps *caps;
3097  // Do not remove the deprecated structure -- it will mess up DLL backwards compatibility
3099  struct rig_callbacks callbacks;
3100  // state should really be a pointer but that's a LOT of changes involved
3101  struct rig_state state;
3102 };
3103 
3104 
3105 
3106 /* --------------- API function prototypes -----------------*/
3107 
3109 
3110 extern HAMLIB_EXPORT(RIG *) rig_init HAMLIB_PARAMS((rig_model_t rig_model));
3111 extern HAMLIB_EXPORT(int) rig_open HAMLIB_PARAMS((RIG *rig));
3112 
3113 /*
3114  * General API commands, from most primitive to least.. :()
3115  * List Set/Get functions pairs
3116  */
3117 
3118 extern HAMLIB_EXPORT(int)
3119 rig_flush_force(hamlib_port_t *port, int flush_async_data);
3120 
3121 extern HAMLIB_EXPORT(int)
3122 rig_flush(hamlib_port_t *port);
3123 
3124 extern HAMLIB_EXPORT(void)
3125 rig_lock(RIG *rig, int lock);
3126 
3127 #if BUILTINFUNC
3128 #define rig_set_freq(r,v,f) rig_set_freq(r,v,f,__builtin_FUNCTION())
3129 extern HAMLIB_EXPORT(int)
3130 rig_set_freq HAMLIB_PARAMS((RIG *rig,
3131  vfo_t vfo,
3132  freq_t freq, const char*));
3133 #else
3134 extern HAMLIB_EXPORT(int)
3135 rig_set_freq HAMLIB_PARAMS((RIG *rig,
3136  vfo_t vfo,
3137  freq_t freq));
3138 #endif
3139 #if BUILTINFUNC
3140 #define rig_get_freq(r,v,f) rig_get_freq(r,v,f,__builtin_FUNCTION())
3141 extern HAMLIB_EXPORT(int)
3142 rig_get_freq HAMLIB_PARAMS((RIG *rig,
3143  vfo_t vfo,
3144  freq_t *freq, const char*));
3145 #else
3146 extern HAMLIB_EXPORT(int)
3147 rig_get_freq HAMLIB_PARAMS((RIG *rig,
3148  vfo_t vfo,
3149  freq_t *freq));
3150 #endif
3151 
3152 extern HAMLIB_EXPORT(int)
3153 rig_set_mode HAMLIB_PARAMS((RIG *rig,
3154  vfo_t vfo,
3155  rmode_t mode,
3156  pbwidth_t width));
3157 extern HAMLIB_EXPORT(int)
3158 rig_get_mode HAMLIB_PARAMS((RIG *rig,
3159  vfo_t vfo,
3160  rmode_t *mode,
3161  pbwidth_t *width));
3162 
3163 #if BUILTINFUNC
3164 #define rig_set_vfo(r,v) rig_set_vfo(r,v,__builtin_FUNCTION())
3165 extern HAMLIB_EXPORT(int)
3166 rig_set_vfo HAMLIB_PARAMS((RIG *rig,
3167  vfo_t vfo, const char *func));
3168 #else
3169 extern HAMLIB_EXPORT(int)
3170 rig_set_vfo HAMLIB_PARAMS((RIG *rig,
3171  vfo_t vfo));
3172 #endif
3173 extern HAMLIB_EXPORT(int)
3174 rig_get_vfo HAMLIB_PARAMS((RIG *rig,
3175  vfo_t *vfo));
3176 
3177 extern HAMLIB_EXPORT(int)
3178 rig_get_vfo_info HAMLIB_PARAMS((RIG *rig,
3179  vfo_t vfo,
3180  freq_t *freq,
3181  rmode_t *mode,
3182  pbwidth_t *width,
3183  split_t *split,
3184  int *satmode));
3185 
3186 extern HAMLIB_EXPORT(int)
3187 rig_get_vfo_list HAMLIB_PARAMS((RIG *rig, char *buf, int buflen));
3188 
3189 extern HAMLIB_EXPORT(int)
3190 netrigctl_get_vfo_mode HAMLIB_PARAMS((RIG *rig));
3191 
3192 extern HAMLIB_EXPORT(int)
3193 rig_set_ptt HAMLIB_PARAMS((RIG *rig,
3194  vfo_t vfo,
3195  ptt_t ptt));
3196 extern HAMLIB_EXPORT(int)
3197 rig_get_ptt HAMLIB_PARAMS((RIG *rig,
3198  vfo_t vfo,
3199  ptt_t *ptt));
3200 
3201 extern HAMLIB_EXPORT(int)
3202 rig_get_dcd HAMLIB_PARAMS((RIG *rig,
3203  vfo_t vfo,
3204  dcd_t *dcd));
3205 
3206 extern HAMLIB_EXPORT(int)
3207 rig_set_rptr_shift HAMLIB_PARAMS((RIG *rig,
3208  vfo_t vfo,
3209  rptr_shift_t rptr_shift));
3210 extern HAMLIB_EXPORT(int)
3211 rig_get_rptr_shift HAMLIB_PARAMS((RIG *rig,
3212  vfo_t vfo,
3213  rptr_shift_t *rptr_shift));
3214 
3215 extern HAMLIB_EXPORT(int)
3216 rig_set_rptr_offs HAMLIB_PARAMS((RIG *rig,
3217  vfo_t vfo,
3218  shortfreq_t rptr_offs));
3219 extern HAMLIB_EXPORT(int)
3220 rig_get_rptr_offs HAMLIB_PARAMS((RIG *rig,
3221  vfo_t vfo,
3222  shortfreq_t *rptr_offs));
3223 
3224 extern HAMLIB_EXPORT(int)
3225 rig_set_ctcss_tone HAMLIB_PARAMS((RIG *rig,
3226  vfo_t vfo,
3227  tone_t tone));
3228 extern HAMLIB_EXPORT(int)
3229 rig_get_ctcss_tone HAMLIB_PARAMS((RIG *rig,
3230  vfo_t vfo,
3231  tone_t *tone));
3232 
3233 extern HAMLIB_EXPORT(int)
3234 rig_set_dcs_code HAMLIB_PARAMS((RIG *rig,
3235  vfo_t vfo,
3236  tone_t code));
3237 extern HAMLIB_EXPORT(int)
3238 rig_get_dcs_code HAMLIB_PARAMS((RIG *rig,
3239  vfo_t vfo,
3240  tone_t *code));
3241 
3242 extern HAMLIB_EXPORT(int)
3243 rig_set_ctcss_sql HAMLIB_PARAMS((RIG *rig,
3244  vfo_t vfo,
3245  tone_t tone));
3246 extern HAMLIB_EXPORT(int)
3247 rig_get_ctcss_sql HAMLIB_PARAMS((RIG *rig,
3248  vfo_t vfo,
3249  tone_t *tone));
3250 
3251 extern HAMLIB_EXPORT(int)
3252 rig_set_dcs_sql HAMLIB_PARAMS((RIG *rig,
3253  vfo_t vfo,
3254  tone_t code));
3255 extern HAMLIB_EXPORT(int)
3256 rig_get_dcs_sql HAMLIB_PARAMS((RIG *rig,
3257  vfo_t vfo,
3258  tone_t *code));
3259 
3260 extern HAMLIB_EXPORT(int)
3261 rig_set_split_freq HAMLIB_PARAMS((RIG *rig,
3262  vfo_t vfo,
3263  freq_t tx_freq));
3264 extern HAMLIB_EXPORT(int)
3265 rig_get_split_freq HAMLIB_PARAMS((RIG *rig,
3266  vfo_t vfo,
3267  freq_t *tx_freq));
3268 
3269 extern HAMLIB_EXPORT(int)
3270 rig_set_split_mode HAMLIB_PARAMS((RIG *rig,
3271  vfo_t vfo,
3272  rmode_t tx_mode,
3273  pbwidth_t tx_width));
3274 extern HAMLIB_EXPORT(int)
3275 rig_get_split_mode HAMLIB_PARAMS((RIG *rig,
3276  vfo_t vfo,
3277  rmode_t *tx_mode,
3278  pbwidth_t *tx_width));
3279 
3280 extern HAMLIB_EXPORT(int)
3281 rig_set_split_freq_mode HAMLIB_PARAMS((RIG *rig,
3282  vfo_t vfo,
3283  freq_t tx_freq,
3284  rmode_t tx_mode,
3285  pbwidth_t tx_width));
3286 extern HAMLIB_EXPORT(int)
3287 rig_get_split_freq_mode HAMLIB_PARAMS((RIG *rig,
3288  vfo_t vfo,
3289  freq_t *tx_freq,
3290  rmode_t *tx_mode,
3291  pbwidth_t *tx_width));
3292 
3293 extern HAMLIB_EXPORT(int)
3294 rig_set_split_vfo HAMLIB_PARAMS((RIG *,
3295  vfo_t rx_vfo,
3296  split_t split,
3297  vfo_t tx_vfo));
3298 extern HAMLIB_EXPORT(int)
3299 rig_get_split_vfo HAMLIB_PARAMS((RIG *,
3300  vfo_t rx_vfo,
3301  split_t *split,
3302  vfo_t *tx_vfo));
3303 
3304 extern HAMLIB_EXPORT(int)
3305 rig_set_rit HAMLIB_PARAMS((RIG *rig,
3306  vfo_t vfo,
3307  shortfreq_t rit));
3308 extern HAMLIB_EXPORT(int)
3309 rig_get_rit HAMLIB_PARAMS((RIG *rig,
3310  vfo_t vfo,
3311  shortfreq_t *rit));
3312 
3313 extern HAMLIB_EXPORT(int)
3314 rig_set_xit HAMLIB_PARAMS((RIG *rig,
3315  vfo_t vfo,
3316  shortfreq_t xit));
3317 extern HAMLIB_EXPORT(int)
3318 rig_get_xit HAMLIB_PARAMS((RIG *rig,
3319  vfo_t vfo,
3320  shortfreq_t *xit));
3321 
3322 extern HAMLIB_EXPORT(int)
3323 rig_set_ts HAMLIB_PARAMS((RIG *rig,
3324  vfo_t vfo,
3325  shortfreq_t ts));
3326 extern HAMLIB_EXPORT(int)
3327 rig_get_ts HAMLIB_PARAMS((RIG *rig,
3328  vfo_t vfo,
3329  shortfreq_t *ts));
3330 
3331 extern HAMLIB_EXPORT(int)
3332 rig_power2mW HAMLIB_PARAMS((RIG *rig,
3333  unsigned int *mwpower,
3334  float power,
3335  freq_t freq,
3336  rmode_t mode));
3337 extern HAMLIB_EXPORT(int)
3338 rig_mW2power HAMLIB_PARAMS((RIG *rig,
3339  float *power,
3340  unsigned int mwpower,
3341  freq_t freq,
3342  rmode_t mode));
3343 
3344 extern HAMLIB_EXPORT(shortfreq_t)
3345 rig_get_resolution HAMLIB_PARAMS((RIG *rig,
3346  rmode_t mode));
3347 
3348 extern HAMLIB_EXPORT(int)
3349 rig_set_level HAMLIB_PARAMS((RIG *rig,
3350  vfo_t vfo,
3351  setting_t level,
3352  value_t val));
3353 extern HAMLIB_EXPORT(int)
3354 rig_get_level HAMLIB_PARAMS((RIG *rig,
3355  vfo_t vfo,
3356  setting_t level,
3357  value_t *val));
3358 
3359 #define rig_get_strength(r,v,s) rig_get_level((r),(v),RIG_LEVEL_STRENGTH, (value_t*)(s))
3360 
3361 extern HAMLIB_EXPORT(int)
3362 rig_set_parm HAMLIB_PARAMS((RIG *rig,
3363  setting_t parm,
3364  value_t val));
3365 extern HAMLIB_EXPORT(int)
3366 rig_get_parm HAMLIB_PARAMS((RIG *rig,
3367  setting_t parm,
3368  value_t *val));
3369 
3370 extern HAMLIB_EXPORT(int)
3371 rig_set_conf HAMLIB_PARAMS((RIG *rig,
3372  hamlib_token_t token,
3373  const char *val));
3374 // deprecating rig_get_conf
3375 extern HAMLIB_EXPORT(int)
3376 rig_get_conf HAMLIB_PARAMS((RIG *rig,
3377  hamlib_token_t token,
3378  char *val));
3379 extern HAMLIB_EXPORT(int)
3380 rig_get_conf2 HAMLIB_PARAMS((RIG *rig,
3381  hamlib_token_t token,
3382  char *val,
3383  int val_len));
3384 
3385 extern HAMLIB_EXPORT(int)
3386 rig_set_powerstat HAMLIB_PARAMS((RIG *rig,
3387  powerstat_t status));
3388 extern HAMLIB_EXPORT(int)
3389 rig_get_powerstat HAMLIB_PARAMS((RIG *rig,
3390  powerstat_t *status));
3391 
3392 extern HAMLIB_EXPORT(int)
3393 rig_reset HAMLIB_PARAMS((RIG *rig,
3394  reset_t reset)); /* dangerous! */
3395 
3396 extern HAMLIB_EXPORT(int)
3397 rig_set_ext_level HAMLIB_PARAMS((RIG *rig,
3398  vfo_t vfo,
3399  hamlib_token_t token,
3400  value_t val));
3401 extern HAMLIB_EXPORT(int)
3402 rig_get_ext_level HAMLIB_PARAMS((RIG *rig,
3403  vfo_t vfo,
3404  hamlib_token_t token,
3405  value_t *val));
3406 
3407 extern HAMLIB_EXPORT(int)
3408 rig_set_ext_func HAMLIB_PARAMS((RIG *rig,
3409  vfo_t vfo,
3410  hamlib_token_t token,
3411  int status));
3412 extern HAMLIB_EXPORT(int)
3413 rig_get_ext_func HAMLIB_PARAMS((RIG *rig,
3414  vfo_t vfo,
3415  hamlib_token_t token,
3416  int *status));
3417 
3418 extern HAMLIB_EXPORT(int)
3419 rig_set_ext_parm HAMLIB_PARAMS((RIG *rig,
3420  hamlib_token_t token,
3421  value_t val));
3422 extern HAMLIB_EXPORT(int)
3423 rig_get_ext_parm HAMLIB_PARAMS((RIG *rig,
3424  hamlib_token_t token,
3425  value_t *val));
3426 
3427 extern HAMLIB_EXPORT(int)
3428 rig_ext_func_foreach HAMLIB_PARAMS((RIG *rig,
3429  int (*cfunc)(RIG *,
3430  const struct confparams *,
3431  rig_ptr_t),
3432  rig_ptr_t data));
3433 extern HAMLIB_EXPORT(int)
3434 rig_ext_level_foreach HAMLIB_PARAMS((RIG *rig,
3435  int (*cfunc)(RIG *,
3436  const struct confparams *,
3437  rig_ptr_t),
3438  rig_ptr_t data));
3439 extern HAMLIB_EXPORT(int)
3440 rig_ext_parm_foreach HAMLIB_PARAMS((RIG *rig,
3441  int (*cfunc)(RIG *,
3442  const struct confparams *,
3443  rig_ptr_t),
3444  rig_ptr_t data));
3445 
3446 extern HAMLIB_EXPORT(const struct confparams *)
3447 rig_ext_lookup HAMLIB_PARAMS((RIG *rig,
3448  const char *name));
3449 
3450 extern HAMLIB_EXPORT(const struct confparams *)
3451 rig_ext_lookup_tok HAMLIB_PARAMS((RIG *rig,
3452  hamlib_token_t token));
3453 extern HAMLIB_EXPORT(hamlib_token_t)
3454 rig_ext_token_lookup HAMLIB_PARAMS((RIG *rig,
3455  const char *name));
3456 
3457 
3458 extern HAMLIB_EXPORT(int)
3459 rig_token_foreach HAMLIB_PARAMS((RIG *rig,
3460  int (*cfunc)(const struct confparams *,
3461  rig_ptr_t),
3462  rig_ptr_t data));
3463 
3464 extern HAMLIB_EXPORT(const struct confparams *)
3465 rig_confparam_lookup HAMLIB_PARAMS((RIG *rig,
3466  const char *name));
3467 extern HAMLIB_EXPORT(hamlib_token_t)
3468 rig_token_lookup HAMLIB_PARAMS((RIG *rig,
3469  const char *name));
3470 
3471 extern HAMLIB_EXPORT(int)
3472 rig_close HAMLIB_PARAMS((RIG *rig));
3473 
3474 extern HAMLIB_EXPORT(int)
3475 rig_cleanup HAMLIB_PARAMS((RIG *rig));
3476 
3477 extern HAMLIB_EXPORT(int)
3478 rig_set_ant HAMLIB_PARAMS((RIG *rig,
3479  vfo_t vfo,
3480  ant_t ant, /* antenna */
3481  value_t option)); /* optional ant info */
3482 extern HAMLIB_EXPORT(int)
3483 rig_get_ant HAMLIB_PARAMS((RIG *rig,
3484  vfo_t vfo,
3485  ant_t ant,
3486  value_t *option,
3487  ant_t *ant_curr,
3488  ant_t *ant_tx,
3489  ant_t *ant_rx));
3490 
3491 extern HAMLIB_EXPORT(setting_t)
3492 rig_has_get_level HAMLIB_PARAMS((RIG *rig,
3493  setting_t level));
3494 extern HAMLIB_EXPORT(setting_t)
3495 rig_has_set_level HAMLIB_PARAMS((RIG *rig,
3496  setting_t level));
3497 
3498 extern HAMLIB_EXPORT(setting_t)
3499 rig_has_get_parm HAMLIB_PARAMS((RIG *rig,
3500  setting_t parm));
3501 extern HAMLIB_EXPORT(setting_t)
3502 rig_has_set_parm HAMLIB_PARAMS((RIG *rig,
3503  setting_t parm));
3504 
3505 extern HAMLIB_EXPORT(setting_t)
3506 rig_has_get_func HAMLIB_PARAMS((RIG *rig,
3507  setting_t func));
3508 extern HAMLIB_EXPORT(setting_t)
3509 rig_has_set_func HAMLIB_PARAMS((RIG *rig,
3510  setting_t func));
3511 
3512 extern HAMLIB_EXPORT(int)
3513 rig_set_func HAMLIB_PARAMS((RIG *rig,
3514  vfo_t vfo,
3515  setting_t func,
3516  int status));
3517 extern HAMLIB_EXPORT(int)
3518 rig_get_func HAMLIB_PARAMS((RIG *rig,
3519  vfo_t vfo,
3520  setting_t func,
3521  int *status));
3522 
3523 extern HAMLIB_EXPORT(int)
3524 rig_send_dtmf HAMLIB_PARAMS((RIG *rig,
3525  vfo_t vfo,
3526  const char *digits));
3527 extern HAMLIB_EXPORT(int)
3528 rig_recv_dtmf HAMLIB_PARAMS((RIG *rig,
3529  vfo_t vfo,
3530  char *digits,
3531  int *length));
3532 
3533 extern HAMLIB_EXPORT(int)
3534 rig_send_morse HAMLIB_PARAMS((RIG *rig,
3535  vfo_t vfo,
3536  const char *msg));
3537 
3538 extern HAMLIB_EXPORT(int)
3539 rig_stop_morse HAMLIB_PARAMS((RIG *rig,
3540  vfo_t vfo));
3541 
3542 extern HAMLIB_EXPORT(int)
3543 rig_wait_morse HAMLIB_PARAMS((RIG *rig,
3544  vfo_t vfo));
3545 
3546 extern HAMLIB_EXPORT(int)
3547 rig_send_voice_mem HAMLIB_PARAMS((RIG *rig,
3548  vfo_t vfo,
3549  int ch));
3550 
3551 extern HAMLIB_EXPORT(int)
3552 rig_stop_voice_mem HAMLIB_PARAMS((RIG *rig,
3553  vfo_t vfo));
3554 
3555 extern HAMLIB_EXPORT(int)
3556 rig_set_bank HAMLIB_PARAMS((RIG *rig,
3557  vfo_t vfo,
3558  int bank));
3559 
3560 extern HAMLIB_EXPORT(int)
3561 rig_set_mem HAMLIB_PARAMS((RIG *rig,
3562  vfo_t vfo,
3563  int ch));
3564 extern HAMLIB_EXPORT(int)
3565 rig_get_mem HAMLIB_PARAMS((RIG *rig,
3566  vfo_t vfo,
3567  int *ch));
3568 
3569 extern HAMLIB_EXPORT(int)
3570 rig_vfo_op HAMLIB_PARAMS((RIG *rig,
3571  vfo_t vfo,
3572  vfo_op_t op));
3573 
3574 extern HAMLIB_EXPORT(vfo_op_t)
3575 rig_has_vfo_op HAMLIB_PARAMS((RIG *rig,
3576  vfo_op_t op));
3577 
3578 extern HAMLIB_EXPORT(int)
3579 rig_scan HAMLIB_PARAMS((RIG *rig,
3580  vfo_t vfo,
3581  scan_t scan,
3582  int ch));
3583 
3584 extern HAMLIB_EXPORT(scan_t)
3585 rig_has_scan HAMLIB_PARAMS((RIG *rig,
3586  scan_t scan));
3587 
3588 extern HAMLIB_EXPORT(int)
3589 rig_set_channel HAMLIB_PARAMS((RIG *rig,
3590  vfo_t vfo,
3591  const channel_t *chan)); /* mem */
3592 extern HAMLIB_EXPORT(int)
3593 rig_get_channel HAMLIB_PARAMS((RIG *rig,
3594  vfo_t vfo,
3595  channel_t *chan, int read_only));
3596 
3597 extern HAMLIB_EXPORT(int)
3598 rig_set_chan_all HAMLIB_PARAMS((RIG *rig,
3599  vfo_t vfo,
3600  const channel_t chans[]));
3601 extern HAMLIB_EXPORT(int)
3602 rig_get_chan_all HAMLIB_PARAMS((RIG *rig,
3603  vfo_t vfo,
3604  channel_t chans[]));
3605 
3606 extern HAMLIB_EXPORT(int)
3607 rig_set_chan_all_cb HAMLIB_PARAMS((RIG *rig,
3608  vfo_t vfo,
3609  chan_cb_t chan_cb,
3610  rig_ptr_t));
3611 extern HAMLIB_EXPORT(int)
3612 rig_get_chan_all_cb HAMLIB_PARAMS((RIG *rig,
3613  vfo_t vfo,
3614  chan_cb_t chan_cb,
3615  rig_ptr_t));
3616 
3617 extern HAMLIB_EXPORT(int)
3618 rig_set_mem_all_cb HAMLIB_PARAMS((RIG *rig,
3619  vfo_t vfo,
3620  chan_cb_t chan_cb,
3621  confval_cb_t parm_cb,
3622  rig_ptr_t));
3623 extern HAMLIB_EXPORT(int)
3624 rig_get_mem_all_cb HAMLIB_PARAMS((RIG *rig,
3625  vfo_t vfo,
3626  chan_cb_t chan_cb,
3627  confval_cb_t parm_cb,
3628  rig_ptr_t));
3629 
3630 extern HAMLIB_EXPORT(int)
3631 rig_set_mem_all HAMLIB_PARAMS((RIG *rig,
3632  vfo_t vfo,
3633  const channel_t *chan,
3634  const struct confparams *,
3635  const value_t *));
3636 extern HAMLIB_EXPORT(int)
3637 rig_get_mem_all HAMLIB_PARAMS((RIG *rig,
3638  vfo_t vfo,
3639  channel_t *chan,
3640  const struct confparams *,
3641  value_t *));
3642 
3643 extern HAMLIB_EXPORT(const chan_t *)
3644 rig_lookup_mem_caps HAMLIB_PARAMS((RIG *rig,
3645  int ch));
3646 
3647 extern HAMLIB_EXPORT(int)
3648 rig_mem_count HAMLIB_PARAMS((RIG *rig));
3649 
3650 extern HAMLIB_EXPORT(int)
3651 rig_set_trn HAMLIB_PARAMS((RIG *rig,
3652  int trn));
3653 extern HAMLIB_EXPORT(int)
3654 rig_get_trn HAMLIB_PARAMS((RIG *rig,
3655  int *trn));
3656 
3657 extern HAMLIB_EXPORT(int)
3658 rig_set_freq_callback HAMLIB_PARAMS((RIG *,
3659  freq_cb_t,
3660  rig_ptr_t));
3661 
3662 extern HAMLIB_EXPORT(int)
3663 rig_set_mode_callback HAMLIB_PARAMS((RIG *,
3664  mode_cb_t,
3665  rig_ptr_t));
3666 extern HAMLIB_EXPORT(int)
3667 rig_set_vfo_callback HAMLIB_PARAMS((RIG *,
3668  vfo_cb_t,
3669  rig_ptr_t));
3670 
3671 extern HAMLIB_EXPORT(int)
3672 rig_set_ptt_callback HAMLIB_PARAMS((RIG *,
3673  ptt_cb_t,
3674  rig_ptr_t));
3675 
3676 extern HAMLIB_EXPORT(int)
3677 rig_set_dcd_callback HAMLIB_PARAMS((RIG *,
3678  dcd_cb_t,
3679  rig_ptr_t));
3680 
3681 extern HAMLIB_EXPORT(int)
3682 rig_set_pltune_callback HAMLIB_PARAMS((RIG *,
3683  pltune_cb_t,
3684  rig_ptr_t));
3685 
3686 extern HAMLIB_EXPORT(int)
3687 rig_set_spectrum_callback HAMLIB_PARAMS((RIG *,
3688  spectrum_cb_t,
3689  rig_ptr_t));
3690 
3691 extern HAMLIB_EXPORT(int)
3692 rig_set_twiddle HAMLIB_PARAMS((RIG *rig,
3693  int seconds));
3694 
3695 extern HAMLIB_EXPORT(int)
3696 rig_get_twiddle HAMLIB_PARAMS((RIG *rig,
3697  int *seconds));
3698 
3699 extern HAMLIB_EXPORT(int)
3700 rig_set_uplink HAMLIB_PARAMS((RIG *rig,
3701  int val));
3702 
3703 extern HAMLIB_EXPORT(const char *)
3704 rig_get_info HAMLIB_PARAMS((RIG *rig));
3705 
3706 extern HAMLIB_EXPORT(struct rig_caps *)
3707 rig_get_caps HAMLIB_PARAMS((rig_model_t rig_model));
3708 
3709 extern HAMLIB_EXPORT(const freq_range_t *)
3710 rig_get_range HAMLIB_PARAMS((const freq_range_t *range_list,
3711  freq_t freq,
3712  rmode_t mode));
3713 
3714 extern HAMLIB_EXPORT(pbwidth_t)
3715 rig_passband_normal HAMLIB_PARAMS((RIG *rig,
3716  rmode_t mode));
3717 extern HAMLIB_EXPORT(pbwidth_t)
3718 rig_passband_narrow HAMLIB_PARAMS((RIG *rig,
3719  rmode_t mode));
3720 extern HAMLIB_EXPORT(pbwidth_t)
3721 rig_passband_wide HAMLIB_PARAMS((RIG *rig,
3722  rmode_t mode));
3723 
3724 extern HAMLIB_EXPORT(const char *)
3725 rigerror HAMLIB_PARAMS((int errnum));
3726 extern HAMLIB_EXPORT(const char *)
3727 rigerror2 HAMLIB_PARAMS((int errnum));
3728 
3729 extern HAMLIB_EXPORT(int)
3730 rig_setting2idx HAMLIB_PARAMS((setting_t s));
3731 
3732 #define HAMLIB_SETTINGS_FILE "hamlib_settings"
3733 
3734 extern HAMLIB_EXPORT(setting_t)
3735 rig_idx2setting(int i);
3736 /*
3737  * Even if these functions are prefixed with "rig_", they are not rig specific
3738  * Maybe "hamlib_" would have been better. Let me know. --SF
3739  */
3740 extern HAMLIB_EXPORT(void)
3741 rig_set_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
3742 
3743 extern HAMLIB_EXPORT(void)
3744 rig_get_debug HAMLIB_PARAMS((enum rig_debug_level_e *debug_level));
3745 
3746 extern HAMLIB_EXPORT(void)
3747 rig_set_debug_time_stamp HAMLIB_PARAMS((int flag));
3748 
3749 #define rig_set_debug_level(level) rig_set_debug(level)
3750 
3751 extern HAMLIB_EXPORT(int)
3752 rig_need_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
3753 
3754 
3755 extern HAMLIB_EXPORT(void)add2debugmsgsave(const char *s);
3756 // this needs to be fairly big to avoid compiler warnings
3757 extern HAMLIB_EXPORT_VAR(char) debugmsgsave[DEBUGMSGSAVE_SIZE]; // last debug msg
3758 extern HAMLIB_EXPORT_VAR(char) debugmsgsave2[DEBUGMSGSAVE_SIZE]; // last-1 debug msg
3759 // debugmsgsave3 is deprecated
3760 extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debug msg
3761 #define rig_debug_clear() { debugmsgsave[0] = debugmsgsave2[0] = debugmsgsave3[0] = 0; };
3762 #ifndef __cplusplus
3763 #ifdef __GNUC__
3764 // doing the debug macro with a dummy sprintf allows gcc to check the format string
3765 #define rig_debug(debug_level,fmt,...) do { snprintf(debugmsgsave2,sizeof(debugmsgsave2),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); add2debugmsgsave(debugmsgsave2); } while(0)
3766 #endif
3767 #endif
3768 
3769 // Measuring elapsed time -- local variable inside function when macro is used
3770 #define ELAPSED1 struct timespec __begin; elapsed_ms(&__begin, HAMLIB_ELAPSED_SET);
3771 #define ELAPSED2 rig_debug(RIG_DEBUG_VERBOSE, "%s%d:%s: elapsed=%.0lfms\n", spaces(STATE(rig)->depth), STATE(rig)->depth, __func__, elapsed_ms(&__begin, HAMLIB_ELAPSED_GET));
3772 
3773 // use this instead of snprintf for automatic detection of buffer limit
3774 #define SNPRINTF(s,n,...) { if (snprintf(s,n,##__VA_ARGS__) >= (n)) fprintf(stderr,"***** %s(%d): message truncated *****\n", __func__, __LINE__); }
3775 
3776 extern HAMLIB_EXPORT(void)
3777 rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level,
3778  const char *fmt, ...));
3779 
3780 extern HAMLIB_EXPORT(vprintf_cb_t)
3781 rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb,
3782  rig_ptr_t arg));
3783 
3784 extern HAMLIB_EXPORT(FILE *)
3785 rig_set_debug_file HAMLIB_PARAMS((FILE *stream));
3786 
3787 extern HAMLIB_EXPORT(int)
3788 rig_register HAMLIB_PARAMS((struct rig_caps *caps));
3789 
3790 extern HAMLIB_EXPORT(int)
3791 rig_unregister HAMLIB_PARAMS((rig_model_t rig_model));
3792 
3793 extern HAMLIB_EXPORT(int)
3794 rig_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rig_caps *, rig_ptr_t),
3795  rig_ptr_t data));
3796 
3797 extern HAMLIB_EXPORT(int)
3798 rig_list_foreach_model HAMLIB_PARAMS((int (*cfunc)(const rig_model_t rig_model, rig_ptr_t),
3799  rig_ptr_t data));
3800 
3801 extern HAMLIB_EXPORT(int)
3802 rig_load_backend HAMLIB_PARAMS((const char *be_name));
3803 
3804 extern HAMLIB_EXPORT(int)
3805 rig_check_backend HAMLIB_PARAMS((rig_model_t rig_model));
3806 
3807 extern HAMLIB_EXPORT(int)
3808 rig_load_all_backends HAMLIB_PARAMS((void));
3809 
3810 typedef int (*rig_probe_func_t)(const hamlib_port_t *, rig_model_t, rig_ptr_t);
3811 
3812 extern HAMLIB_EXPORT(int)
3813 rig_probe_all HAMLIB_PARAMS((hamlib_port_t *p,
3814  rig_probe_func_t,
3815  rig_ptr_t));
3816 
3817 extern HAMLIB_EXPORT(rig_model_t)
3818 rig_probe HAMLIB_PARAMS((hamlib_port_t *p));
3819 
3820 
3821 /* Misc calls */
3822 extern HAMLIB_EXPORT(const char *) rig_strrmode(rmode_t mode);
3823 extern HAMLIB_EXPORT(int) rig_strrmodes(rmode_t modes, char *buf, int buflen);
3824 extern HAMLIB_EXPORT(const char *) rig_strvfo(vfo_t vfo);
3825 extern HAMLIB_EXPORT(const char *) rig_strfunc(setting_t);
3826 extern HAMLIB_EXPORT(const char *) rig_strlevel(setting_t);
3827 extern HAMLIB_EXPORT(const char *) rig_strparm(setting_t);
3828 extern HAMLIB_EXPORT(const char *) rig_stragclevel(enum agc_level_e level);
3829 extern HAMLIB_EXPORT(enum agc_level_e) rig_levelagcstr (const char *agcString);
3830 extern HAMLIB_EXPORT(enum agc_level_e) rig_levelagcvalue (int agcValue);
3831 extern HAMLIB_EXPORT(value_t) rig_valueagclevel (enum agc_level_e agcLevel);
3832 extern HAMLIB_EXPORT(const char *) rig_strptrshift(rptr_shift_t);
3833 extern HAMLIB_EXPORT(const char *) rig_strvfop(vfo_op_t op);
3834 extern HAMLIB_EXPORT(const char *) rig_strscan(scan_t scan);
3835 extern HAMLIB_EXPORT(const char *) rig_strstatus(enum rig_status_e status);
3836 extern HAMLIB_EXPORT(const char *) rig_strmtype(chan_type_t mtype);
3837 extern HAMLIB_EXPORT(const char *) rig_strspectrummode(enum rig_spectrum_mode_e mode);
3838 extern HAMLIB_EXPORT(const char *) rig_strcommstatus(rig_comm_status_t vfo);
3839 
3840 extern HAMLIB_EXPORT(rmode_t) rig_parse_mode(const char *s);
3841 extern HAMLIB_EXPORT(vfo_t) rig_parse_vfo(const char *s);
3842 extern HAMLIB_EXPORT(setting_t) rig_parse_func(const char *s);
3843 extern HAMLIB_EXPORT(setting_t) rig_parse_level(const char *s);
3844 extern HAMLIB_EXPORT(setting_t) rig_parse_parm(const char *s);
3845 extern HAMLIB_EXPORT(vfo_op_t) rig_parse_vfo_op(const char *s);
3846 extern HAMLIB_EXPORT(scan_t) rig_parse_scan(const char *s);
3847 extern HAMLIB_EXPORT(rptr_shift_t) rig_parse_rptr_shift(const char *s);
3848 extern HAMLIB_EXPORT(chan_type_t) rig_parse_mtype(const char *s);
3849 
3850 extern HAMLIB_EXPORT(const char *) rig_license HAMLIB_PARAMS((void));
3851 extern HAMLIB_EXPORT(const char *) rig_version HAMLIB_PARAMS((void));
3852 extern HAMLIB_EXPORT(const char *) rig_copyright HAMLIB_PARAMS((void));
3853 
3854 extern HAMLIB_EXPORT(void) rig_no_restore_ai(void);
3855 
3856 extern HAMLIB_EXPORT(int) rig_get_cache_timeout_ms(RIG *rig, hamlib_cache_t selection);
3857 extern HAMLIB_EXPORT(int) rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection, int ms);
3858 
3859 extern HAMLIB_EXPORT(int) rig_set_vfo_opt(RIG *rig, int status);
3860 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);
3861 extern HAMLIB_EXPORT(int) rig_get_rig_info(RIG *rig, char *response, int max_response_len);
3862 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);
3863 extern HAMLIB_EXPORT(int) rig_get_cache_freq(RIG *rig, vfo_t vfo, freq_t *freq, int * cache_ms_freq);
3864 
3865 extern HAMLIB_EXPORT(int) rig_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset);
3866 extern HAMLIB_EXPORT(int) rig_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset);
3867 
3868 typedef unsigned long rig_useconds_t;
3869 extern HAMLIB_EXPORT(int) hl_usleep(rig_useconds_t msec);
3870 
3871 extern HAMLIB_EXPORT(int) rig_cookie(RIG *rig, enum cookie_e cookie_cmd, char *cookie, int cookie_len);
3872 
3873 extern HAMLIB_EXPORT(int) rig_password(RIG *rig, const char *key1);
3874 extern HAMLIB_EXPORT(void) rig_password_generate_secret(char *pass,
3875  char result[HAMLIB_SECRET_LENGTH + 1]);
3876 extern HAMLIB_EXPORT(int) rig_send_raw(RIG *rig, const unsigned char* send, int send_len, unsigned char* reply, int reply_len, unsigned char *term);
3877 
3878 extern HAMLIB_EXPORT(int)
3879 longlat2locator HAMLIB_PARAMS((double longitude,
3880  double latitude,
3881  char *locator_res,
3882  int pair_count));
3883 
3884 extern HAMLIB_EXPORT(int)
3885 locator2longlat HAMLIB_PARAMS((double *longitude,
3886  double *latitude,
3887  const char *locator));
3888 
3889 extern HAMLIB_EXPORT(char*) rig_make_md5(char *pass);
3890 
3891 extern HAMLIB_EXPORT(int) rig_set_lock_mode(RIG *rig, int lock);
3892 extern HAMLIB_EXPORT(int) rig_get_lock_mode(RIG *rig, int *lock);
3893 
3894 extern HAMLIB_EXPORT(int) rig_is_model(RIG *rig, rig_model_t model);
3895 
3896 extern HAMLIB_EXPORT(char*) rig_date_strget(char *buf, int buflen, int localtime);
3897 
3898 enum GPIO { GPIO1, GPIO2, GPIO3, GPIO4 };
3899 extern HAMLIB_EXPORT(int) rig_cm108_get_bit(hamlib_port_t *p, enum GPIO gpio, int *bit);
3900 extern HAMLIB_EXPORT(int) rig_cm108_set_bit(hamlib_port_t *p, enum GPIO gpio, int bit);
3901 extern HAMLIB_EXPORT(int) rig_band_changed(RIG *rig, hamlib_bandselect_t band);
3902 
3903 extern HAMLIB_EXPORT(void *) rig_data_pointer(RIG *rig, rig_ptrx_t idx);
3904 
3906 
3907 __END_DECLS
3908 
3909 #endif /* _RIG_H */
3910 
setting_t rig_parse_parm(const char *s)
Convert alpha string to RIG_PARM_...
Definition: misc.c:1303
vfo_t rig_parse_vfo(const char *s)
Convert alpha string to enum RIG_VFO_...
Definition: misc.c:641
const char * rig_strparm(setting_t parm)
Convert enum RIG_PARM_... to alpha string.
Definition: misc.c:1353
const char * rig_strptrshift(rptr_shift_t shift)
convert enum RIG_RPT_SHIFT_... to printable character
Definition: misc.c:1675
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:572
rptr_shift_t rig_parse_rptr_shift(const char *s)
Convert alpha char to enum RIG_RPT_SHIFT_...
Definition: misc.c:1700
enum agc_level_e rig_levelagcstr(const char *agcString)
Convert AGC string... to agc_level_e.
Definition: misc.c:1505
value_t rig_valueagclevel(enum agc_level_e agcLevel)
Convert a enum agc_level_e to value.
Definition: misc.c:1454
uint64_t rig_idx2setting(int i)
Definition: misc.c:798
const char * rig_strstatus(enum rig_status_e status)
Convert enum RIG_STATUS_... to printable string.
Definition: misc.c:427
chan_type_t rig_parse_mtype(const char *s)
Convert alpha string to enum RIG_MTYPE_...
Definition: misc.c:1746
const char * rig_strmtype(chan_type_t mtype)
Convert enum RIG_MTYPE_... to alpha string.
Definition: misc.c:1771
enum agc_level_e rig_levelagcvalue(int agcValue)
Convert a value to agc_level_e – constrains the range.
Definition: misc.c:1474
const char * rig_strspectrummode(enum rig_spectrum_mode_e mode)
Convert enum RIG_SPECTRUM_MODE_... to alpha string.
Definition: misc.c:1811
const char * rig_strrmode(rmode_t mode)
Convert enum RIG_MODE to alpha string.
Definition: misc.c:540
const char * rig_strscan(scan_t rscan)
Convert enum RIG_SCAN_... to alpha string.
Definition: misc.c:1646
setting_t rig_parse_level(const char *s)
Convert alpha string to enum RIG_LEVEL_...
Definition: misc.c:1098
scan_t rig_parse_scan(const char *s)
Convert alpha string to enum RIG_SCAN_...
Definition: misc.c:1621
const char * rig_strcommstatus(rig_comm_status_t status)
Convert enum RIG_COMM_STATUS... to alpha string.
Definition: misc.c:2757
const char * rig_stragclevel(enum agc_level_e level)
Convert enum RIG_AGC_... to alpha string.
Definition: misc.c:1429
setting_t rig_parse_func(const char *s)
Convert alpha string to enum RIG_FUNC_...
Definition: misc.c:810
const char * rig_strvfo(vfo_t vfo)
Convert enum RIG_VFO_... to alpha string.
Definition: misc.c:670
rmode_t rig_parse_mode(const char *s)
Convert alpha string to enum RIG_MODE.
Definition: misc.c:513
const char * rig_strvfop(vfo_op_t op)
Convert enum RIG_OP_... to alpha string.
Definition: misc.c:1576
int rig_flush_force(hamlib_port_t *port, int flush_async_data)
Force flush of rig communication data buffers.
Definition: misc.c:2265
const char * rig_strlevel(setting_t level)
Convert enum RIG_LEVEL_... to alpha string.
Definition: misc.c:1179
const char * rig_strfunc(setting_t func)
Convert enum RIG_FUNC_... to alpha string.
Definition: misc.c:886
vfo_op_t rig_parse_vfo_op(const char *s)
Convert alpha string to enum RIG_OP_...
Definition: misc.c:1551
int rig_set_vfo(RIG *rig, vfo_t vfo)
set the current VFO
Definition: rig.c:3285
unsigned int vfo_t
VFO definition.
Definition: rig.h:516
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:5569
int rig_send_dtmf(RIG *rig, vfo_t vfo, const char *digits)
send DTMF digits
Definition: rig.c:7241
int rig_set_twiddle(RIG *rig, int seconds)
timeout (secs) to stop rigctld when VFO is manually changed
Definition: rig.c:1879
int rig_get_rig_info(RIG *rig, char *response, int max_response_len)
get freq/mode/width for requested VFO
Definition: rig.c:7913
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:1528
int rig_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
get the status of the DCD
Definition: rig.c:4191
serial_parity_e
Serial parity.
Definition: rig.h:331
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:5908
int rig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
Definition: rig.c:2954
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)
get cached values for a VFO
Definition: cache.c:310
int rig_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan)
set channel data
Definition: mem.c:684
int rig_set_split_vfo(RIG *rig, vfo_t rx_vfo, split_t split, vfo_t tx_vfo)
set the split mode
Definition: rig.c:5657
dcd_e
Definition: rig.h:652
hamlib_token_t rig_ext_token_lookup(RIG *rig, const char *name)
Simple lookup returning token id associated with name.
Definition: ext.c:324
int rig_set_freq_callback(RIG *rig, freq_cb_t cb, rig_ptr_t arg)
set the callback for freq events
Definition: event.c:379
hamlib_port_t_deprecated port_t_deprecated
Port definition.
Definition: rig.h:2501
hamlib_band_t
Band enumeration.
Definition: rig.h:774
const char * hamlib_copyright2
Hamlib copyright notice.
Definition: rig.c:112
int rig_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs)
get the current repeater offset
Definition: rig.c:4575
int rig_get_ext_func(RIG *rig, vfo_t vfo, hamlib_token_t token, int *status)
get the value of a function extra parameter
Definition: settings.c:847
int rig_set_powerstat(RIG *rig, powerstat_t status)
turn on/off the radio
Definition: rig.c:6815
int rig_get_powerstat(RIG *rig, powerstat_t *status)
get the on/off status of the radio
Definition: rig.c:6867
int rig_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
set the current DCS code
Definition: tones.c:495
long hamlib_token_t
configuration token
Definition: rig.h:859
serial_control_state_e
Serial control state.
Definition: rig.h:353
int rig_set_mem(RIG *rig, vfo_t vfo, int ch)
set the current memory channel number
Definition: mem.c:68
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:6634
setting_t rig_has_set_func(RIG *rig, setting_t func)
check ability of radio functions
Definition: settings.c:457
int rig_get_vfo(RIG *rig, vfo_t *vfo)
get the current VFO
Definition: rig.c:3432
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:5427
uint64_t rmode_t
Radio mode.
Definition: rig.h:1359
int rig_set_vfo_callback(RIG *rig, vfo_cb_t cb, rig_ptr_t arg)
set the callback for vfo events
Definition: event.c:435
shortfreq_t pbwidth_t
Definition: rig.h:648
int rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
set a radio level setting
Definition: settings.c:73
int rig_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
get the current RIT offset
Definition: rig.c:6079
int rig_cleanup(RIG *rig)
release a rig handle and free associated memory
Definition: rig.c:1835
rig_type_t
Rig type flags.
Definition: rig.h:363
int rig_get_mem(RIG *rig, vfo_t vfo, int *ch)
get the current memory channel number
Definition: mem.c:131
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:1460
int rig_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val)
set a radio parm extra parameter
Definition: settings.c:912
enum rig_port_e rig_port_t
Port type.
split_t
Split mode.
Definition: rig.h:445
int rig_get_vfo_list(RIG *rig, char *buf, int buflen)
get list of available vfos
Definition: rig.c:8101
rptr_shift_t
Repeater shift type.
Definition: rig.h:435
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:1326
int rig_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code)
get the current DCS code
Definition: tones.c:558
scan_t rig_has_scan(RIG *rig, scan_t scan)
check availability of scanning functions
Definition: rig.c:7136
ptt_type_t
PTT type.
Definition: rig.h:692
int rig_get_clock(RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset)
get the rig's clock
Definition: rig.c:8138
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:1394
int rig_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
set CTCSS squelch
Definition: tones.c:364
ann_t
Announce.
Definition: rig.h:925
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:491
int rig_get_channel(RIG *rig, vfo_t vfox, channel_t *chan, int read_only)
get channel data
Definition: mem.c:828
int rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
get the frequency of the target VFO
Definition: rig.c:2409
int rig_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
activate/de-activate functions of radio
Definition: settings.c:488
int rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
get the status of the PTT
Definition: rig.c:3866
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:1126
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:6708
int rig_set_bank(RIG *rig, vfo_t vfo, int bank)
set the current memory bank
Definition: mem.c:194
const char * rig_get_caps_cptr(rig_model_t rig_model, enum rig_caps_cptr_e rig_caps)
Function to return char pointer value from rig->caps.
Definition: misc.c:2702
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:82
int rig_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone)
get the current CTCSS squelch
Definition: tones.c:432
int rig_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
get the current XIT offset
Definition: rig.c:6229
int rig_set_spectrum_callback(RIG *rig, spectrum_cb_t cb, rig_ptr_t arg)
set the callback for spectrum line reception events
Definition: event.c:549
int rig_get_parm(RIG *rig, setting_t parm, value_t *val)
get the value of a parameter
Definition: settings.c:275
uint64_t rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps)
Function to return int value from rig->caps Does not support > 32-bit rig_caps values.
Definition: misc.c:2656
rig_caps_int_e
Enumeration of rig->caps values.
Definition: rig.h:2320
int rig_get_trn(RIG *rig, int *trn)
get the current transceive mode
Definition: event.c:606
int rig_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
set the repeater offset
Definition: rig.c:4498
int rig_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
get the current CTCSS sub-tone frequency
Definition: tones.c:166
const struct confparams * rig_confparam_lookup(RIG *rig, const char *name)
lookup a confparam struct
Definition: conf.c:1369
setting_t rig_has_set_level(RIG *rig, setting_t level)
check settable ability of level settings
Definition: settings.c:339
rig_parm_e
Rig Parameters.
Definition: rig.h:1136
int rig_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
set the antenna
Definition: rig.c:6461
void rig_set_debug_time_stamp(int flag)
Enable or disable the time stamp on debugging output.
Definition: debug.c:190
shortfreq_t rig_get_resolution(RIG *rig, rmode_t mode)
get the best frequency resolution of the rig
Definition: rig.c:6773
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:8020
pbwidth_t rig_passband_wide(RIG *rig, rmode_t mode)
get the wide passband of a mode
Definition: rig.c:3226
const char * rigerror2(int errnum)
get string describing the error code
Definition: rig.c:439
uint64_t setting_t
Setting.
Definition: rig.h:1201
powerstat_t
Radio power state.
Definition: rig.h:708
multicast_item_e
Multicast data items 3 different data item can be included in the multicast JSON.
Definition: rig.h:1179
setting_t rig_has_get_func(RIG *rig, setting_t func)
check ability of radio functions
Definition: settings.c:427
int rig_set_uplink(RIG *rig, int val)
For GPredict to avoid reading frequency on uplink VFO.
Definition: rig.c:1903
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:585
int rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
set the split frequencies
Definition: rig.c:4658
int rig_probe_all(hamlib_port_t *port, rig_probe_func_t cfunc, rig_ptr_t data)
try to guess rigs
Definition: rig.c:6995
rig_errcode_e
Definition: rig.h:188
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:182
rig_conf_e
parameter types
Definition: rig.h:882
scan_t
Rig Scan operation.
Definition: rig.h:843
int rig_send_voice_mem(RIG *rig, vfo_t vfo, int ch)
send voice memory content
Definition: rig.c:7664
int rig_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length)
receive DTMF digits
Definition: rig.c:7318
int rig_set_mode_callback(RIG *rig, mode_cb_t cb, rig_ptr_t arg)
set the callback for mode events
Definition: event.c:407
int rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
set the frequency of the target VFO
Definition: rig.c:2061
int rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
set PTT on/off
Definition: rig.c:3535
int rig_set_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val)
set a radio level extra parameter
Definition: settings.c:650
double freq_t
Frequency type,.
Definition: rig.h:456
int rig_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
perform Memory/VFO operations
Definition: rig.c:7169
cookie_e
Rig Cookie enumerations.
Definition: rig.h:1169
int rig_send_morse(RIG *rig, vfo_t vfo, const char *msg)
send morse code
Definition: rig.c:7394
int rig_setting2idx(setting_t s)
basically convert setting_t expressed 2^n to n
Definition: settings.c:971
int rig_mem_count(RIG *rig)
get memory channel count
Definition: mem.c:1652
ptt_t
PTT status.
Definition: rig.h:679
RIG * rig_init(rig_model_t rig_model)
Allocate a new RIG handle.
Definition: rig.c:529
setting_t rig_has_get_parm(RIG *rig, setting_t parm)
check retrieval ability of parameter settings
Definition: settings.c:369
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:132
int rig_get_ext_level(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val)
get the value of a level extra parameter
Definition: settings.c:716
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:521
int rig_get_conf(RIG *rig, hamlib_token_t token, char *val)
get the value of a configuration parameter
Definition: conf.c:1531
struct freq_range_list freq_range_t
Frequency range.
int rig_set_clock(RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset)
set the rig's clock
Definition: rig.c:8120
int rig_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
set CTCSS sub-tone frequency
Definition: tones.c:98
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:2756
vfo_op_t
VFO operation.
Definition: rig.h:750
int rig_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts)
get the current Tuning Step
Definition: rig.c:6379
FILE * rig_set_debug_file(FILE *stream)
Change the output stream from stderr a different stream.
Definition: debug.c:334
signed long shortfreq_t
Short frequency type.
Definition: rig.h:478
void rig_get_debug(enum rig_debug_level_e *debug_level)
Get the current debug level.
Definition: debug.c:160
vprintf_cb_t rig_set_debug_callback(vprintf_cb_t cb, rig_ptr_t arg)
Set callback to handle debugging messages.
Definition: debug.c:316
const char * rig_version()
get the Hamlib version
Definition: rig.c:8169
int rig_need_debug(enum rig_debug_level_e debug_level)
Test if a given debug level is active.
Definition: debug.c:176
rig_port_e
Port type.
Definition: rig.h:310
int rig_wait_morse(RIG *rig, vfo_t vfo)
wait morse code
Definition: rig.c:7599
int rig_close(RIG *rig)
close the communication to the rig
Definition: rig.c:1658
pbwidth_t rig_passband_narrow(RIG *rig, rmode_t mode)
get the narrow passband of a mode
Definition: rig.c:3173
serial_handshake_e
Serial handshake.
Definition: rig.h:343
const chan_t * rig_lookup_mem_caps(RIG *rig, int ch)
lookup the memory type and capabilities
Definition: mem.c:1587
int rig_get_cache_freq(RIG *rig, vfo_t vfo, freq_t *freq, int *cache_ms_freq_p)
get cached values for a VFO
Definition: cache.c:549
agc_level_e
AGC delay settings.
Definition: rig.h:381
dcd_type_t
DCD type.
Definition: rig.h:663
int rig_get_chan_all(RIG *rig, vfo_t vfo, channel_t chans[])
get all channel data
Definition: mem.c:1210
int rig_set_chan_all(RIG *rig, vfo_t vfo, const channel_t chans[])
set all channel data
Definition: mem.c:1167
int rig_set_vfo_opt(RIG *rig, int status)
set the vfo option for rigctld
Definition: rig.c:7807
int rig_set_ptt_callback(RIG *rig, ptt_cb_t cb, rig_ptr_t arg)
set the callback for ptt events
Definition: event.c:463
pbwidth_t rig_passband_normal(RIG *rig, rmode_t mode)
get the normal passband of a mode
Definition: rig.c:3122
rig_debug_level_e
Hamlib debug levels.
Definition: rig.h:241
void * rig_get_function_ptr(rig_model_t rig_model, enum rig_function_e rig_function)
Function to return pointer to rig_* function.
Definition: misc.c:2364
#define RIG_SETTING_MAX
Maximum # of rig settings.
Definition: rig.h:1207
setting_t rig_has_set_parm(RIG *rig, setting_t parm)
check settable ability of parameter settings
Definition: settings.c:398
int rig_set_ext_func(RIG *rig, vfo_t vfo, hamlib_token_t token, int status)
set a radio function extra parameter
Definition: settings.c:781
const char * rig_license()
get the Hamlib license
Definition: rig.c:8159
int rig_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
set the RIT
Definition: rig.c:6007
hamlib_bandselect_t
Definition: rig.h:794
const char * rig_copyright()
get the Hamlib copyright
Definition: rig.c:8179
int rig_stop_voice_mem(RIG *rig, vfo_t vfo)
stop sending voice memory
Definition: rig.c:7733
int rig_get_twiddle(RIG *rig, int *seconds)
get the twiddle timeout value (secs)
Definition: rig.c:1930
int rig_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
set the Tuning Step
Definition: rig.c:6307
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:6541
int rig_open(RIG *rig)
open the communication to the rig
Definition: rig.c:932
int rig_set_parm(RIG *rig, setting_t parm, value_t val)
set a radio parameter
Definition: settings.c:241
int rig_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code)
get the current encoding DCS code
Definition: tones.c:293
hamlib_token_t rig_token_lookup(RIG *rig, const char *name)
lookup a token id
Definition: conf.c:1439
const struct confparams * rig_ext_lookup_tok(RIG *rig, hamlib_token_t token)
lookup ext token, return pointer to confparams struct.
Definition: ext.c:279
int rig_stop_morse(RIG *rig, vfo_t vfo)
stop morse code
Definition: rig.c:7490
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:232
const char * rig_get_info(RIG *rig)
get general information from the radio
Definition: rig.c:7846
setting_t rig_has_get_level(RIG *rig, setting_t level)
check retrieval ability of level settings
Definition: settings.c:309
uint64_t rig_level_e
Rig Level Settings.
Definition: rig.h:1048
int rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
get the value of a level
Definition: settings.c:153
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:1079
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:5025
int rig_reset(RIG *rig, reset_t reset)
reset the radio
Definition: rig.c:6922
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:1307
int rig_set_trn(RIG *rig, int trn)
control the transceive mode
Definition: event.c:582
vfo_op_t rig_has_vfo_op(RIG *rig, vfo_op_t op)
check retrieval ability of VFO operations
Definition: rig.c:7024
unsigned int ant_t
Antenna typedef.
Definition: rig.h:982
int rig_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
get the current repeater shift
Definition: rig.c:4414
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:5263
int rig_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
set the repeater shift
Definition: rig.c:4336
reset_t
Reset operation.
Definition: rig.h:720
rig_function_e
Rig data structure.
Definition: rig.h:2217
int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
get the current split frequencies
Definition: rig.c:4848
void rig_set_debug(enum rig_debug_level_e debug_level)
Change the current debug level.
Definition: debug.c:147
int rig_get_ext_parm(RIG *rig, hamlib_token_t token, value_t *val)
get the value of a parm extra parameter
Definition: settings.c:944
int rig_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
perform Memory/VFO operations
Definition: rig.c:7053
rig_status_e
Development status of the backend.
Definition: rig.h:415
int rig_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit)
set the XIT
Definition: rig.c:6157
int rig_set_conf(RIG *rig, hamlib_token_t token, const char *val)
set a radio configuration parameter
Definition: conf.c:1470
void rig_debug(enum rig_debug_level_e debug_level, const char *fmt,...)
Print debugging messages through stderr by default.
Definition: debug.c:206
int rig_cookie(RIG *rig, enum cookie_e cookie_cmd, char *cookie, int cookie_len)
get a cookie to grab rig control
Definition: rig.c:8208
rig_spectrum_mode_e
Spectrum scope modes.
Definition: rig.h:1818
rig_model_t rig_probe(hamlib_port_t *port)
try to guess a rig
Definition: rig.c:6967
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:7771
chan_type_t
Memory channel type definition.
Definition: rig.h:1667
@ RIG_PARITY_MARK
Definition: rig.h:335
@ RIG_PARITY_NONE
Definition: rig.h:332
@ RIG_PARITY_EVEN
Definition: rig.h:334
@ RIG_PARITY_SPACE
Definition: rig.h:336
@ RIG_PARITY_ODD
Definition: rig.h:333
@ RIG_DCD_ON
Definition: rig.h:654
@ RIG_DCD_OFF
Definition: rig.h:653
@ RIG_BAND_AIR
Definition: rig.h:789
@ RIG_BAND_UNUSED
Definition: rig.h:788
@ RIG_BAND_20M
Definition: rig.h:780
@ RIG_BAND_12M
Definition: rig.h:783
@ RIG_BAND_60M
Definition: rig.h:777
@ RIG_BAND_10M
Definition: rig.h:784
@ RIG_BAND_430MHZ
Definition: rig.h:791
@ RIG_BAND_40M
Definition: rig.h:778
@ RIG_BAND_15M
Definition: rig.h:782
@ RIG_BAND_GEN
Definition: rig.h:786
@ RIG_BAND_30M
Definition: rig.h:779
@ RIG_BAND_144MHZ
Definition: rig.h:790
@ RIG_BAND_80M
Definition: rig.h:776
@ RIG_BAND_MW
Definition: rig.h:787
@ RIG_BAND_6M
Definition: rig.h:785
@ RIG_BAND_17M
Definition: rig.h:781
@ RIG_BAND_160M
Definition: rig.h:775
@ RIG_SIGNAL_ON
Definition: rig.h:355
@ RIG_SIGNAL_OFF
Definition: rig.h:356
@ RIG_SIGNAL_UNSET
Definition: rig.h:354
@ RIG_FLAG_COMPUTER
Definition: rig.h:369
@ RIG_FLAG_TUNER
Definition: rig.h:374
@ RIG_FLAG_SCANNER
Definition: rig.h:366
@ RIG_FLAG_TRANSMITTER
Definition: rig.h:365
@ RIG_FLAG_MOBILE
Definition: rig.h:367
@ RIG_FLAG_TRUNKING
Definition: rig.h:370
@ RIG_FLAG_APRS
Definition: rig.h:371
@ RIG_FLAG_TNC
Definition: rig.h:372
@ RIG_FLAG_HANDHELD
Definition: rig.h:368
@ RIG_FLAG_DXCLUSTER
Definition: rig.h:373
@ RIG_FLAG_RECEIVER
Definition: rig.h:364
@ RIG_SPLIT_ON
Definition: rig.h:447
@ RIG_SPLIT_OFF
Definition: rig.h:446
@ RIG_RPT_SHIFT_PLUS
Definition: rig.h:438
@ RIG_RPT_SHIFT_MINUS
Definition: rig.h:437
@ RIG_RPT_SHIFT_NONE
Definition: rig.h:436
@ RIG_PTT_RIG
Definition: rig.h:694
@ RIG_PTT_RIG_MICDATA
Definition: rig.h:698
@ RIG_PTT_SERIAL_DTR
Definition: rig.h:695
@ RIG_PTT_NONE
Definition: rig.h:693
@ RIG_PTT_PARALLEL
Definition: rig.h:697
@ RIG_PTT_GPION
Definition: rig.h:701
@ RIG_PTT_GPIO
Definition: rig.h:700
@ RIG_PTT_CM108
Definition: rig.h:699
@ RIG_PTT_SERIAL_RTS
Definition: rig.h:696
@ RIG_ANN_RXMODE
Definition: rig.h:929
@ RIG_ANN_OFF
Definition: rig.h:927
@ RIG_ANN_ENG
Definition: rig.h:931
@ RIG_ANN_FREQ
Definition: rig.h:928
@ RIG_ANN_NONE
Definition: rig.h:926
@ RIG_ANN_CW
Definition: rig.h:930
@ RIG_ANN_JAP
Definition: rig.h:932
@ RIG_PARM_BEEP
Definition: rig.h:1141
@ RIG_PARM_AFIF_LAN
Definition: rig.h:1149
@ RIG_PARM_AFIF_WLAN
Definition: rig.h:1150
@ RIG_PARM_BANDSELECT
Definition: rig.h:1147
@ RIG_PARM_TIME
Definition: rig.h:1142
@ RIG_PARM_SCREENSAVER
Definition: rig.h:1145
@ RIG_PARM_ANN
Definition: rig.h:1138
@ RIG_PARM_AFIF
Definition: rig.h:1146
@ RIG_PARM_NONE
Definition: rig.h:1137
@ RIG_PARM_KEYERTYPE
Definition: rig.h:1148
@ RIG_PARM_AFIF_ACC
Definition: rig.h:1151
@ RIG_PARM_BACKLIGHT
Definition: rig.h:1140
@ RIG_PARM_KEYLIGHT
Definition: rig.h:1144
@ RIG_PARM_BAT
Definition: rig.h:1143
@ RIG_PARM_APO
Definition: rig.h:1139
@ RIG_POWER_OPERATE
Definition: rig.h:712
@ RIG_POWER_UNKNOWN
Definition: rig.h:713
@ RIG_POWER_STANDBY
Definition: rig.h:711
@ RIG_POWER_OFF
Definition: rig.h:709
@ RIG_POWER_ON
Definition: rig.h:710
@ RIG_ENIMPL
Definition: rig.h:193
@ RIG_ECONF
Definition: rig.h:191
@ RIG_ELIMIT
Definition: rig.h:210
@ RIG_ENAVAIL
Definition: rig.h:200
@ RIG_OK
Definition: rig.h:189
@ RIG_EPROTO
Definition: rig.h:197
@ RIG_EINTERNAL
Definition: rig.h:196
@ RIG_EDOM
Definition: rig.h:206
@ RIG_EIO
Definition: rig.h:195
@ RIG_EVFO
Definition: rig.h:205
@ RIG_ETIMEOUT
Definition: rig.h:194
@ RIG_ENOMEM
Definition: rig.h:192
@ RIG_EARG
Definition: rig.h:204
@ RIG_EPOWER
Definition: rig.h:209
@ RIG_EACCESS
Definition: rig.h:211
@ RIG_ERJCTED
Definition: rig.h:198
@ RIG_ESECURITY
Definition: rig.h:208
@ RIG_BUSERROR
Definition: rig.h:202
@ RIG_BUSBUSY
Definition: rig.h:203
@ RIG_EDEPRECATED
Definition: rig.h:207
@ RIG_ENTARGET
Definition: rig.h:201
@ RIG_EINVAL
Definition: rig.h:190
@ RIG_ETRUNC
Definition: rig.h:199
@ RIG_CONF_STRING
Definition: rig.h:883
@ RIG_CONF_BUTTON
Definition: rig.h:887
@ RIG_CONF_CHECKBUTTON
Definition: rig.h:886
@ RIG_CONF_BINARY
Definition: rig.h:888
@ RIG_CONF_COMBO
Definition: rig.h:884
@ RIG_CONF_INT
Definition: rig.h:889
@ RIG_CONF_NUMERIC
Definition: rig.h:885
@ RIG_SCAN_DELTA
Definition: rig.h:849
@ RIG_SCAN_PLT
Definition: rig.h:851
@ RIG_SCAN_PROG
Definition: rig.h:848
@ RIG_SCAN_MEM
Definition: rig.h:845
@ RIG_SCAN_NONE
Definition: rig.h:844
@ RIG_SCAN_VFO
Definition: rig.h:850
@ RIG_SCAN_PRIO
Definition: rig.h:847
@ RIG_SCAN_SLCT
Definition: rig.h:846
@ RIG_SCAN_STOP
Definition: rig.h:852
@ RIG_COOKIE_RENEW
Definition: rig.h:1172
@ RIG_COOKIE_RELEASE
Definition: rig.h:1171
@ RIG_COOKIE_GET
Definition: rig.h:1170
@ RIG_PTT_OFF
Definition: rig.h:680
@ RIG_PTT_ON_DATA
Definition: rig.h:683
@ RIG_PTT_ON_MIC
Definition: rig.h:682
@ RIG_PTT_ON
Definition: rig.h:681
@ RIG_OP_CPY
Definition: rig.h:752
@ RIG_OP_DOWN
Definition: rig.h:758
@ RIG_OP_TO_VFO
Definition: rig.h:755
@ RIG_OP_TUNE
Definition: rig.h:763
@ RIG_OP_FROM_VFO
Definition: rig.h:754
@ RIG_OP_MCL
Definition: rig.h:756
@ RIG_OP_RIGHT
Definition: rig.h:762
@ RIG_OP_UP
Definition: rig.h:757
@ RIG_OP_TOGGLE
Definition: rig.h:764
@ RIG_OP_NONE
Definition: rig.h:751
@ RIG_OP_BAND_UP
Definition: rig.h:759
@ RIG_OP_BAND_DOWN
Definition: rig.h:760
@ RIG_OP_LEFT
Definition: rig.h:761
@ RIG_OP_XCHG
Definition: rig.h:753
@ RIG_PORT_PACKET
Definition: rig.h:315
@ RIG_PORT_UDP_NETWORK
Definition: rig.h:321
@ RIG_PORT_NONE
Definition: rig.h:311
@ RIG_PORT_CM108
Definition: rig.h:322
@ RIG_PORT_GPIO
Definition: rig.h:323
@ RIG_PORT_ULTRA
Definition: rig.h:317
@ RIG_PORT_GPION
Definition: rig.h:324
@ RIG_PORT_SERIAL
Definition: rig.h:312
@ RIG_PORT_PARALLEL
Definition: rig.h:319
@ RIG_PORT_NETWORK
Definition: rig.h:313
@ RIG_PORT_DEVICE
Definition: rig.h:314
@ RIG_PORT_RPC
Definition: rig.h:318
@ RIG_PORT_DTMF
Definition: rig.h:316
@ RIG_PORT_USB
Definition: rig.h:320
@ RIG_HANDSHAKE_HARDWARE
Definition: rig.h:346
@ RIG_HANDSHAKE_NONE
Definition: rig.h:344
@ RIG_HANDSHAKE_XONXOFF
Definition: rig.h:345
@ RIG_AGC_NONE
Definition: rig.h:391
@ RIG_AGC_ON
Definition: rig.h:390
@ RIG_AGC_USER
Definition: rig.h:386
@ RIG_DCD_SERIAL_CTS
Definition: rig.h:667
@ RIG_DCD_PARALLEL
Definition: rig.h:669
@ RIG_DCD_CM108
Definition: rig.h:670
@ RIG_DCD_RIG
Definition: rig.h:665
@ RIG_DCD_GPION
Definition: rig.h:672
@ RIG_DCD_NONE
Definition: rig.h:664
@ RIG_DCD_SERIAL_DSR
Definition: rig.h:666
@ RIG_DCD_GPIO
Definition: rig.h:671
@ RIG_DCD_SERIAL_CAR
Definition: rig.h:668
@ RIG_DEBUG_ERR
Definition: rig.h:244
@ RIG_DEBUG_BUG
Definition: rig.h:243
@ RIG_DEBUG_WARN
Definition: rig.h:245
@ RIG_DEBUG_TRACE
Definition: rig.h:247
@ RIG_DEBUG_VERBOSE
Definition: rig.h:246
@ RIG_DEBUG_CACHE
Definition: rig.h:248
@ RIG_DEBUG_NONE
Definition: rig.h:242
@ RIG_BANDSELECT_600M
Definition: rig.h:797
@ RIG_BANDSELECT_1_25M
Definition: rig.h:815
@ RIG_BANDSELECT_GEN
Definition: rig.h:810
@ RIG_BANDSELECT_17M
Definition: rig.h:804
@ RIG_BANDSELECT_6M
Definition: rig.h:808
@ RIG_BANDSELECT_9CM
Definition: rig.h:820
@ RIG_BANDSELECT_160M
Definition: rig.h:798
@ RIG_BANDSELECT_AIR
Definition: rig.h:812
@ RIG_BANDSELECT_20M
Definition: rig.h:803
@ RIG_BANDSELECT_MW
Definition: rig.h:811
@ RIG_BANDSELECT_2200M
Definition: rig.h:796
@ RIG_BANDSELECT_23CM
Definition: rig.h:818
@ RIG_BANDSELECT_UNUSED
Definition: rig.h:795
@ RIG_BANDSELECT_33CM
Definition: rig.h:817
@ RIG_BANDSELECT_60M
Definition: rig.h:800
@ RIG_BANDSELECT_3CM
Definition: rig.h:822
@ RIG_BANDSELECT_4M
Definition: rig.h:813
@ RIG_BANDSELECT_12M
Definition: rig.h:806
@ RIG_BANDSELECT_WFM
Definition: rig.h:809
@ RIG_BANDSELECT_5CM
Definition: rig.h:821
@ RIG_BANDSELECT_15M
Definition: rig.h:805
@ RIG_BANDSELECT_30M
Definition: rig.h:802
@ RIG_BANDSELECT_70CM
Definition: rig.h:816
@ RIG_BANDSELECT_40M
Definition: rig.h:801
@ RIG_BANDSELECT_80M
Definition: rig.h:799
@ RIG_BANDSELECT_13CM
Definition: rig.h:819
@ RIG_BANDSELECT_2M
Definition: rig.h:814
@ RIG_BANDSELECT_10M
Definition: rig.h:807
@ RIG_RESET_MCALL
Definition: rig.h:724
@ RIG_RESET_MASTER
Definition: rig.h:725
@ RIG_RESET_NONE
Definition: rig.h:721
@ RIG_RESET_VFO
Definition: rig.h:723
@ RIG_RESET_SOFT
Definition: rig.h:722
@ RIG_STATUS_STABLE
Definition: rig.h:419
@ RIG_STATUS_BUGGY
Definition: rig.h:420
@ RIG_STATUS_UNTESTED
Definition: rig.h:417
@ RIG_STATUS_BETA
Definition: rig.h:418
@ RIG_STATUS_ALPHA
Definition: rig.h:416
@ RIG_SPECTRUM_MODE_CENTER_SCROLL
Definition: rig.h:1822
@ RIG_SPECTRUM_MODE_FIXED_SCROLL
Definition: rig.h:1823
@ RIG_SPECTRUM_MODE_FIXED
Definition: rig.h:1821
@ RIG_SPECTRUM_MODE_CENTER
Definition: rig.h:1820
@ RIG_MTYPE_VOICE
Definition: rig.h:1676
@ RIG_MTYPE_PRIO
Definition: rig.h:1675
@ RIG_MTYPE_EDGE
Definition: rig.h:1670
@ RIG_MTYPE_MEM
Definition: rig.h:1669
@ RIG_MTYPE_CALL
Definition: rig.h:1671
@ RIG_MTYPE_SAT
Definition: rig.h:1673
@ RIG_MTYPE_MORSE
Definition: rig.h:1677
@ RIG_MTYPE_MEMOPAD
Definition: rig.h:1672
@ RIG_MTYPE_SPLIT
Definition: rig.h:1678
@ RIG_MTYPE_NONE
Definition: rig.h:1668
@ RIG_MTYPE_BAND
Definition: rig.h:1674
int locator2longlat(double *longitude, double *latitude, const char *locator)
Convert QRA locator (Maidenhead grid square) to Longitude/Latitude.
Definition: locator.c:451
int longlat2locator(double longitude, double latitude, char *locator, int pair_count)
Convert longitude/latitude to QRA locator (Maidenhead grid square).
Definition: locator.c:545
Hamlib rig(radio) model definitions.
uint32_t rig_model_t
Convenience type definition for rig model.
Definition: riglist.h:707
Definition: rig.h:149
Definition: winpthreads.h:124
Calibration table struct for float values.
Definition: rig.h:1774
float val
Definition: rig.h:1778
struct cal_table_float::@4 table[HAMLIB_MAX_CAL_LENGTH]
int size
Definition: rig.h:1775
int raw
Definition: rig.h:1777
Calibration table struct.
Definition: rig.h:1744
int val
Definition: rig.h:1748
struct cal_table::@3 table[HAMLIB_MAX_CAL_LENGTH]
int raw
Definition: rig.h:1747
int size
Definition: rig.h:1745
Memory channel list definition.
Definition: rig.h:1695
int startc
Definition: rig.h:1696
chan_type_t type
Definition: rig.h:1698
channel_cap_t mem_caps
Definition: rig.h:1699
int endc
Definition: rig.h:1697
Channel capability definition.
Definition: rig.h:1619
unsigned tx_vfo
Definition: rig.h:1632
unsigned tx_freq
Definition: rig.h:1627
unsigned mode
Definition: rig.h:1624
unsigned dcs_code
Definition: rig.h:1642
unsigned rit
Definition: rig.h:1636
unsigned dcs_sql
Definition: rig.h:1643
unsigned rptr_offs
Definition: rig.h:1634
unsigned bank_num
Definition: rig.h:1620
setting_t levels
Definition: rig.h:1639
unsigned width
Definition: rig.h:1625
unsigned rptr_shift
Definition: rig.h:1633
unsigned tx_width
Definition: rig.h:1629
unsigned ctcss_sql
Definition: rig.h:1641
unsigned tx_mode
Definition: rig.h:1628
unsigned freq
Definition: rig.h:1623
setting_t funcs
Definition: rig.h:1638
unsigned ctcss_tone
Definition: rig.h:1640
unsigned tag
Definition: rig.h:1648
unsigned ext_levels
Definition: rig.h:1647
unsigned vfo
Definition: rig.h:1621
unsigned ant
Definition: rig.h:1622
unsigned split
Definition: rig.h:1631
unsigned scan_group
Definition: rig.h:1644
unsigned flags
Definition: rig.h:1645
unsigned tuning_step
Definition: rig.h:1635
unsigned xit
Definition: rig.h:1637
unsigned channel_desc
Definition: rig.h:1646
Channel structure.
Definition: rig.h:1574
shortfreq_t tuning_step
Definition: rig.h:1592
rmode_t mode
Definition: rig.h:1580
tone_t ctcss_tone
Definition: rig.h:1597
pbwidth_t tx_width
Definition: rig.h:1585
vfo_t vfo
Definition: rig.h:1577
value_t levels[64]
Definition: rig.h:1596
shortfreq_t rptr_offs
Definition: rig.h:1591
vfo_t tx_vfo
Definition: rig.h:1588
tone_t dcs_code
Definition: rig.h:1599
setting_t funcs
Definition: rig.h:1595
struct ext_list * ext_levels
Definition: rig.h:1604
tone_t ctcss_sql
Definition: rig.h:1598
shortfreq_t xit
Definition: rig.h:1594
int bank_num
Definition: rig.h:1576
pbwidth_t width
Definition: rig.h:1581
freq_t freq
Definition: rig.h:1579
char tag[32]
Definition: rig.h:1606
rptr_shift_t rptr_shift
Definition: rig.h:1590
shortfreq_t rit
Definition: rig.h:1593
char channel_desc[HAMLIB_MAXCHANDESC]
Definition: rig.h:1603
rmode_t tx_mode
Definition: rig.h:1584
split_t split
Definition: rig.h:1587
freq_t tx_freq
Definition: rig.h:1583
ant_t ant
Definition: rig.h:1578
unsigned int flags
Definition: rig.h:1602
int scan_group
Definition: rig.h:1601
int channel_num
Definition: rig.h:1575
tone_t dcs_sql
Definition: rig.h:1600
Configuration parameter structure.
Definition: rig.h:900
const char * combostr[RIG_COMBO_MAX]
Definition: rig.h:914
hamlib_token_t token
Definition: rig.h:901
const char * tooltip
Definition: rig.h:904
struct confparams::@0::@2 c
const char * dflt
Definition: rig.h:905
float min
Definition: rig.h:909
float step
Definition: rig.h:911
const char * label
Definition: rig.h:903
float max
Definition: rig.h:910
const char * name
Definition: rig.h:902
struct confparams::@0::@1 n
enum rig_conf_e type
Definition: rig.h:906
union confparams::@0 u
Definition: rig.h:1877
Definition: rig.h:1870
Extension attribute definition.
Definition: rig.h:1557
hamlib_token_t token
Definition: rig.h:1558
value_t val
Definition: rig.h:1559
Filter definition.
Definition: rig.h:1524
rmode_t modes
Definition: rig.h:1525
pbwidth_t width
Definition: rig.h:1526
Frequency range.
Definition: rig.h:1457
freq_t startf
Definition: rig.h:1458
freq_t endf
Definition: rig.h:1459
int low_power
Definition: rig.h:1461
char * label
Definition: rig.h:1465
ant_t ant
Definition: rig.h:1464
int high_power
Definition: rig.h:1462
vfo_t vfo
Definition: rig.h:1463
rmode_t modes
Definition: rig.h:1460
level/parm granularity definition
Definition: rig.h:1729
value_t max
Definition: rig.h:1731
value_t step
Definition: rig.h:1732
value_t min
Definition: rig.h:1730
Definition: network.c:132
Definition: network.c:146
Multicast data items the are unique per rig instantiation This is meant for internal Hamlib use only.
Definition: rig.h:2669
Rig cache data.
Definition: rig.h:2589
Callback functions and args for rig event.
Definition: rig.h:3067
rig_ptr_t mode_arg
Definition: rig.h:3071
ptt_cb_t ptt_event
Definition: rig.h:3074
vfo_cb_t vfo_event
Definition: rig.h:3072
spectrum_cb_t spectrum_event
Definition: rig.h:3080
mode_cb_t mode_event
Definition: rig.h:3070
rig_ptr_t freq_arg
Definition: rig.h:3069
rig_ptr_t spectrum_arg
Definition: rig.h:3081
rig_ptr_t ptt_arg
Definition: rig.h:3075
rig_ptr_t dcd_arg
Definition: rig.h:3077
dcd_cb_t dcd_event
Definition: rig.h:3076
rig_ptr_t pltune_arg
Definition: rig.h:3079
pltune_cb_t pltune
Definition: rig.h:3078
rig_ptr_t vfo_arg
Definition: rig.h:3073
freq_cb_t freq_event
Definition: rig.h:3068
Spectrum scope averaging modes.
Definition: rig.h:1830
Represents a single line of rig spectrum scope FFT data.
Definition: rig.h:1847
size_t spectrum_data_length
Definition: rig.h:1863
freq_t low_edge_freq
Definition: rig.h:1860
int data_level_min
Definition: rig.h:1850
int id
Definition: rig.h:1848
enum rig_spectrum_mode_e spectrum_mode
Definition: rig.h:1855
double signal_strength_max
Definition: rig.h:1853
freq_t center_freq
Definition: rig.h:1857
freq_t span_freq
Definition: rig.h:1858
double signal_strength_min
Definition: rig.h:1852
unsigned char * spectrum_data
Definition: rig.h:1864
int data_level_max
Definition: rig.h:1851
freq_t high_edge_freq
Definition: rig.h:1861
Spectrum scope.
Definition: rig.h:1810
Deprecated Rig state containing live data and customized fields. Due to DLL problems this remains in-...
Definition: rig.h:2904
int comm_state
Definition: rig.h:2959
vfo_t current_vfo
Definition: rig.h:2957
shortfreq_t max_xit
Definition: rig.h:2933
freq_t current_freq
Definition: rig.h:2965
int auto_power_off
Definition: rig.h:2985
int auto_power_on
Definition: rig.h:2983
hamlib_port_t rigport
Definition: rig.h:3008
int use_cached_mode
Definition: rig.h:3015
hamlib_port_t pttport
Definition: rig.h:3009
hamlib_port_t dcdport
Definition: rig.h:3010
struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ]
Definition: rig.h:2924
freq_t offset_vfob
Definition: rig.h:3023
hamlib_port_t_deprecated pttport_deprecated
Definition: rig.h:2915
hamlib_port_t_deprecated dcdport_deprecated
Definition: rig.h:2916
int lock_mode
Definition: rig.h:3018
freq_t lo_freq
Definition: rig.h:2976
int async_data_enabled
Definition: rig.h:2963
gran_t parm_gran[64]
Definition: rig.h:2949
int attenuator[HAMLIB_MAXDBLSTSIZ]
Definition: rig.h:2939
setting_t has_set_func
Definition: rig.h:2942
rig_ptr_t obj
Definition: rig.h:2961
powerstat_t powerstat
Definition: rig.h:3019
int depth
Definition: rig.h:3017
int ptt_share
Definition: rig.h:2990
freq_range_t tx_range_list[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2922
int vfo_opt
Definition: rig.h:2982
unsigned char disable_yaesu_bandselect
Definition: rig.h:2994
struct filter_list filters[HAMLIB_FLTLSTSIZ]
Definition: rig.h:2926
int twiddle_rit
Definition: rig.h:2995
pbwidth_t current_width
Definition: rig.h:2968
int use_cached_freq
Definition: rig.h:3014
int transaction_active
Definition: rig.h:2956
rig_ptr_t priv
Definition: rig.h:2960
rmode_t current_mode
Definition: rig.h:2966
int poll_interval
Definition: rig.h:2964
setting_t has_get_func
Definition: rig.h:2941
double vfo_comp
Definition: rig.h:2918
int power_min
Definition: rig.h:2992
int twiddle_state
Definition: rig.h:2996
shortfreq_t max_ifshift
Definition: rig.h:2934
struct multicast_s * multicast
Definition: rig.h:3024
setting_t has_set_parm
Definition: rig.h:2946
setting_t has_set_level
Definition: rig.h:2944
time_t twiddle_time
Definition: rig.h:2977
freq_t offset_vfoa
Definition: rig.h:3022
char client_version[32]
Definition: rig.h:3021
int deprecated_itu_region
Definition: rig.h:2920
setting_t has_get_parm
Definition: rig.h:2945
int auto_disable_screensaver
Definition: rig.h:2987
vfo_t rx_vfo
Definition: rig.h:2997
shortfreq_t max_rit
Definition: rig.h:2932
int preamp[HAMLIB_MAXDBLSTSIZ]
Definition: rig.h:2938
int uplink
Definition: rig.h:2980
ann_t announces
Definition: rig.h:2936
setting_t has_get_level
Definition: rig.h:2943
vfo_t tx_vfo
Definition: rig.h:2969
int vfo_list
Definition: rig.h:2958
char * tuner_control_pathname
Definition: rig.h:3020
hamlib_port_t_deprecated rigport_deprecated
Definition: rig.h:2914
int twiddle_timeout
Definition: rig.h:2978
rmode_t mode_list
Definition: rig.h:2970
cal_table_t str_cal
Definition: rig.h:2928
int power_max
Definition: rig.h:2993
int use_cached_ptt
Definition: rig.h:3016
int power_now
Definition: rig.h:2991
freq_range_t rx_range_list[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2921
int transmit
Definition: rig.h:2973
gran_t level_gran[64]
Definition: rig.h:2948
Rig state containing live data and customized fields.
Definition: rig.h:2706
int auto_power_on
Definition: rig.h:2784
int bank_qty
Definition: rig.h:2858
int transaction_active
Definition: rig.h:2757
rig_comm_status_t comm_status
Definition: rig.h:2885
int serial_data_bits
Definition: rig.h:2841
int attenuator[HAMLIB_MAXDBLSTSIZ]
Definition: rig.h:2740
int vfo_opt
Definition: rig.h:2783
int twiddle_rit
Definition: rig.h:2796
setting_t has_set_parm
Definition: rig.h:2747
int dual_watch
Definition: rig.h:2887
rmode_t mode_list
Definition: rig.h:2771
int async_data_enabled
Definition: rig.h:2764
shortfreq_t max_rit
Definition: rig.h:2733
int timeout
Definition: rig.h:2847
freq_t lo_freq
Definition: rig.h:2777
int power_max
Definition: rig.h:2794
gran_t parm_gran[64]
Definition: rig.h:2750
freq_range_t rx_range_list3[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2864
struct rig_spectrum_scope spectrum_scopes[HAMLIB_MAX_SPECTRUM_SCOPES]
Definition: rig.h:2870
struct rig_spectrum_avg_mode spectrum_avg_modes[HAMLIB_MAX_SPECTRUM_AVG_MODES]
Definition: rig.h:2873
int write_delay
Definition: rig.h:2845
freq_range_t rx_range_list1[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2860
freq_range_t rx_range_list[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2722
hamlib_port_t_deprecated rigport_deprecated
Definition: rig.h:2715
freq_range_t tx_range_list3[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2865
int post_write_delay
Definition: rig.h:2846
int transceive
Definition: rig.h:2857
int retry
Definition: rig.h:2848
int use_cached_ptt
Definition: rig.h:2817
freq_range_t tx_range_list5[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2869
vfo_t rx_vfo
Definition: rig.h:2798
int agc_level_count
Definition: rig.h:2851
rmode_t current_mode
Definition: rig.h:2767
int freq_skip
Definition: rig.h:2890
freq_range_t tx_range_list2[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2863
const char * copyright
Definition: rig.h:2833
setting_t has_set_func
Definition: rig.h:2743
int uplink
Definition: rig.h:2781
int use_cached_freq
Definition: rig.h:2815
int doppler
Definition: rig.h:2878
tone_t * ctcss_list
Definition: rig.h:2853
tone_t * dcs_list
Definition: rig.h:2854
rig_ptr_t obj
Definition: rig.h:2762
int twiddle_state
Definition: rig.h:2797
struct filter_list filters[HAMLIB_FLTLSTSIZ]
Definition: rig.h:2727
pbwidth_t current_width
Definition: rig.h:2769
freq_t spectrum_spans[HAMLIB_MAX_SPECTRUM_SPANS]
Definition: rig.h:2872
char client_version[32]
Definition: rig.h:2822
int ptt_share
Definition: rig.h:2791
rig_ptr_t priv
Definition: rig.h:2761
int lock_mode
Definition: rig.h:2819
freq_range_t tx_range_list[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2723
freq_range_t rx_range_list2[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2862
int use_cached_mode
Definition: rig.h:2816
struct multicast_s * multicast
Definition: rig.h:2825
freq_t current_freq
Definition: rig.h:2766
hamlib_port_t dcdport
Definition: rig.h:2811
enum serial_handshake_e serial_handshake
Definition: rig.h:2844
freq_t offset_vfoa
Definition: rig.h:2823
rig_port_t port_type
Definition: rig.h:2838
int depth
Definition: rig.h:2818
const char * mfg_name
Definition: rig.h:2831
powerstat_t powerstat
Definition: rig.h:2820
char * multicast_cmd_addr
Definition: rig.h:2881
freq_t offset_vfob
Definition: rig.h:2824
int chan_desc_sz
Definition: rig.h:2859
time_t twiddle_time
Definition: rig.h:2778
vfo_t tx_vfo
Definition: rig.h:2770
int deprecated_itu_region
Definition: rig.h:2721
int power_min
Definition: rig.h:2793
double vfo_comp
Definition: rig.h:2719
setting_t has_set_level
Definition: rig.h:2745
hamlib_port_t_deprecated pttport_deprecated
Definition: rig.h:2716
int async_data_supported
Definition: rig.h:2850
shortfreq_t max_xit
Definition: rig.h:2734
int post_ptt_delay
Definition: rig.h:2888
hamlib_port_t rigport
Definition: rig.h:2809
int power_now
Definition: rig.h:2792
freq_range_t rx_range_list4[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2866
enum rig_spectrum_mode_e spectrum_modes[HAMLIB_MAX_SPECTRUM_MODES]
Definition: rig.h:2871
const char * model_name
Definition: rig.h:2830
int twiddle_timeout
Definition: rig.h:2779
int poll_interval
Definition: rig.h:2765
int spectrum_attenuator[HAMLIB_MAXDBLSTSIZ]
Definition: rig.h:2874
int rig_type
Definition: rig.h:2835
unsigned char disable_yaesu_bandselect
Definition: rig.h:2795
int auto_power_off
Definition: rig.h:2786
dcd_type_t dcd_type
Definition: rig.h:2837
int multicast_cmd_port
Definition: rig.h:2882
int serial_rate_min
Definition: rig.h:2839
enum rig_status_e status
Definition: rig.h:2834
enum serial_parity_e serial_parity
Definition: rig.h:2843
setting_t has_get_parm
Definition: rig.h:2746
int preamp[HAMLIB_MAXDBLSTSIZ]
Definition: rig.h:2739
vfo_t current_vfo
Definition: rig.h:2758
freq_range_t rx_range_list5[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2868
enum agc_level_e agc_levels[HAMLIB_MAX_AGC_LEVELS]
Definition: rig.h:2852
hamlib_port_t_deprecated dcdport_deprecated
Definition: rig.h:2717
int auto_disable_screensaver
Definition: rig.h:2788
int comm_state
Definition: rig.h:2760
vfo_op_t vfo_ops
Definition: rig.h:2855
int targetable_vfo
Definition: rig.h:2849
int vfo_list
Definition: rig.h:2759
ptt_type_t ptt_type
Definition: rig.h:2836
setting_t has_get_level
Definition: rig.h:2744
setting_t has_get_func
Definition: rig.h:2742
int transmit
Definition: rig.h:2774
ann_t announces
Definition: rig.h:2737
int serial_rate_max
Definition: rig.h:2840
cal_table_t str_cal
Definition: rig.h:2729
rig_model_t rig_model
Definition: rig.h:2829
const char * version
Definition: rig.h:2832
scan_t scan_ops
Definition: rig.h:2856
shortfreq_t max_ifshift
Definition: rig.h:2735
char * multicast_data_addr
Definition: rig.h:2879
int multicast_data_port
Definition: rig.h:2880
gran_t level_gran[64]
Definition: rig.h:2749
freq_range_t tx_range_list4[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2867
hamlib_port_t pttport
Definition: rig.h:2810
int serial_stop_bits
Definition: rig.h:2842
freq_range_t tx_range_list1[HAMLIB_FRQRANGESIZ]
Definition: rig.h:2861
struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ]
Definition: rig.h:2725
char * tuner_control_pathname
Definition: rig.h:2821
The Rig structure.
Definition: rig.h:3095
struct rig_callbacks callbacks
Definition: rig.h:3099
struct rig_state_deprecated state_deprecated
Definition: rig.h:3098
struct rig_state state
Definition: rig.h:3101
struct rig_caps * caps
Definition: rig.h:3096
Tuning step definition.
Definition: rig.h:1489
rmode_t modes
Definition: rig.h:1490
shortfreq_t ts
Definition: rig.h:1491
Universal approach for passing values.
Definition: rig.h:1025
unsigned int u
Definition: rig.h:1027
char * s
Definition: rig.h:1029
float f
Definition: rig.h:1028
const char * cs
Definition: rig.h:1030
signed int i
Definition: rig.h:1026