Hamlib  3.2
rig.h
Go to the documentation of this file.
1 /*
2  * Hamlib Interface - API header
3  * Copyright (c) 2000-2003 by Frank Singleton
4  * Copyright (c) 2000-2012 by Stephane Fillod
5  *
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  *
21  */
22 
23 
24 #ifndef _RIG_H
25 #define _RIG_H 1
26 
27 #include <stdio.h>
28 #include <stdarg.h>
29 
30 /* Rig list is in a separate file so as not to mess up w/ this one */
31 #include <hamlib/riglist.h>
32 
46 /* __BEGIN_DECLS should be used at the beginning of your declarations,
47  * so that C++ compilers don't mangle their names. Use __END_DECLS at
48  * the end of C declarations. */
49 #undef __BEGIN_DECLS
50 #undef __END_DECLS
51 #ifdef __cplusplus
52 # define __BEGIN_DECLS extern "C" {
53 # define __END_DECLS }
54 #else
55 # define __BEGIN_DECLS /* empty */
56 # define __END_DECLS /* empty */
57 #endif
58 
59 /* HAMLIB_PARAMS is a macro used to wrap function prototypes, so that compilers
60  * that don't understand ANSI C prototypes still work, and ANSI C
61  * compilers can issue warnings about type mismatches. */
62 #undef HAMLIB_PARAMS
63 #if defined (__STDC__) \
64  || defined (_AIX) \
65  || (defined (__mips) && defined (_SYSTYPE_SVR4)) \
66  || defined(__CYGWIN__) \
67  || defined(_WIN32) \
68  || defined(__cplusplus)
69 # define HAMLIB_PARAMS(protos) protos
70 # define rig_ptr_t void *
71 #else
72 # define HAMLIB_PARAMS(protos) ()
73 # define rig_ptr_t char *
74 #endif
75 
76 #include <hamlib/rig_dll.h>
77 
78 
79 __BEGIN_DECLS
80 
81 extern HAMLIB_EXPORT_VAR(const char) hamlib_version[];
82 extern HAMLIB_EXPORT_VAR(const char) hamlib_copyright[];
83 extern HAMLIB_EXPORT_VAR(const char *) hamlib_version2;
84 extern HAMLIB_EXPORT_VAR(const char *) hamlib_copyright2;
85 
93  RIG_OK = 0,
111 };
112 
116 #define NETRIGCTL_RET "RPRT "
117 
118 
133 };
134 
135 
136 /* --------------- Rig capabilities -----------------*/
137 
138 /* Forward struct references */
139 
140 struct rig;
141 struct rig_state;
142 
146 typedef struct rig RIG;
147 
148 #define RIGNAMSIZ 30
149 #define RIGVERSIZ 8
150 #define FILPATHLEN 100
151 #define FRQRANGESIZ 30
152 #define MAXCHANDESC 30 /* describe channel eg: "WWV 5Mhz" */
153 #define TSLSTSIZ 20 /* max tuning step list size, zero ended */
154 #define FLTLSTSIZ 60 /* max mode/filter list size, zero ended */
155 #define MAXDBLSTSIZ 8 /* max preamp/att levels supported, zero ended */
156 #define CHANLSTSIZ 16 /* max mem_list size, zero ended */
157 #define MAX_CAL_LENGTH 32 /* max calibration plots in cal_table_t */
158 
159 
170 typedef unsigned int tone_t;
171 
172 
176 typedef enum rig_port_e {
191 } rig_port_t;
192 
193 
203 };
204 
205 
213 };
214 
215 
223 };
224 
225 
229 typedef enum {
230  RIG_FLAG_RECEIVER = (1 << 1),
231  RIG_FLAG_TRANSMITTER = (1 << 2),
232  RIG_FLAG_SCANNER = (1 << 3),
233  RIG_FLAG_MOBILE = (1 << 4),
234  RIG_FLAG_HANDHELD = (1 << 5),
235  RIG_FLAG_COMPUTER = (1 << 6),
236  RIG_FLAG_TRUNKING = (1 << 7),
237  RIG_FLAG_APRS = (1 << 8),
238  RIG_FLAG_TNC = (1 << 9),
239  RIG_FLAG_DXCLUSTER = (1 << 10),
240  RIG_FLAG_TUNER = (1 << 11)
241 } rig_type_t;
242 
243 #define RIG_FLAG_TRANSCEIVER (RIG_FLAG_RECEIVER|RIG_FLAG_TRANSMITTER)
244 #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)
245 
246 #define RIG_TYPE_OTHER 0
247 #define RIG_TYPE_TRANSCEIVER RIG_FLAG_TRANSCEIVER
248 #define RIG_TYPE_HANDHELD (RIG_FLAG_TRANSCEIVER|RIG_FLAG_HANDHELD)
249 #define RIG_TYPE_MOBILE (RIG_FLAG_TRANSCEIVER|RIG_FLAG_MOBILE)
250 #define RIG_TYPE_RECEIVER RIG_FLAG_RECEIVER
251 #define RIG_TYPE_PCRECEIVER (RIG_FLAG_COMPUTER|RIG_FLAG_RECEIVER)
252 #define RIG_TYPE_SCANNER (RIG_FLAG_SCANNER|RIG_FLAG_RECEIVER)
253 #define RIG_TYPE_TRUNKSCANNER (RIG_TYPE_SCANNER|RIG_FLAG_TRUNKING)
254 #define RIG_TYPE_COMPUTER (RIG_FLAG_TRANSCEIVER|RIG_FLAG_COMPUTER)
255 #define RIG_TYPE_TUNER RIG_FLAG_TUNER
256 
257 
267  /* RIG_STATUS_NEW * *!< Initial release of code
268  * !! Use of RIG_STATUS_NEW is deprecated. Do not use it anymore */
269 };
270 
275 #define RIG_STATUS_NEW RIG_STATUS_UNTESTED
276 
277 
281 typedef enum {
285 } rptr_shift_t;
286 
287 
291 typedef enum {
294 } split_t;
295 
296 
302 typedef double freq_t;
303 
307 #define PRIfreq "f"
308 
312 #define SCNfreq "lf"
313 #define FREQFMT SCNfreq
314 
315 
321 typedef signed long shortfreq_t;
322 
323 #define Hz(f) ((freq_t)(f))
324 #define kHz(f) ((freq_t)((f)*(freq_t)1000))
325 #define MHz(f) ((freq_t)((f)*(freq_t)1000000))
326 #define GHz(f) ((freq_t)((f)*(freq_t)1000000000))
327 
328 #define s_Hz(f) ((shortfreq_t)(f))
329 #define s_kHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000))
330 #define s_MHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000))
331 #define s_GHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000000))
332 
333 #define RIG_FREQ_NONE Hz(0)
334 
335 
350 typedef int vfo_t;
351 
353 #define RIG_VFO_NONE 0
354 
355 #define RIG_VFO_TX_FLAG (1<<30)
356 
358 #define RIG_VFO_CURR (1<<29)
359 
361 #define RIG_VFO_MEM (1<<28)
362 
364 #define RIG_VFO_VFO (1<<27)
365 
366 #define RIG_VFO_TX_VFO(v) ((v)|RIG_VFO_TX_FLAG)
367 
369 #define RIG_VFO_TX RIG_VFO_TX_VFO(RIG_VFO_CURR)
370 
372 #define RIG_VFO_RX RIG_VFO_CURR
373 
375 #define RIG_VFO_MAIN (1<<26)
376 
378 #define RIG_VFO_SUB (1<<25)
379 
380 #define RIG_VFO_N(n) (1<<(n))
381 
383 #define RIG_VFO_A RIG_VFO_N(0)
384 
385 #define RIG_VFO_B RIG_VFO_N(1)
386 
387 #define RIG_VFO_C RIG_VFO_N(2)
388 
389 
390 /*
391  * targetable bitfields, for internal use.
392  * RIG_TARGETABLE_PURE means a pure targetable radio on every command
393  */
394 #define RIG_TARGETABLE_NONE 0
395 #define RIG_TARGETABLE_FREQ (1<<0)
396 #define RIG_TARGETABLE_MODE (1<<1)
397 #define RIG_TARGETABLE_PURE (1<<2)
398 #define RIG_TARGETABLE_TONE (1<<3)
399 #define RIG_TARGETABLE_FUNC (1<<4)
400 #define RIG_TARGETABLE_ALL 0x7fffffff
401 
402 
403 #define RIG_PASSBAND_NORMAL s_Hz(0)
404 #define RIG_PASSBAND_NOCHANGE s_Hz(-1)
405 
410 typedef shortfreq_t pbwidth_t;
411 
412 
416 typedef enum dcd_e {
419 } dcd_t;
420 
421 
427 typedef enum {
435 } dcd_type_t;
436 
437 
441 typedef enum {
446 } ptt_t;
447 
448 
454 typedef enum {
464 } ptt_type_t;
465 
466 
470 typedef enum {
472  RIG_POWER_ON = (1 << 0),
473  RIG_POWER_STANDBY = (1 << 1)
474 } powerstat_t;
475 
476 
480 typedef enum {
482  RIG_RESET_SOFT = (1 << 0),
483  RIG_RESET_VFO = (1 << 1),
484  RIG_RESET_MCALL = (1 << 2),
485  RIG_RESET_MASTER = (1 << 3)
486 } reset_t;
487 
488 
504 typedef enum {
506  RIG_OP_CPY = (1 << 0),
507  RIG_OP_XCHG = (1 << 1),
508  RIG_OP_FROM_VFO = (1 << 2),
509  RIG_OP_TO_VFO = (1 << 3),
510  RIG_OP_MCL = (1 << 4),
511  RIG_OP_UP = (1 << 5),
512  RIG_OP_DOWN = (1 << 6),
513  RIG_OP_BAND_UP = (1 << 7),
514  RIG_OP_BAND_DOWN = (1 << 8),
515  RIG_OP_LEFT = (1 << 9),
516  RIG_OP_RIGHT = (1 << 10),
517  RIG_OP_TUNE = (1 << 11),
518  RIG_OP_TOGGLE = (1 << 12)
519 } vfo_op_t;
520 
521 
530 typedef enum {
532  RIG_SCAN_MEM = (1 << 0),
533  RIG_SCAN_SLCT = (1 << 1),
534  RIG_SCAN_PRIO = (1 << 2),
535  RIG_SCAN_PROG = (1 << 3),
536  RIG_SCAN_DELTA = (1 << 4),
537  RIG_SCAN_VFO = (1 << 5),
538  RIG_SCAN_PLT = (1 << 6),
539  RIG_SCAN_STOP = (1 << 7)
540 } scan_t;
541 
542 
546 typedef long token_t;
547 
548 
549 #define RIG_CONF_END 0
550 
551 
564 /* strongly inspired from soundmodem. Thanks Thomas! */
571 };
572 
573 
574 #define RIG_COMBO_MAX 8
575 
579 struct confparams {
580  token_t token;
581  const char *name;
582  const char *label;
583  const char *tooltip;
584  const char *dflt;
586  union {
587  struct {
588  float min;
589  float max;
590  float step;
591  } n;
592  struct {
593  const char *combostr[RIG_COMBO_MAX];
594  } c;
595  } u;
596 };
597 
598 
604 typedef enum {
607  RIG_ANN_FREQ = (1 << 0),
608  RIG_ANN_RXMODE = (1 << 1),
609  RIG_ANN_CW = (1 << 2),
610  RIG_ANN_ENG = (1 << 3),
611  RIG_ANN_JAP = (1 << 4)
612 } ann_t;
613 
614 
618 typedef int ant_t;
619 
620 #define RIG_ANT_NONE 0
621 #define RIG_ANT_N(n) ((ant_t)1<<(n))
622 #define RIG_ANT_1 RIG_ANT_N(0)
623 #define RIG_ANT_2 RIG_ANT_N(1)
624 #define RIG_ANT_3 RIG_ANT_N(2)
625 #define RIG_ANT_4 RIG_ANT_N(3)
626 #define RIG_ANT_5 RIG_ANT_N(4)
627 
628 
632 /* TODO: kill me, and replace by real AGC delay */
634  RIG_AGC_OFF = 0,
635  RIG_AGC_SUPERFAST,
636  RIG_AGC_FAST,
637  RIG_AGC_SLOW,
639  RIG_AGC_MEDIUM,
640  RIG_AGC_AUTO
641 };
642 
643 
648  RIG_METER_NONE = 0, /*< No display meter */
649  RIG_METER_SWR = (1 << 0), /*< Stationary Wave Ratio */
650  RIG_METER_COMP = (1 << 1), /*< Compression level */
651  RIG_METER_ALC = (1 << 2), /*< ALC */
652  RIG_METER_IC = (1 << 3), /*< IC */
653  RIG_METER_DB = (1 << 4), /*< DB */
654  RIG_METER_PO = (1 << 5), /*< Power Out */
655  RIG_METER_VDD = (1 << 6) /*< Final Amp Voltage */
656 };
657 
658 
664 typedef union {
665  signed int i;
666  float f;
667  char *s;
668  const char *cs;
669 } value_t;
670 
671 
682  RIG_LEVEL_PREAMP = (1 << 0),
683  RIG_LEVEL_ATT = (1 << 1),
684  RIG_LEVEL_VOX = (1 << 2),
685  RIG_LEVEL_AF = (1 << 3),
686  RIG_LEVEL_RF = (1 << 4),
687  RIG_LEVEL_SQL = (1 << 5),
688  RIG_LEVEL_IF = (1 << 6),
689  RIG_LEVEL_APF = (1 << 7),
690  RIG_LEVEL_NR = (1 << 8),
691  RIG_LEVEL_PBT_IN = (1 << 9),
692  RIG_LEVEL_PBT_OUT = (1 << 10),
693  RIG_LEVEL_CWPITCH = (1 << 11),
694  RIG_LEVEL_RFPOWER = (1 << 12),
695  RIG_LEVEL_MICGAIN = (1 << 13),
696  RIG_LEVEL_KEYSPD = (1 << 14),
697  RIG_LEVEL_NOTCHF = (1 << 15),
698  RIG_LEVEL_COMP = (1 << 16),
699  RIG_LEVEL_AGC = (1 << 17),
700  RIG_LEVEL_BKINDL = (1 << 18),
701  RIG_LEVEL_BALANCE = (1 << 19),
702  RIG_LEVEL_METER = (1 << 20),
703  RIG_LEVEL_VOXGAIN = (1 << 21),
705  RIG_LEVEL_ANTIVOX = (1 << 22),
706  RIG_LEVEL_SLOPE_LOW = (1 << 23),
707  RIG_LEVEL_SLOPE_HIGH = (1 << 24),
708  RIG_LEVEL_BKIN_DLYMS = (1 << 25),
711  RIG_LEVEL_RAWSTR = (1 << 26),
712  RIG_LEVEL_SQLSTAT = (1 << 27),
713  RIG_LEVEL_SWR = (1 << 28),
714  RIG_LEVEL_ALC = (1 << 29),
715  RIG_LEVEL_STRENGTH = (1 << 30)
716  /* RIG_LEVEL_BWC = (1<<31) */
717 };
718 
719 #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)
720 
721 #define RIG_LEVEL_READONLY_LIST (RIG_LEVEL_SQLSTAT|RIG_LEVEL_SWR|RIG_LEVEL_ALC|RIG_LEVEL_STRENGTH|RIG_LEVEL_RAWSTR)
722 
723 #define RIG_LEVEL_IS_FLOAT(l) ((l)&RIG_LEVEL_FLOAT_LIST)
724 #define RIG_LEVEL_SET(l) ((l)&~RIG_LEVEL_READONLY_LIST)
725 
726 
737  RIG_PARM_ANN = (1 << 0),
738  RIG_PARM_APO = (1 << 1),
739  RIG_PARM_BACKLIGHT = (1 << 2),
740  RIG_PARM_BEEP = (1 << 4),
741  RIG_PARM_TIME = (1 << 5),
742  RIG_PARM_BAT = (1 << 6),
743  RIG_PARM_KEYLIGHT = (1 << 7)
744 };
745 
746 #define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT)
747 #define RIG_PARM_READONLY_LIST (RIG_PARM_BAT)
748 
749 #define RIG_PARM_IS_FLOAT(l) ((l)&RIG_PARM_FLOAT_LIST)
750 #define RIG_PARM_SET(l) ((l)&~RIG_PARM_READONLY_LIST)
751 
752 
753 #define RIG_SETTING_MAX 32
754 
761 typedef unsigned long setting_t;
762 
768 #define RIG_TRN_OFF 0
769 #define RIG_TRN_RIG 1
770 #define RIG_TRN_POLL 2
771 
772 
781 /*
782  * The C standard dictates that an enum constant is a 32 bit signed integer.
783  * Setting a constant's bit 31 created a negative value that on amd64 had the
784  * upper 32 bits set as well when assigned to the misc.c:func_str structure.
785  * This caused misc.c:rig_strfunc() to fail its comparison for RIG_FUNC_XIT
786  * on amd64 (x86_64). To use bit 31 as an unsigned long, preprocessor macros
787  * have been used instead as a 'const unsigned long' which cannot be used to
788  * initialize the func_str.func members. TNX KA6MAL, AC6SL. - N0NB
789  */
790 #define RIG_FUNC_NONE 0
791 #define RIG_FUNC_FAGC (1UL<<0)
792 #define RIG_FUNC_NB (1UL<<1)
793 #define RIG_FUNC_COMP (1UL<<2)
794 #define RIG_FUNC_VOX (1UL<<3)
795 #define RIG_FUNC_TONE (1UL<<4)
796 #define RIG_FUNC_TSQL (1UL<<5)
797 #define RIG_FUNC_SBKIN (1UL<<6)
798 #define RIG_FUNC_FBKIN (1UL<<7)
799 #define RIG_FUNC_ANF (1UL<<8)
800 #define RIG_FUNC_NR (1UL<<9)
801 #define RIG_FUNC_AIP (1UL<<10)
802 #define RIG_FUNC_APF (1UL<<11)
803 #define RIG_FUNC_MON (1UL<<12)
804 #define RIG_FUNC_MN (1UL<<13)
805 #define RIG_FUNC_RF (1UL<<14)
806 #define RIG_FUNC_ARO (1UL<<15)
807 #define RIG_FUNC_LOCK (1UL<<16)
808 #define RIG_FUNC_MUTE (1UL<<17)
809 #define RIG_FUNC_VSC (1UL<<18)
810 #define RIG_FUNC_REV (1UL<<19)
811 #define RIG_FUNC_SQL (1UL<<20)
812 #define RIG_FUNC_ABM (1UL<<21)
813 #define RIG_FUNC_BC (1UL<<22)
814 #define RIG_FUNC_MBC (1UL<<23)
815 #define RIG_FUNC_RIT (1UL<<24)
816 #define RIG_FUNC_AFC (1UL<<25)
817 #define RIG_FUNC_SATMODE (1UL<<26)
818 #define RIG_FUNC_SCOPE (1UL<<27)
819 #define RIG_FUNC_RESUME (1UL<<28)
820 #define RIG_FUNC_TBURST (1UL<<29)
821 #define RIG_FUNC_TUNER (1UL<<30)
822 #define RIG_FUNC_XIT (1UL<<31)
831 #define mW(p) ((int)(p))
832 #define Watts(p) ((int)((p)*1000))
833 #define W(p) Watts(p)
834 #define kW(p) ((int)((p)*1000000L))
835 
836 
845 typedef enum {
847  RIG_MODE_AM = (1 << 0),
848  RIG_MODE_CW = (1 << 1),
849  RIG_MODE_USB = (1 << 2),
850  RIG_MODE_LSB = (1 << 3),
851  RIG_MODE_RTTY = (1 << 4),
852  RIG_MODE_FM = (1 << 5),
853  RIG_MODE_WFM = (1 << 6),
854  RIG_MODE_CWR = (1 << 7),
855  RIG_MODE_RTTYR = (1 << 8),
856  RIG_MODE_AMS = (1 << 9),
857  RIG_MODE_PKTLSB = (1 << 10),
858  RIG_MODE_PKTUSB = (1 << 11),
859  RIG_MODE_PKTFM = (1 << 12),
860  RIG_MODE_ECSSUSB = (1 << 13),
861  RIG_MODE_ECSSLSB = (1 << 14),
862  RIG_MODE_FAX = (1 << 15),
863  RIG_MODE_SAM = (1 << 16),
864  RIG_MODE_SAL = (1 << 17),
865  RIG_MODE_SAH = (1 << 18),
866  RIG_MODE_DSB = (1 << 19),
867  RIG_MODE_FMN = (1 << 21),
869 } rmode_t;
870 
871 
875 #define RIG_MODE_SSB (RIG_MODE_USB|RIG_MODE_LSB)
876 
880 #define RIG_MODE_ECSS (RIG_MODE_ECSSUSB|RIG_MODE_ECSSLSB)
881 
882 
883 #define RIG_DBLST_END 0 /* end marker in a preamp/att level list */
884 #define RIG_IS_DBLST_END(d) ((d)==0)
885 
886 
893 typedef struct freq_range_list {
894  freq_t start;
895  freq_t end;
897  int low_power;
899  vfo_t vfo;
900  ant_t ant;
901 } freq_range_t;
902 
903 #define RIG_FRNG_END {Hz(0),Hz(0),RIG_MODE_NONE,0,0,RIG_VFO_NONE}
904 #define RIG_IS_FRNG_END(r) ((r).start == Hz(0) && (r).end == Hz(0))
905 
906 
907 #define RIG_ITU_REGION1 1
908 #define RIG_ITU_REGION2 2
909 #define RIG_ITU_REGION3 3
910 
911 
930  shortfreq_t ts;
931 };
932 
933 #define RIG_TS_ANY 0
934 #define RIG_TS_END {RIG_MODE_NONE, 0}
935 #define RIG_IS_TS_END(t) ((t).modes == RIG_MODE_NONE && (t).ts == 0)
936 
937 
961 struct filter_list {
963  pbwidth_t width;
964 };
965 
966 #define RIG_FLT_ANY 0
967 #define RIG_FLT_END {RIG_MODE_NONE, 0}
968 #define RIG_IS_FLT_END(f) ((f).modes == RIG_MODE_NONE)
969 
970 
974 #define RIG_CHFLAG_NONE 0
975 
978 #define RIG_CHFLAG_SKIP (1<<0)
979 
982 #define RIG_CHFLAG_DATA (1<<1)
983 
984 
989 struct ext_list {
990  token_t token;
992 };
993 
994 #define RIG_EXT_END {0, {.i=0}}
995 #define RIG_IS_EXT_END(x) ((x).token == 0)
996 
1004 struct channel {
1006  int bank_num;
1007  vfo_t vfo;
1008  int ant;
1009  freq_t freq;
1011  pbwidth_t width;
1013  freq_t tx_freq;
1015  pbwidth_t tx_width;
1017  split_t split;
1018  vfo_t tx_vfo;
1020  rptr_shift_t rptr_shift;
1021  shortfreq_t rptr_offs;
1022  shortfreq_t tuning_step;
1023  shortfreq_t rit;
1024  shortfreq_t xit;
1025  setting_t funcs;
1026  value_t levels[RIG_SETTING_MAX];
1032  int flags;
1033  char channel_desc[MAXCHANDESC];
1034  struct ext_list
1035  *ext_levels;
1036 };
1037 
1041 typedef struct channel channel_t;
1042 
1048 struct channel_cap {
1049  unsigned bank_num: 1;
1050  unsigned vfo: 1;
1051  unsigned ant: 1;
1052  unsigned freq: 1;
1053  unsigned mode: 1;
1054  unsigned width: 1;
1056  unsigned tx_freq: 1;
1057  unsigned tx_mode: 1;
1058  unsigned tx_width: 1;
1060  unsigned split: 1;
1061  unsigned tx_vfo: 1;
1062  unsigned rptr_shift: 1;
1063  unsigned rptr_offs: 1;
1064  unsigned tuning_step: 1;
1065  unsigned rit: 1;
1066  unsigned xit: 1;
1067  setting_t funcs;
1068  setting_t levels;
1069  unsigned ctcss_tone: 1;
1070  unsigned ctcss_sql: 1;
1071  unsigned dcs_code: 1;
1072  unsigned dcs_sql: 1;
1073  unsigned scan_group: 1;
1074  unsigned flags: 1;
1075  unsigned channel_desc: 1;
1076  unsigned ext_levels: 1;
1077 };
1078 
1083 
1084 
1095 typedef enum {
1104 } chan_type_t;
1105 
1106 
1120 struct chan_list {
1121  int start;
1122  int end;
1123  chan_type_t type;
1126 };
1127 
1128 #define RIG_CHAN_END {0,0,RIG_MTYPE_NONE}
1129 #define RIG_IS_CHAN_END(c) ((c).type == RIG_MTYPE_NONE)
1130 
1134 #define RIG_MEM_CAPS_ALL -1
1135 
1139 typedef struct chan_list chan_t;
1140 
1141 
1153 struct gran {
1157 };
1158 
1162 typedef struct gran gran_t;
1163 
1164 
1168 struct cal_table {
1169  int size;
1170  struct {
1171  int raw;
1172  int val;
1173  } table[MAX_CAL_LENGTH];
1174 };
1175 
1188 typedef struct cal_table cal_table_t;
1189 
1190 #define EMPTY_STR_CAL { 0, { { 0, 0 }, } }
1191 
1192 
1193 typedef int (* chan_cb_t)(RIG *, channel_t **, int, const chan_t *, rig_ptr_t);
1194 typedef int (* confval_cb_t)(RIG *,
1195  const struct confparams *,
1196  value_t *,
1197  rig_ptr_t);
1198 
1199 
1219 struct rig_caps {
1221  const char *model_name;
1222  const char *mfg_name;
1223  const char *version;
1224  const char *copyright;
1225  enum rig_status_e status;
1227  int rig_type;
1228  ptt_type_t ptt_type;
1229  dcd_type_t dcd_type;
1236  enum serial_parity_e serial_parity;
1237  enum serial_handshake_e serial_handshake;
1241  int timeout;
1242  int retry;
1244  setting_t has_get_func;
1245  setting_t has_set_func;
1246  setting_t has_get_level;
1247  setting_t has_set_level;
1248  setting_t has_get_parm;
1249  setting_t has_set_parm;
1251  gran_t level_gran[RIG_SETTING_MAX];
1252  gran_t parm_gran[RIG_SETTING_MAX];
1254  const struct confparams *extparms;
1255  const struct confparams *extlevels;
1258  const tone_t *dcs_list;
1260  int preamp[MAXDBLSTSIZ];
1261  int attenuator[MAXDBLSTSIZ];
1262  shortfreq_t max_rit;
1263  shortfreq_t max_xit;
1264  shortfreq_t max_ifshift;
1273  int bank_qty;
1276  chan_t chan_list[CHANLSTSIZ];
1278  freq_range_t rx_range_list1[FRQRANGESIZ];
1279  freq_range_t tx_range_list1[FRQRANGESIZ];
1280  freq_range_t rx_range_list2[FRQRANGESIZ];
1281  freq_range_t tx_range_list2[FRQRANGESIZ];
1283  struct tuning_step_list tuning_steps[TSLSTSIZ];
1284  struct filter_list filters[FLTLSTSIZ];
1288  const struct confparams *cfgparams;
1289  const rig_ptr_t priv;
1291  /*
1292  * Rig API
1293  *
1294  */
1295 
1296  int (*rig_init)(RIG *rig);
1297  int (*rig_cleanup)(RIG *rig);
1298  int (*rig_open)(RIG *rig);
1299  int (*rig_close)(RIG *rig);
1300 
1301  /*
1302  * General API commands, from most primitive to least.. :()
1303  * List Set/Get functions pairs
1304  */
1305 
1306  int (*set_freq)(RIG *rig, vfo_t vfo, freq_t freq);
1307  int (*get_freq)(RIG *rig, vfo_t vfo, freq_t *freq);
1308 
1309  int (*set_mode)(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width);
1310  int (*get_mode)(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width);
1311 
1312  int (*set_vfo)(RIG *rig, vfo_t vfo);
1313  int (*get_vfo)(RIG *rig, vfo_t *vfo);
1314 
1315  int (*set_ptt)(RIG *rig, vfo_t vfo, ptt_t ptt);
1316  int (*get_ptt)(RIG *rig, vfo_t vfo, ptt_t *ptt);
1317 
1318  int (*get_dcd)(RIG *rig, vfo_t vfo, dcd_t *dcd);
1319 
1320  int (*set_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift);
1321  int (*get_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift);
1322 
1323  int (*set_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t offs);
1324  int (*get_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t *offs);
1325 
1326  int (*set_split_freq)(RIG *rig, vfo_t vfo, freq_t tx_freq);
1327  int (*get_split_freq)(RIG *rig, vfo_t vfo, freq_t *tx_freq);
1328 
1329  int (*set_split_mode)(RIG *rig,
1330  vfo_t vfo,
1331  rmode_t tx_mode,
1332  pbwidth_t tx_width);
1333  int (*get_split_mode)(RIG *rig,
1334  vfo_t vfo,
1335  rmode_t *tx_mode,
1336  pbwidth_t *tx_width);
1337 
1338  int (*set_split_freq_mode)(RIG *rig,
1339  vfo_t vfo,
1340  freq_t tx_freq,
1341  rmode_t tx_mode,
1342  pbwidth_t tx_width);
1343  int (*get_split_freq_mode)(RIG *rig,
1344  vfo_t vfo,
1345  freq_t *tx_freq,
1346  rmode_t *tx_mode,
1347  pbwidth_t *tx_width);
1348 
1349  int (*set_split_vfo)(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo);
1350  int (*get_split_vfo)(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo);
1351 
1352  int (*set_rit)(RIG *rig, vfo_t vfo, shortfreq_t rit);
1353  int (*get_rit)(RIG *rig, vfo_t vfo, shortfreq_t *rit);
1354 
1355  int (*set_xit)(RIG *rig, vfo_t vfo, shortfreq_t xit);
1356  int (*get_xit)(RIG *rig, vfo_t vfo, shortfreq_t *xit);
1357 
1358  int (*set_ts)(RIG *rig, vfo_t vfo, shortfreq_t ts);
1359  int (*get_ts)(RIG *rig, vfo_t vfo, shortfreq_t *ts);
1360 
1361  int (*set_dcs_code)(RIG *rig, vfo_t vfo, tone_t code);
1362  int (*get_dcs_code)(RIG *rig, vfo_t vfo, tone_t *code);
1363 
1364  int (*set_tone)(RIG *rig, vfo_t vfo, tone_t tone);
1365  int (*get_tone)(RIG *rig, vfo_t vfo, tone_t *tone);
1366 
1367  int (*set_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t tone);
1368  int (*get_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t *tone);
1369 
1370  int (*set_dcs_sql)(RIG *rig, vfo_t vfo, tone_t code);
1371  int (*get_dcs_sql)(RIG *rig, vfo_t vfo, tone_t *code);
1372 
1373  int (*set_tone_sql)(RIG *rig, vfo_t vfo, tone_t tone);
1374  int (*get_tone_sql)(RIG *rig, vfo_t vfo, tone_t *tone);
1375 
1376  int (*set_ctcss_sql)(RIG *rig, vfo_t vfo, tone_t tone);
1377  int (*get_ctcss_sql)(RIG *rig, vfo_t vfo, tone_t *tone);
1378 
1379  int (*power2mW)(RIG *rig,
1380  unsigned int *mwpower,
1381  float power,
1382  freq_t freq,
1383  rmode_t mode);
1384  int (*mW2power)(RIG *rig,
1385  float *power,
1386  unsigned int mwpower,
1387  freq_t freq,
1388  rmode_t mode);
1389 
1390  int (*set_powerstat)(RIG *rig, powerstat_t status);
1391  int (*get_powerstat)(RIG *rig, powerstat_t *status);
1392 
1393  int (*reset)(RIG *rig, reset_t reset);
1394 
1395  int (*set_ant)(RIG *rig, vfo_t vfo, ant_t ant);
1396  int (*get_ant)(RIG *rig, vfo_t vfo, ant_t *ant);
1397 
1398  int (*set_level)(RIG *rig, vfo_t vfo, setting_t level, value_t val);
1399  int (*get_level)(RIG *rig, vfo_t vfo, setting_t level, value_t *val);
1400 
1401  int (*set_func)(RIG *rig, vfo_t vfo, setting_t func, int status);
1402  int (*get_func)(RIG *rig, vfo_t vfo, setting_t func, int *status);
1403 
1404  int (*set_parm)(RIG *rig, setting_t parm, value_t val);
1405  int (*get_parm)(RIG *rig, setting_t parm, value_t *val);
1406 
1407  int (*set_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t val);
1408  int (*get_ext_level)(RIG *rig, vfo_t vfo, token_t token, value_t *val);
1409 
1410  int (*set_ext_parm)(RIG *rig, token_t token, value_t val);
1411  int (*get_ext_parm)(RIG *rig, token_t token, value_t *val);
1412 
1413  int (*set_conf)(RIG *rig, token_t token, const char *val);
1414  int (*get_conf)(RIG *rig, token_t token, char *val);
1415 
1416  int (*send_dtmf)(RIG *rig, vfo_t vfo, const char *digits);
1417  int (*recv_dtmf)(RIG *rig, vfo_t vfo, char *digits, int *length);
1418 
1419  int (*send_morse)(RIG *rig, vfo_t vfo, const char *msg);
1420 
1421  int (*set_bank)(RIG *rig, vfo_t vfo, int bank);
1422 
1423  int (*set_mem)(RIG *rig, vfo_t vfo, int ch);
1424  int (*get_mem)(RIG *rig, vfo_t vfo, int *ch);
1425 
1426  int (*vfo_op)(RIG *rig, vfo_t vfo, vfo_op_t op);
1427 
1428  int (*scan)(RIG *rig, vfo_t vfo, scan_t scan, int ch);
1429 
1430  int (*set_trn)(RIG *rig, int trn);
1431  int (*get_trn)(RIG *rig, int *trn);
1432 
1433  int (*decode_event)(RIG *rig);
1434 
1435  int (*set_channel)(RIG *rig, const channel_t *chan);
1436  int (*get_channel)(RIG *rig, channel_t *chan);
1437 
1438  const char * (*get_info)(RIG *rig);
1439 
1440  int (*set_chan_all_cb)(RIG *rig, chan_cb_t chan_cb, rig_ptr_t);
1441  int (*get_chan_all_cb)(RIG *rig, chan_cb_t chan_cb, rig_ptr_t);
1442 
1443  int (*set_mem_all_cb)(RIG *rig,
1444  chan_cb_t chan_cb,
1445  confval_cb_t parm_cb,
1446  rig_ptr_t);
1447  int (*get_mem_all_cb)(RIG *rig,
1448  chan_cb_t chan_cb,
1449  confval_cb_t parm_cb,
1450  rig_ptr_t);
1451 
1452  const char *clone_combo_set;
1453  const char *clone_combo_get;
1454 };
1455 
1456 
1462 typedef struct hamlib_port {
1463  union {
1465  ptt_type_t ptt;
1466  dcd_type_t dcd;
1467  } type;
1468 
1469  int fd;
1470  void *handle;
1475  struct {
1476  int tv_sec, tv_usec;
1477  } post_write_date;
1479  int timeout;
1480  int retry;
1482  char pathname[FILPATHLEN];
1484  union {
1485  struct {
1486  int rate;
1489  enum serial_parity_e parity;
1490  enum serial_handshake_e handshake;
1491  enum serial_control_state_e rts_state;
1492  enum serial_control_state_e dtr_state;
1493  } serial;
1495  struct {
1496  int pin;
1497  } parallel;
1499  struct {
1501  } cm108;
1503  struct {
1504  int vid;
1505  int pid;
1506  int conf;
1507  int iface;
1508  int alt;
1509  char *vendor_name;
1510  char *product;
1511  } usb;
1513  struct {
1514  int on_value;
1515  int value;
1516  } gpio;
1517  } parm;
1518 } hamlib_port_t;
1519 
1520 #if !defined(__APPLE__) || !defined(__cplusplus)
1521 typedef hamlib_port_t port_t;
1522 #endif
1523 
1524 
1534 struct rig_state {
1535  /*
1536  * overridable fields
1537  */
1542  double vfo_comp;
1545  freq_range_t rx_range_list[FRQRANGESIZ];
1546  freq_range_t tx_range_list[FRQRANGESIZ];
1548  struct tuning_step_list tuning_steps[TSLSTSIZ];
1550  struct filter_list filters[FLTLSTSIZ];
1554  chan_t chan_list[CHANLSTSIZ];
1556  shortfreq_t max_rit;
1557  shortfreq_t max_xit;
1558  shortfreq_t max_ifshift;
1562  int preamp[MAXDBLSTSIZ];
1563  int attenuator[MAXDBLSTSIZ];
1565  setting_t has_get_func;
1566  setting_t has_set_func;
1567  setting_t has_get_level;
1568  setting_t has_set_level;
1569  setting_t has_get_parm;
1570  setting_t has_set_parm;
1572  gran_t level_gran[RIG_SETTING_MAX];
1573  gran_t parm_gran[RIG_SETTING_MAX];
1576  /*
1577  * non overridable fields, internal use
1578  */
1579 
1581  vfo_t current_vfo;
1582  int vfo_list;
1584  rig_ptr_t priv;
1585  rig_ptr_t obj;
1589  freq_t current_freq;
1591  pbwidth_t current_width;
1592  vfo_t tx_vfo;
1594  int transmit;
1597 };
1598 
1599 
1600 typedef int (*vprintf_cb_t)(enum rig_debug_level_e,
1601  rig_ptr_t,
1602  const char *,
1603  va_list);
1604 
1605 typedef int (*freq_cb_t)(RIG *, vfo_t, freq_t, rig_ptr_t);
1606 typedef int (*mode_cb_t)(RIG *, vfo_t, rmode_t, pbwidth_t, rig_ptr_t);
1607 typedef int (*vfo_cb_t)(RIG *, vfo_t, rig_ptr_t);
1608 typedef int (*ptt_cb_t)(RIG *, vfo_t, ptt_t, rig_ptr_t);
1609 typedef int (*dcd_cb_t)(RIG *, vfo_t, dcd_t, rig_ptr_t);
1610 typedef int (*pltune_cb_t)(RIG *,
1611  vfo_t, freq_t *,
1612  rmode_t *,
1613  pbwidth_t *,
1614  rig_ptr_t);
1615 
1616 
1635  freq_cb_t freq_event;
1636  rig_ptr_t freq_arg;
1637  mode_cb_t mode_event;
1638  rig_ptr_t mode_arg;
1639  vfo_cb_t vfo_event;
1640  rig_ptr_t vfo_arg;
1641  ptt_cb_t ptt_event;
1642  rig_ptr_t ptt_arg;
1643  dcd_cb_t dcd_event;
1644  rig_ptr_t dcd_arg;
1645  pltune_cb_t pltune;
1646  rig_ptr_t pltune_arg;
1647  /* etc.. */
1648 };
1649 
1650 
1660 struct rig {
1661  struct rig_caps *caps;
1662  struct rig_state state;
1663  struct rig_callbacks callbacks;
1664 };
1665 
1666 
1667 
1668 /* --------------- API function prototypes -----------------*/
1669 
1670 extern HAMLIB_EXPORT(RIG *) rig_init HAMLIB_PARAMS((rig_model_t rig_model));
1671 extern HAMLIB_EXPORT(int) rig_open HAMLIB_PARAMS((RIG *rig));
1672 
1673 /*
1674  * General API commands, from most primitive to least.. :()
1675  * List Set/Get functions pairs
1676  */
1677 
1678 extern HAMLIB_EXPORT(int)
1679 rig_set_freq HAMLIB_PARAMS((RIG *rig,
1680  vfo_t vfo,
1681  freq_t freq));
1682 extern HAMLIB_EXPORT(int)
1683 rig_get_freq HAMLIB_PARAMS((RIG *rig,
1684  vfo_t vfo,
1685  freq_t *freq));
1686 
1687 extern HAMLIB_EXPORT(int)
1688 rig_set_mode HAMLIB_PARAMS((RIG *rig,
1689  vfo_t vfo,
1690  rmode_t mode,
1691  pbwidth_t width));
1692 extern HAMLIB_EXPORT(int)
1693 rig_get_mode HAMLIB_PARAMS((RIG *rig,
1694  vfo_t vfo,
1695  rmode_t *mode,
1696  pbwidth_t *width));
1697 
1698 extern HAMLIB_EXPORT(int)
1699 rig_set_vfo HAMLIB_PARAMS((RIG *rig,
1700  vfo_t vfo));
1701 extern HAMLIB_EXPORT(int)
1702 rig_get_vfo HAMLIB_PARAMS((RIG *rig,
1703  vfo_t *vfo));
1704 
1705 extern HAMLIB_EXPORT(int)
1706 rig_set_ptt HAMLIB_PARAMS((RIG *rig,
1707  vfo_t vfo,
1708  ptt_t ptt));
1709 extern HAMLIB_EXPORT(int)
1710 rig_get_ptt HAMLIB_PARAMS((RIG *rig,
1711  vfo_t vfo,
1712  ptt_t *ptt));
1713 
1714 extern HAMLIB_EXPORT(int)
1715 rig_get_dcd HAMLIB_PARAMS((RIG *rig,
1716  vfo_t vfo,
1717  dcd_t *dcd));
1718 
1719 extern HAMLIB_EXPORT(int)
1720 rig_set_rptr_shift HAMLIB_PARAMS((RIG *rig,
1721  vfo_t vfo,
1722  rptr_shift_t rptr_shift));
1723 extern HAMLIB_EXPORT(int)
1724 rig_get_rptr_shift HAMLIB_PARAMS((RIG *rig,
1725  vfo_t vfo,
1726  rptr_shift_t *rptr_shift));
1727 
1728 extern HAMLIB_EXPORT(int)
1729 rig_set_rptr_offs HAMLIB_PARAMS((RIG *rig,
1730  vfo_t vfo,
1731  shortfreq_t rptr_offs));
1732 extern HAMLIB_EXPORT(int)
1733 rig_get_rptr_offs HAMLIB_PARAMS((RIG *rig,
1734  vfo_t vfo,
1735  shortfreq_t *rptr_offs));
1736 
1737 extern HAMLIB_EXPORT(int)
1738 rig_set_ctcss_tone HAMLIB_PARAMS((RIG *rig,
1739  vfo_t vfo,
1740  tone_t tone));
1741 extern HAMLIB_EXPORT(int)
1742 rig_get_ctcss_tone HAMLIB_PARAMS((RIG *rig,
1743  vfo_t vfo,
1744  tone_t *tone));
1745 
1746 extern HAMLIB_EXPORT(int)
1747 rig_set_dcs_code HAMLIB_PARAMS((RIG *rig,
1748  vfo_t vfo,
1749  tone_t code));
1750 extern HAMLIB_EXPORT(int)
1751 rig_get_dcs_code HAMLIB_PARAMS((RIG *rig,
1752  vfo_t vfo,
1753  tone_t *code));
1754 
1755 extern HAMLIB_EXPORT(int)
1756 rig_set_ctcss_sql HAMLIB_PARAMS((RIG *rig,
1757  vfo_t vfo,
1758  tone_t tone));
1759 extern HAMLIB_EXPORT(int)
1760 rig_get_ctcss_sql HAMLIB_PARAMS((RIG *rig,
1761  vfo_t vfo,
1762  tone_t *tone));
1763 
1764 extern HAMLIB_EXPORT(int)
1765 rig_set_dcs_sql HAMLIB_PARAMS((RIG *rig,
1766  vfo_t vfo,
1767  tone_t code));
1768 extern HAMLIB_EXPORT(int)
1769 rig_get_dcs_sql HAMLIB_PARAMS((RIG *rig,
1770  vfo_t vfo,
1771  tone_t *code));
1772 
1773 extern HAMLIB_EXPORT(int)
1774 rig_set_split_freq HAMLIB_PARAMS((RIG *rig,
1775  vfo_t vfo,
1776  freq_t tx_freq));
1777 extern HAMLIB_EXPORT(int)
1778 rig_get_split_freq HAMLIB_PARAMS((RIG *rig,
1779  vfo_t vfo,
1780  freq_t *tx_freq));
1781 
1782 extern HAMLIB_EXPORT(int)
1783 rig_set_split_mode HAMLIB_PARAMS((RIG *rig,
1784  vfo_t vfo,
1785  rmode_t tx_mode,
1786  pbwidth_t tx_width));
1787 extern HAMLIB_EXPORT(int)
1788 rig_get_split_mode HAMLIB_PARAMS((RIG *rig,
1789  vfo_t vfo,
1790  rmode_t *tx_mode,
1791  pbwidth_t *tx_width));
1792 
1793 extern HAMLIB_EXPORT(int)
1794 rig_set_split_freq_mode HAMLIB_PARAMS((RIG *rig,
1795  vfo_t vfo,
1796  freq_t tx_freq,
1797  rmode_t tx_mode,
1798  pbwidth_t tx_width));
1799 extern HAMLIB_EXPORT(int)
1800 rig_get_split_freq_mode HAMLIB_PARAMS((RIG *rig,
1801  vfo_t vfo,
1802  freq_t *tx_freq,
1803  rmode_t *tx_mode,
1804  pbwidth_t *tx_width));
1805 
1806 extern HAMLIB_EXPORT(int)
1807 rig_set_split_vfo HAMLIB_PARAMS((RIG *,
1808  vfo_t rx_vfo,
1809  split_t split,
1810  vfo_t tx_vfo));
1811 extern HAMLIB_EXPORT(int)
1812 rig_get_split_vfo HAMLIB_PARAMS((RIG *,
1813  vfo_t rx_vfo,
1814  split_t *split,
1815  vfo_t *tx_vfo));
1816 
1817 #define rig_set_split(r,v,s) rig_set_split_vfo((r),(v),(s),RIG_VFO_CURR)
1818 #define rig_get_split(r,v,s) ({ vfo_t _tx_vfo; rig_get_split_vfo((r),(v),(s),&_tx_vfo); })
1819 
1820 extern HAMLIB_EXPORT(int)
1821 rig_set_rit HAMLIB_PARAMS((RIG *rig,
1822  vfo_t vfo,
1823  shortfreq_t rit));
1824 extern HAMLIB_EXPORT(int)
1825 rig_get_rit HAMLIB_PARAMS((RIG *rig,
1826  vfo_t vfo,
1827  shortfreq_t *rit));
1828 
1829 extern HAMLIB_EXPORT(int)
1830 rig_set_xit HAMLIB_PARAMS((RIG *rig,
1831  vfo_t vfo,
1832  shortfreq_t xit));
1833 extern HAMLIB_EXPORT(int)
1834 rig_get_xit HAMLIB_PARAMS((RIG *rig,
1835  vfo_t vfo,
1836  shortfreq_t *xit));
1837 
1838 extern HAMLIB_EXPORT(int)
1839 rig_set_ts HAMLIB_PARAMS((RIG *rig,
1840  vfo_t vfo,
1841  shortfreq_t ts));
1842 extern HAMLIB_EXPORT(int)
1843 rig_get_ts HAMLIB_PARAMS((RIG *rig,
1844  vfo_t vfo,
1845  shortfreq_t *ts));
1846 
1847 extern HAMLIB_EXPORT(int)
1848 rig_power2mW HAMLIB_PARAMS((RIG *rig,
1849  unsigned int *mwpower,
1850  float power,
1851  freq_t freq,
1852  rmode_t mode));
1853 extern HAMLIB_EXPORT(int)
1854 rig_mW2power HAMLIB_PARAMS((RIG *rig,
1855  float *power,
1856  unsigned int mwpower,
1857  freq_t freq,
1858  rmode_t mode));
1859 
1860 extern HAMLIB_EXPORT(shortfreq_t)
1861 rig_get_resolution HAMLIB_PARAMS((RIG *rig,
1862  rmode_t mode));
1863 
1864 extern HAMLIB_EXPORT(int)
1865 rig_set_level HAMLIB_PARAMS((RIG *rig,
1866  vfo_t vfo,
1867  setting_t level,
1868  value_t val));
1869 extern HAMLIB_EXPORT(int)
1870 rig_get_level HAMLIB_PARAMS((RIG *rig,
1871  vfo_t vfo,
1872  setting_t level,
1873  value_t *val));
1874 
1875 #define rig_get_strength(r,v,s) rig_get_level((r),(v),RIG_LEVEL_STRENGTH, (value_t*)(s))
1876 
1877 extern HAMLIB_EXPORT(int)
1878 rig_set_parm HAMLIB_PARAMS((RIG *rig,
1879  setting_t parm,
1880  value_t val));
1881 extern HAMLIB_EXPORT(int)
1882 rig_get_parm HAMLIB_PARAMS((RIG *rig,
1883  setting_t parm,
1884  value_t *val));
1885 
1886 extern HAMLIB_EXPORT(int)
1887 rig_set_conf HAMLIB_PARAMS((RIG *rig,
1888  token_t token,
1889  const char *val));
1890 extern HAMLIB_EXPORT(int)
1891 rig_get_conf HAMLIB_PARAMS((RIG *rig,
1892  token_t token,
1893  char *val));
1894 
1895 extern HAMLIB_EXPORT(int)
1896 rig_set_powerstat HAMLIB_PARAMS((RIG *rig,
1897  powerstat_t status));
1898 extern HAMLIB_EXPORT(int)
1899 rig_get_powerstat HAMLIB_PARAMS((RIG *rig,
1900  powerstat_t *status));
1901 
1902 extern HAMLIB_EXPORT(int)
1903 rig_reset HAMLIB_PARAMS((RIG *rig,
1904  reset_t reset)); /* dangerous! */
1905 
1906 extern HAMLIB_EXPORT(int)
1907 rig_set_ext_level HAMLIB_PARAMS((RIG *rig,
1908  vfo_t vfo,
1909  token_t token,
1910  value_t val));
1911 extern HAMLIB_EXPORT(int)
1912 rig_get_ext_level HAMLIB_PARAMS((RIG *rig,
1913  vfo_t vfo,
1914  token_t token,
1915  value_t *val));
1916 
1917 extern HAMLIB_EXPORT(int)
1918 rig_set_ext_parm HAMLIB_PARAMS((RIG *rig,
1919  token_t token,
1920  value_t val));
1921 extern HAMLIB_EXPORT(int)
1922 rig_get_ext_parm HAMLIB_PARAMS((RIG *rig,
1923  token_t token,
1924  value_t *val));
1925 
1926 extern HAMLIB_EXPORT(int)
1927 rig_ext_level_foreach HAMLIB_PARAMS((RIG *rig,
1928  int (*cfunc)(RIG *,
1929  const struct confparams *,
1930  rig_ptr_t),
1931  rig_ptr_t data));
1932 extern HAMLIB_EXPORT(int)
1933 rig_ext_parm_foreach HAMLIB_PARAMS((RIG *rig,
1934  int (*cfunc)(RIG *,
1935  const struct confparams *,
1936  rig_ptr_t),
1937  rig_ptr_t data));
1938 
1939 extern HAMLIB_EXPORT(const struct confparams *)
1940 rig_ext_lookup HAMLIB_PARAMS((RIG *rig,
1941  const char *name));
1942 
1943 extern HAMLIB_EXPORT(const struct confparams *)
1944 rig_ext_lookup_tok HAMLIB_PARAMS((RIG *rig,
1945  token_t token));
1946 extern HAMLIB_EXPORT(token_t)
1947 rig_ext_token_lookup HAMLIB_PARAMS((RIG *rig,
1948  const char *name));
1949 
1950 
1951 extern HAMLIB_EXPORT(int)
1952 rig_token_foreach HAMLIB_PARAMS((RIG *rig,
1953  int (*cfunc)(const struct confparams *,
1954  rig_ptr_t),
1955  rig_ptr_t data));
1956 
1957 extern HAMLIB_EXPORT(const struct confparams *)
1958 rig_confparam_lookup HAMLIB_PARAMS((RIG *rig,
1959  const char *name));
1960 extern HAMLIB_EXPORT(token_t)
1961 rig_token_lookup HAMLIB_PARAMS((RIG *rig,
1962  const char *name));
1963 
1964 extern HAMLIB_EXPORT(int)
1965 rig_close HAMLIB_PARAMS((RIG *rig));
1966 
1967 extern HAMLIB_EXPORT(int)
1968 rig_cleanup HAMLIB_PARAMS((RIG *rig));
1969 
1970 extern HAMLIB_EXPORT(int)
1971 rig_set_ant HAMLIB_PARAMS((RIG *rig,
1972  vfo_t vfo,
1973  ant_t ant)); /* antenna */
1974 extern HAMLIB_EXPORT(int)
1975 rig_get_ant HAMLIB_PARAMS((RIG *rig,
1976  vfo_t vfo,
1977  ant_t *ant));
1978 
1979 extern HAMLIB_EXPORT(setting_t)
1980 rig_has_get_level HAMLIB_PARAMS((RIG *rig,
1981  setting_t level));
1982 extern HAMLIB_EXPORT(setting_t)
1983 rig_has_set_level HAMLIB_PARAMS((RIG *rig,
1984  setting_t level));
1985 
1986 extern HAMLIB_EXPORT(setting_t)
1987 rig_has_get_parm HAMLIB_PARAMS((RIG *rig,
1988  setting_t parm));
1989 extern HAMLIB_EXPORT(setting_t)
1990 rig_has_set_parm HAMLIB_PARAMS((RIG *rig,
1991  setting_t parm));
1992 
1993 extern HAMLIB_EXPORT(setting_t)
1994 rig_has_get_func HAMLIB_PARAMS((RIG *rig,
1995  setting_t func));
1996 extern HAMLIB_EXPORT(setting_t)
1997 rig_has_set_func HAMLIB_PARAMS((RIG *rig,
1998  setting_t func));
1999 
2000 extern HAMLIB_EXPORT(int)
2001 rig_set_func HAMLIB_PARAMS((RIG *rig,
2002  vfo_t vfo,
2003  setting_t func,
2004  int status));
2005 extern HAMLIB_EXPORT(int)
2006 rig_get_func HAMLIB_PARAMS((RIG *rig,
2007  vfo_t vfo,
2008  setting_t func,
2009  int *status));
2010 
2011 extern HAMLIB_EXPORT(int)
2012 rig_send_dtmf HAMLIB_PARAMS((RIG *rig,
2013  vfo_t vfo,
2014  const char *digits));
2015 extern HAMLIB_EXPORT(int)
2016 rig_recv_dtmf HAMLIB_PARAMS((RIG *rig,
2017  vfo_t vfo,
2018  char *digits,
2019  int *length));
2020 
2021 extern HAMLIB_EXPORT(int)
2022 rig_send_morse HAMLIB_PARAMS((RIG *rig,
2023  vfo_t vfo,
2024  const char *msg));
2025 
2026 extern HAMLIB_EXPORT(int)
2027 rig_set_bank HAMLIB_PARAMS((RIG *rig,
2028  vfo_t vfo,
2029  int bank));
2030 
2031 extern HAMLIB_EXPORT(int)
2032 rig_set_mem HAMLIB_PARAMS((RIG *rig,
2033  vfo_t vfo,
2034  int ch));
2035 extern HAMLIB_EXPORT(int)
2036 rig_get_mem HAMLIB_PARAMS((RIG *rig,
2037  vfo_t vfo,
2038  int *ch));
2039 
2040 extern HAMLIB_EXPORT(int)
2041 rig_vfo_op HAMLIB_PARAMS((RIG *rig,
2042  vfo_t vfo,
2043  vfo_op_t op));
2044 
2045 extern HAMLIB_EXPORT(vfo_op_t)
2046 rig_has_vfo_op HAMLIB_PARAMS((RIG *rig,
2047  vfo_op_t op));
2048 
2049 extern HAMLIB_EXPORT(int)
2050 rig_scan HAMLIB_PARAMS((RIG *rig,
2051  vfo_t vfo,
2052  scan_t scan,
2053  int ch));
2054 
2055 extern HAMLIB_EXPORT(scan_t)
2056 rig_has_scan HAMLIB_PARAMS((RIG *rig,
2057  scan_t scan));
2058 
2059 extern HAMLIB_EXPORT(int)
2060 rig_set_channel HAMLIB_PARAMS((RIG *rig,
2061  const channel_t *chan)); /* mem */
2062 extern HAMLIB_EXPORT(int)
2063 rig_get_channel HAMLIB_PARAMS((RIG *rig,
2064  channel_t *chan));
2065 
2066 extern HAMLIB_EXPORT(int)
2067 rig_set_chan_all HAMLIB_PARAMS((RIG *rig,
2068  const channel_t chans[]));
2069 extern HAMLIB_EXPORT(int)
2070 rig_get_chan_all HAMLIB_PARAMS((RIG *rig,
2071  channel_t chans[]));
2072 
2073 extern HAMLIB_EXPORT(int)
2074 rig_set_chan_all_cb HAMLIB_PARAMS((RIG *rig,
2075  chan_cb_t chan_cb,
2076  rig_ptr_t));
2077 extern HAMLIB_EXPORT(int)
2078 rig_get_chan_all_cb HAMLIB_PARAMS((RIG *rig,
2079  chan_cb_t chan_cb,
2080  rig_ptr_t));
2081 
2082 extern HAMLIB_EXPORT(int)
2083 rig_set_mem_all_cb HAMLIB_PARAMS((RIG *rig,
2084  chan_cb_t chan_cb,
2085  confval_cb_t parm_cb,
2086  rig_ptr_t));
2087 extern HAMLIB_EXPORT(int)
2088 rig_get_mem_all_cb HAMLIB_PARAMS((RIG *rig,
2089  chan_cb_t chan_cb,
2090  confval_cb_t parm_cb,
2091  rig_ptr_t));
2092 
2093 extern HAMLIB_EXPORT(int)
2094 rig_set_mem_all HAMLIB_PARAMS((RIG *rig,
2095  const channel_t *chan,
2096  const struct confparams *,
2097  const value_t *));
2098 extern HAMLIB_EXPORT(int)
2099 rig_get_mem_all HAMLIB_PARAMS((RIG *rig,
2100  channel_t *chan,
2101  const struct confparams *,
2102  value_t *));
2103 
2104 extern HAMLIB_EXPORT(const chan_t *)
2105 rig_lookup_mem_caps HAMLIB_PARAMS((RIG *rig,
2106  int ch));
2107 
2108 extern HAMLIB_EXPORT(int)
2109 rig_mem_count HAMLIB_PARAMS((RIG *rig));
2110 
2111 extern HAMLIB_EXPORT(int)
2112 rig_set_trn HAMLIB_PARAMS((RIG *rig,
2113  int trn));
2114 extern HAMLIB_EXPORT(int)
2115 rig_get_trn HAMLIB_PARAMS((RIG *rig,
2116  int *trn));
2117 
2118 extern HAMLIB_EXPORT(int)
2119 rig_set_freq_callback HAMLIB_PARAMS((RIG *,
2120  freq_cb_t,
2121  rig_ptr_t));
2122 
2123 extern HAMLIB_EXPORT(int)
2124 rig_set_mode_callback HAMLIB_PARAMS((RIG *,
2125  mode_cb_t,
2126  rig_ptr_t));
2127 extern HAMLIB_EXPORT(int)
2128 rig_set_vfo_callback HAMLIB_PARAMS((RIG *,
2129  vfo_cb_t,
2130  rig_ptr_t));
2131 
2132 extern HAMLIB_EXPORT(int)
2133 rig_set_ptt_callback HAMLIB_PARAMS((RIG *,
2134  ptt_cb_t,
2135  rig_ptr_t));
2136 
2137 extern HAMLIB_EXPORT(int)
2138 rig_set_dcd_callback HAMLIB_PARAMS((RIG *,
2139  dcd_cb_t,
2140  rig_ptr_t));
2141 
2142 extern HAMLIB_EXPORT(int)
2143 rig_set_pltune_callback HAMLIB_PARAMS((RIG *,
2144  pltune_cb_t,
2145  rig_ptr_t));
2146 
2147 extern HAMLIB_EXPORT(const char *)
2148 rig_get_info HAMLIB_PARAMS((RIG *rig));
2149 
2150 extern HAMLIB_EXPORT(const struct rig_caps *)
2151 rig_get_caps HAMLIB_PARAMS((rig_model_t rig_model));
2152 
2153 extern HAMLIB_EXPORT(const freq_range_t *)
2154 rig_get_range HAMLIB_PARAMS((const freq_range_t range_list[],
2155  freq_t freq,
2156  rmode_t mode));
2157 
2158 extern HAMLIB_EXPORT(pbwidth_t)
2159 rig_passband_normal HAMLIB_PARAMS((RIG *rig,
2160  rmode_t mode));
2161 extern HAMLIB_EXPORT(pbwidth_t)
2162 rig_passband_narrow HAMLIB_PARAMS((RIG *rig,
2163  rmode_t mode));
2164 extern HAMLIB_EXPORT(pbwidth_t)
2165 rig_passband_wide HAMLIB_PARAMS((RIG *rig,
2166  rmode_t mode));
2167 
2168 extern HAMLIB_EXPORT(const char *)
2169 rigerror HAMLIB_PARAMS((int errnum));
2170 
2171 extern HAMLIB_EXPORT(int)
2172 rig_setting2idx HAMLIB_PARAMS((setting_t s));
2173 
2174 #define rig_idx2setting(i) (1UL<<(i))
2175 
2176 /*
2177  * Even if these functions are prefixed with "rig_", they are not rig specific
2178  * Maybe "hamlib_" would have been better. Let me know. --SF
2179  */
2180 extern HAMLIB_EXPORT(void)
2181 rig_set_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
2182 
2183 #define rig_set_debug_level(level) rig_set_debug(level)
2184 
2185 extern HAMLIB_EXPORT(int)
2186 rig_need_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
2187 
2188 extern HAMLIB_EXPORT(void)
2189 rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level,
2190  const char *fmt, ...));
2191 
2192 extern HAMLIB_EXPORT(vprintf_cb_t)
2193 rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb,
2194  rig_ptr_t arg));
2195 
2196 extern HAMLIB_EXPORT(FILE *)
2197 rig_set_debug_file HAMLIB_PARAMS((FILE *stream));
2198 
2199 extern HAMLIB_EXPORT(int)
2200 rig_register HAMLIB_PARAMS((const struct rig_caps *caps));
2201 
2202 extern HAMLIB_EXPORT(int)
2203 rig_unregister HAMLIB_PARAMS((rig_model_t rig_model));
2204 
2205 extern HAMLIB_EXPORT(int)
2206 rig_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rig_caps *, rig_ptr_t),
2207  rig_ptr_t data));
2208 
2209 extern HAMLIB_EXPORT(int)
2210 rig_load_backend HAMLIB_PARAMS((const char *be_name));
2211 
2212 extern HAMLIB_EXPORT(int)
2213 rig_check_backend HAMLIB_PARAMS((rig_model_t rig_model));
2214 
2215 extern HAMLIB_EXPORT(int)
2216 rig_load_all_backends HAMLIB_PARAMS((void));
2217 
2218 typedef int (*rig_probe_func_t)(const hamlib_port_t *, rig_model_t, rig_ptr_t);
2219 
2220 extern HAMLIB_EXPORT(int)
2221 rig_probe_all HAMLIB_PARAMS((hamlib_port_t *p,
2222  rig_probe_func_t,
2223  rig_ptr_t));
2224 
2225 extern HAMLIB_EXPORT(rig_model_t)
2226 rig_probe HAMLIB_PARAMS((hamlib_port_t *p));
2227 
2228 
2229 /* Misc calls */
2230 extern HAMLIB_EXPORT(const char *) rig_strrmode(rmode_t mode);
2231 extern HAMLIB_EXPORT(const char *) rig_strvfo(vfo_t vfo);
2232 extern HAMLIB_EXPORT(const char *) rig_strfunc(setting_t);
2233 extern HAMLIB_EXPORT(const char *) rig_strlevel(setting_t);
2234 extern HAMLIB_EXPORT(const char *) rig_strparm(setting_t);
2235 extern HAMLIB_EXPORT(const char *) rig_strptrshift(rptr_shift_t);
2236 extern HAMLIB_EXPORT(const char *) rig_strvfop(vfo_op_t op);
2237 extern HAMLIB_EXPORT(const char *) rig_strscan(scan_t scan);
2238 extern HAMLIB_EXPORT(const char *) rig_strstatus(enum rig_status_e status);
2239 extern HAMLIB_EXPORT(const char *) rig_strmtype(chan_type_t mtype);
2240 
2241 extern HAMLIB_EXPORT(rmode_t) rig_parse_mode(const char *s);
2242 extern HAMLIB_EXPORT(vfo_t) rig_parse_vfo(const char *s);
2243 extern HAMLIB_EXPORT(setting_t) rig_parse_func(const char *s);
2244 extern HAMLIB_EXPORT(setting_t) rig_parse_level(const char *s);
2245 extern HAMLIB_EXPORT(setting_t) rig_parse_parm(const char *s);
2246 extern HAMLIB_EXPORT(vfo_op_t) rig_parse_vfo_op(const char *s);
2247 extern HAMLIB_EXPORT(scan_t) rig_parse_scan(const char *s);
2248 extern HAMLIB_EXPORT(rptr_shift_t) rig_parse_rptr_shift(const char *s);
2249 extern HAMLIB_EXPORT(chan_type_t) rig_parse_mtype(const char *s);
2250 
2251 extern HAMLIB_EXPORT(const char *) rig_license HAMLIB_PARAMS(());
2252 extern HAMLIB_EXPORT(const char *) rig_version HAMLIB_PARAMS(());
2253 extern HAMLIB_EXPORT(const char *) rig_copyright HAMLIB_PARAMS(());
2254 
2255 HAMLIB_EXPORT(void) rig_no_restore_ai();
2256 
2257 __END_DECLS
2258 
2259 #endif /* _RIG_H */
2260 
Definition: rig.h:863
Definition: rig.h:481
int rig_get_conf(RIG *rig, token_t token, char *val)
get the value of a configuration parameter
Definition: conf.c:1000
scan_t rig_has_scan(RIG *rig, scan_t scan)
check availability of scanning functions
Definition: rig.c:4018
setting_t funcs
Definition: rig.h:1067
Definition: rig.h:473
Definition: rig.h:849
int rig_get_mem(RIG *rig, vfo_t vfo, int *ch)
get the current memory channel number
Definition: mem.c:135
int rig_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
get the status of functions of the radio
Definition: settings.c:543
rig_debug_level_e
Hamlib debug levels.
Definition: rig.h:126
value_t step
Definition: rig.h:1156
int fd
Definition: rig.h:1469
Definition: rig.h:743
unsigned long setting_t
Setting.
Definition: rig.h:761
Definition: rig.h:429
Definition: rig.h:699
token_t rig_ext_token_lookup(RIG *rig, const char *name)
Simple lookup returning token id assicated with name.
Definition: ext.c:231
setting_t rig_has_get_level(RIG *rig, setting_t level)
check retrieval ability of level settings
Definition: settings.c:300
Definition: rig.h:292
setting_t has_set_func
Definition: rig.h:1566
struct ext_list * ext_levels
Definition: rig.h:1034
int rig_token_foreach(RIG *rig, int(*cfunc)(const struct confparams *, char *), char *data)
call a function against each configuration token of a rig
Definition: conf.c:806
int raw
Definition: rig.h:1171
double freq_t
Frequency type,.
Definition: rig.h:302
Definition: rig.h:128
int rig_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
get the status of the DCD
Definition: rig.c:1963
const char * rigerror(int errnum)
get string describing the error code
Definition: rig.c:285
value_t min
Definition: rig.h:1154
int rig_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
set a radio level extra parameter
Definition: settings.c:606
Definition: rig.h:432
int rig_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code)
set the current encoding DCS code
Definition: tones.c:230
Filter definition.
Definition: rig.h:961
vfo_t tx_vfo
Definition: rig.h:1592
float f
Definition: rig.h:666
int rig_set_vfo(RIG *rig, vfo_t vfo)
set the current VFO
Definition: rig.c:1530
long token_t
configuration token
Definition: rig.h:546
scan_t
Rig Scan operation.
Definition: rig.h:530
int rig_get_mem_all_cb(RIG *rig, chan_cb_t chan_cb, confval_cb_t parm_cb, char *arg)
get all channel and non-channel data by call-back
Definition: mem.c:1381
float step
Definition: rig.h:590
shortfreq_t xit
Definition: rig.h:1024
const char * rig_strlevel(setting_t)
Convert enum RIG_LEVEL_... to alpha string.
Definition: misc.c:641
Definition: rig.h:1098
int rig_model_t
Convenience type definition for rig model.
Definition: riglist.h:603
Definition: rig.h:232
pbwidth_t tx_width
Definition: rig.h:1015
Definition: rig.h:505
Definition: rig.h:456
Definition: rig.h:185
setting_t has_get_level
Definition: rig.h:1246
int low_power
Definition: rig.h:897
int post_write_delay
Definition: rig.h:1240
Definition: rig.h:740
int rig_ext_parm_foreach(RIG *rig, int(*cfunc)(RIG *, const struct confparams *, char *), char *data)
Executes cfunc on all the elements stored in the extparms table.
Definition: ext.c:109
int vid
Definition: rig.h:1504
const char * dflt
Definition: rig.h:584
setting_t has_set_parm
Definition: rig.h:1249
int rig_send_morse(RIG *rig, vfo_t vfo, const char *msg)
send morse code
Definition: rig.c:4253
const char * cs
Definition: rig.h:668
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:3657
shortfreq_t max_ifshift
Definition: rig.h:1558
Definition: rig.h:864
Definition: rig.h:96
rig_port_t port_type
Definition: rig.h:1230
char * dcd_arg
Definition: rig.h:1644
pbwidth_t rig_passband_wide(RIG *rig, rmode_t mode)
get the wide passband of a mode
Definition: rig.c:1477
Definition: rig.h:708
vfo_t vfo
Definition: rig.h:1007
Definition: rig.h:201
Definition: rig.h:702
Definition: rig.h:848
Definition: rig.h:266
Definition: rig.h:103
int rig_set_bank(RIG *rig, vfo_t vfo, int bank)
set the current memory bank
Definition: mem.c:198
int on_value
Definition: rig.h:1514
int rig_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
perform Memory/VFO operations
Definition: rig.c:4047
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:4320
Definition: rig.h:264
int mode_list
Definition: rig.h:1593
Definition: rig.h:681
Definition: rig.h:442
int rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
get the frequency of the target VFO
Definition: rig.c:1132
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:3601
Definition: rig.h:715
rig_parm_e
Rig Parameters.
Definition: rig.h:735
Tuning step definition.
Definition: rig.h:928
dcd_type_t dcd
Definition: rig.h:1466
int pid
Definition: rig.h:1505
Definition: rig.h:263
int rig_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
get the current XIT offset
Definition: rig.c:3251
setting_t rig_has_set_level(RIG *rig, setting_t level)
check settable ability of level settings
Definition: settings.c:329
const char * clone_combo_set
Definition: rig.h:1452
vfo_op_t rig_has_vfo_op(RIG *rig, vfo_op_t op)
check retrieval ability of VFO operations
Definition: rig.c:3920
Definition: rig.h:866
int rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
set PTT on/off
Definition: rig.c:1619
Definition: rig.h:566
const char * rig_strfunc(setting_t)
Convert enum RIG_FUNC_... to alpha string.
Definition: misc.c:545
char * vfo_arg
Definition: rig.h:1640
int rig_set_trn(RIG *rig, int trn)
control the transceive mode
Definition: event.c:706
Frequency range.
Definition: rig.h:893
ann_t announces
Definition: rig.h:1560
Definition: rig.h:108
Definition: rig.h:94
Definition: rig.h:182
int rig_set_conf(RIG *rig, token_t token, const char *val)
set a radio configuration parameter
Definition: conf.c:947
powerstat_t
Radio power state.
Definition: rig.h:470
int rig_set_vfo_callback(RIG *rig, vfo_cb_t cb, char *arg)
set the callback for vfo events
Definition: event.c:585
Definition: rig.h:97
Definition: rig.h:188
ann_t announces
Definition: rig.h:1266
int vfo_list
Definition: rig.h:1582
struct confparams::@10::@11 n
signed long shortfreq_t
Short frequency type.
Definition: rig.h:321
int ant_t
Antenna number.
Definition: rig.h:618
void rig_set_debug(enum rig_debug_level_e debug_level)
Change the current debug level.
Definition: debug.c:116
scan_t scan_ops
Definition: rig.h:1269
setting_t has_get_func
Definition: rig.h:1565
signed int i
Definition: rig.h:665
pbwidth_t current_width
Definition: rig.h:1591
setting_t has_get_parm
Definition: rig.h:1569
Definition: rig.h:236
Definition: rig.h:187
Definition: rig.h:742
int rig_get_ext_parm(RIG *rig, token_t token, value_t *val)
get the value of a parm extra parameter
Definition: settings.c:769
const chan_t * rig_lookup_mem_caps(RIG *rig, int ch)
lookup the memory type and capabilities
Definition: mem.c:1571
freq_t freq
Definition: rig.h:1009
setting_t rig_has_set_func(RIG *rig, setting_t func)
check ability of radio functions
Definition: settings.c:445
chan_type_t rig_parse_mtype(const char *s)
Convert alpha string to enum RIG_MTYPE_...
Definition: misc.c:959
Definition: rig.h:265
union confparams::@10 u
pbwidth_t width
Definition: rig.h:1011
rmode_t mode
Definition: rig.h:1010
Definition: rig.h:539
Definition: rig.h:689
shortfreq_t tuning_step
Definition: rig.h:1022
unsigned int tone_t
CTCSS and DCS type definition.
Definition: rig.h:170
freq_t current_freq
Definition: rig.h:1589
ptt_type_t ptt_type
Definition: rig.h:1228
Definition: rig.h:293
int stop_bits
Definition: rig.h:1488
Definition: rig.h:445
int rig_send_dtmf(RIG *rig, vfo_t vfo, const char *digits)
send DTMF digits
Definition: rig.c:4116
serial_handshake_e
Serial handshake.
Definition: rig.h:209
Definition: rig.h:860
int high_power
Definition: rig.h:898
Definition: rig.h:463
Definition: rig.h:611
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:2548
ptt_type_t ptt
Definition: rig.h:1465
Definition: rig.h:210
shortfreq_t max_rit
Definition: rig.h:1262
Definition: rig.h:688
int rig_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
activate/de-activate functions of radio
Definition: settings.c:476
Definition: rig.h:231
Definition: rig.h:460
shortfreq_t pbwidth_t
Passband width, in Hz.
Definition: rig.h:410
Definition: rig.h:186
Definition: rig.h:189
Channel capability definition.
Definition: rig.h:1048
Definition: rig.h:737
Definition: rig.h:109
Definition: rig.h:867
int rig_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
set CTCSS squelch
Definition: tones.c:362
Definition: rig.h:443
shortfreq_t rig_get_resolution(RIG *rig, rmode_t mode)
get the best frequency resolution of the rig
Definition: rig.c:3715
Channel structure.
Definition: rig.h:1004
Definition: rig.h:233
Definition: rig.h:1101
vfo_op_t
VFO operation.
Definition: rig.h:504
Definition: rig.h:512
rptr_shift_t
Repeater shift type.
Definition: rig.h:281
Definition: rig.h:221
int size
Definition: rig.h:1169
Definition: rig.h:532
int rig_setting2idx(setting_t s)
basically convert setting_t expressed 2^n to n
Definition: settings.c:796
Definition: rig.h:684
Extension attribute definition.
Definition: rig.h:989
Definition: rig.h:418
const struct confparams * rig_ext_lookup_tok(RIG *rig, token_t token)
lookup ext token, return pointer to confparams struct.
Definition: ext.c:195
Definition: rig.h:692
Definition: rig.h:853
int rig_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit)
set the XIT
Definition: rig.c:3183
int rig_set_chan_all(RIG *rig, const channel_t chans[])
set all channel data
Definition: mem.c:1173
int alt
Definition: rig.h:1508
Definition: rig.h:847
setting_t rig_has_get_parm(RIG *rig, setting_t parm)
check retrieval ability of parameter settings
Definition: settings.c:358
Universal approach for passing values.
Definition: rig.h:664
Definition: rig.h:99
Definition: rig.h:567
Definition: rig.h:462
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:2660
Definition: rig.h:698
setting_t has_set_parm
Definition: rig.h:1570
Definition: rig.h:691
Definition: rig.h:507
int retry
Definition: rig.h:1242
int timeout
Definition: rig.h:1241
Definition: rig.h:846
const tone_t * dcs_list
Definition: rig.h:1258
vfo_t current_vfo
Definition: rig.h:1581
Rig data structure.
Definition: rig.h:1219
int rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
get the status of the PTT
Definition: rig.c:1812
int rig_type
Definition: rig.h:1227
void * handle
Definition: rig.h:1470
hamlib_port_t pttport
Definition: rig.h:1539
struct hamlib_port hamlib_port_t
Port definition.
freq_t end
Definition: rig.h:895
int post_write_delay
Definition: rig.h:1473
dcd_type_t
DCD type.
Definition: rig.h:427
int rig_reset(RIG *rig, reset_t reset)
reset the radio
Definition: rig.c:3820
token_t token
Definition: rig.h:990
rmode_t modes
Definition: rig.h:896
setting_t rig_parse_parm(const char *s)
Convert alpha string to RIG_PARM_...
Definition: misc.c:688
Definition: rig.h:235
tone_t dcs_code
Definition: rig.h:1029
char * s
Definition: rig.h:667
setting_t rig_has_set_parm(RIG *rig, setting_t parm)
check settable ability of parameter settings
Definition: settings.c:387
meter_level_e
Level display meters.
Definition: rig.h:647
chan_type_t
Memory channel type definition.
Definition: rig.h:1095
setting_t has_set_level
Definition: rig.h:1568
Definition: rig.h:127
Definition: rig.h:434
Definition: rig.h:687
int channel_num
Definition: rig.h:1005
setting_t rig_has_get_func(RIG *rig, setting_t func)
check ability of radio functions
Definition: settings.c:416
Definition: rig.h:230
rig_status_e
Development status of the backend.
Definition: rig.h:261
Definition: rig.h:184
Definition: rig.h:1102
int rig_set_ext_parm(RIG *rig, token_t token, value_t val)
set a radio parm extra parameter
Definition: settings.c:737
vprintf_cb_t rig_set_debug_callback(vprintf_cb_t cb, char *arg)
set callback to handle debug messages
Definition: debug.c:240
const struct confparams * rig_confparam_lookup(RIG *rig, const char *name)
lookup a confparam struct
Definition: conf.c:860
int value
Definition: rig.h:1515
Definition: rig.h:282
Definition: rig.h:855
int rig_set_mem_all(RIG *rig, const channel_t chans[], const struct confparams cfgps[], const value_t vals[])
set all channel and non-channel data
Definition: mem.c:1446
Definition: rig.h:686
Definition: rig.h:106
Definition: rig.h:697
Definition: rig.h:105
shortfreq_t max_rit
Definition: rig.h:1556
const char * rig_strvfop(vfo_op_t op)
Convert enum RIG_OP_... to alpha string.
Definition: misc.c:791
Definition: rig.h:1100
setting_t rig_parse_level(const char *s)
Convert alpha string to enum RIG_LEVEL_...
Definition: misc.c:616
const tone_t * ctcss_list
Definition: rig.h:1257
Definition: rig.h:483
Definition: rig.h:1103
rmode_t modes
Definition: rig.h:929
Definition: rig.h:239
Definition: rig.h:417
int rig_set_mem(RIG *rig, vfo_t vfo, int ch)
set the current memory channel number
Definition: mem.c:72
int itu_region
Definition: rig.h:1544
int poll_interval
Definition: rig.h:1588
shortfreq_t max_xit
Definition: rig.h:1263
Definition: rig.h:457
Definition: rig.h:638
Definition: rig.h:517
int rig_open(RIG *rig)
open the communication to the rig
Definition: rig.c:519
Definition: rig.h:606
int serial_data_bits
Definition: rig.h:1234
int rig_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code)
get the current DCS code
Definition: tones.c:553
const char * rig_strmtype(chan_type_t mtype)
Convert enum RIG_MTYPE_... to alpha string.
Definition: misc.c:984
agc_level_e
AGC delay settings.
Definition: rig.h:633
int transmit
Definition: rig.h:1594
Definition: rig.h:508
Definition: rig.h:850
Definition: rig.h:485
Rig state containing live data and customized fields.
Definition: rig.h:1534
Definition: rig.h:862
Definition: rig.h:430
shortfreq_t rit
Definition: rig.h:1023
int hold_decode
Definition: rig.h:1580
Definition: rig.h:510
Definition: rig.h:610
Definition: rig.h:98
int transceive
Definition: rig.h:1587
Definition: rig.h:484
Definition: rig.h:130
Definition: rig.h:537
Definition: rig.h:695
Definition: rig.h:471
ann_t
Announce.
Definition: rig.h:604
const char * rig_strparm(setting_t)
Convert enum RIG_PARM_... to alpha string.
Definition: misc.c:713
int rig_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
get the current repeater shift
Definition: rig.c:2132
rig_level_e
Rig Level Settings.
Definition: rig.h:680
int rig_cleanup(RIG *rig)
release a rig handle and free associated memory
Definition: rig.c:1004
RIG * rig_init(rig_model_t rig_model)
allocate a new RIG handle
Definition: rig.c:310
int chan_desc_sz
Definition: rig.h:1274
Definition: rig.h:569
pbwidth_t rig_passband_normal(RIG *rig, rmode_t mode)
get the normal passband of a mode
Definition: rig.c:1385
Definition: rig.h:107
Definition: rig.h:237
Definition: rig.h:685
dcd_type_t dcd_type
Definition: rig.h:1229
int rig_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
set the repeater shift
Definition: rig.c:2064
Definition: rig.h:179
int serial_stop_bits
Definition: rig.h:1235
int pin
Definition: rig.h:1496
Definition: rig.h:283
char * product
Definition: rig.h:1510
setting_t has_set_level
Definition: rig.h:1247
char * ptt_arg
Definition: rig.h:1642
int rig_set_pltune_callback(RIG *rig, pltune_cb_t cb, char *arg)
set the callback for pipelined tuning module
Definition: event.c:677
const char * name
Definition: rig.h:581
int scan_group
Definition: rig.h:1031
rig_port_t rig
Definition: rig.h:1464
Definition: rig.h:711
int rig_ext_level_foreach(RIG *rig, int(*cfunc)(RIG *, const struct confparams *, char *), char *data)
Executes cfunc on all the elements stored in the extlevels table.
Definition: ext.c:63
Definition: rig.h:682
int rig_set_parm(RIG *rig, setting_t parm, value_t val)
set a radio parameter
Definition: settings.c:232
Definition: rig.h:183
cal_table_t str_cal
Definition: rig.h:1286
reset_t
Reset operation.
Definition: rig.h:480
int rig_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs)
get the current repeater offset
Definition: rig.c:2268
Definition: rig.h:110
Definition: rig.h:200
setting_t rig_parse_func(const char *s)
Convert alpha string to enum RIG_FUNC_...
Definition: misc.c:520
Definition: rig.h:714
rig_errcode_e
Hamlib error codes Error code definition that can be returned by the Hamlib functions. Unless stated otherwise, Hamlib functions return the negative value of rig_errcode_e definitions in case of error, or 0 when successful.
Definition: rig.h:92
Definition: rig.h:705
int rate
Definition: rig.h:1486
Definition: rig.h:736
token_t token
Definition: rig.h:580
Definition: rig.h:851
int rig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
get the mode of the target VFO
Definition: rig.c:1301
Hamlib rig(radio) model definitions.
rig_conf_e
parameter types
Definition: rig.h:565
Definition: rig.h:511
const char * mfg_name
Definition: rig.h:1222
freq_t start
Definition: rig.h:894
int rig_get_ant(RIG *rig, vfo_t vfo, ant_t *ant)
get the current antenna
Definition: rig.c:3527
const char * copyright
Definition: rig.h:1224
enum rig_port_e rig_port_t
Port type.
setting_t levels
Definition: rig.h:1068
rmode_t tx_mode
Definition: rig.h:1014
const char * rig_strstatus(enum rig_status_e status)
Convert enum RIG_STATUS_... to printable string.
Definition: misc.c:284
int rig_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
set the current DCS code
Definition: tones.c:491
const char * model_name
Definition: rig.h:1221
ptt_type_t
PTT type.
Definition: rig.h:454
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:2839
Definition: rig.h:568
setting_t funcs
Definition: rig.h:1025
Definition: rig.h:222
int rig_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length)
receive DTMF digits
Definition: rig.c:4185
Calibration table struct.
Definition: rig.h:1168
Definition: rig.h:608
Definition: rig.h:93
serial_parity_e
Serial parity.
Definition: rig.h:197
int rig_set_mode_callback(RIG *rig, mode_cb_t cb, char *arg)
set the callback for mode events
Definition: event.c:555
const char * hamlib_copyright2
Hamlib copyright notice.
Definition: rig.c:90
int rig_get_parm(RIG *rig, setting_t parm, value_t *val)
get the value of a parameter
Definition: settings.c:266
int ptt_bitnum
Definition: rig.h:1500
Definition: rig.h:506
Definition: rig.h:861
tone_t ctcss_tone
Definition: rig.h:1027
value_t val
Definition: rig.h:991
setting_t has_get_level
Definition: rig.h:1567
Definition: rig.h:102
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:2973
int end
Definition: rig.h:1122
rmode_t
Radio mode.
Definition: rig.h:845
rmode_t rig_parse_mode(const char *s)
Convert alpha string to enum RIG_MODE.
Definition: misc.c:348
Definition: rig.h:240
int rig_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone)
get the current CTCSS squelch
Definition: tones.c:429
shortfreq_t ts
Definition: rig.h:930
Definition: rig.h:605
hamlib_port_t rigport
Definition: rig.h:1538
rig_model_t rig_model
Definition: rig.h:1220
rptr_shift_t rig_parse_rptr_shift(const char *s)
Convert alpha char to enum RIG_RPT_SHIFT_...
Definition: misc.c:916
Definition: rig.h:683
int rig_get_chan_all_cb(RIG *rig, chan_cb_t chan_cb, char *arg)
get all channel data, by callback
Definition: mem.c:1133
int serial_rate_min
Definition: rig.h:1232
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:2780
int rig_get_powerstat(RIG *rig, powerstat_t *status)
get the on/off status of the radio
Definition: rig.c:3788
pbwidth_t width
Definition: rig.h:963
int rig_probe_all(hamlib_port_t *port, rig_probe_func_t cfunc, char *data)
try to guess rigs
Definition: rig.c:3889
const char * rig_strrmode(rmode_t mode)
Convert enum RIG_MODE to alpha string.
Definition: misc.c:373
Definition: rig.h:704
int rig_get_trn(RIG *rig, int *trn)
get the current transceive mode
Definition: event.c:853
shortfreq_t max_ifshift
Definition: rig.h:1264
char * pltune_arg
Definition: rig.h:1646
int rig_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
get the current CTCSS sub-tone frequency
Definition: tones.c:167
Definition: rig.h:857
const char * rig_strvfo(vfo_t vfo)
Convert enum RIG_VFO_... to alpha string.
Definition: misc.c:448
Definition: rig.h:538
split_t
Split mode.
Definition: rig.h:291
int rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
set the frequency of the target VFO
Definition: rig.c:1049
chan_type_t type
Definition: rig.h:1123
Definition: rig.h:607
scan_t rig_parse_scan(const char *s)
Convert alpha string to enum RIG_SCAN_...
Definition: misc.c:839
int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
get the current split frequencies
Definition: rig.c:2440
Definition: rig.h:104
Callback functions and args for rig event.
Definition: rig.h:1634
const char * tooltip
Definition: rig.h:583
Definition: rig.h:178
Definition: rig.h:513
Definition: rig.h:444
Definition: rig.h:700
Definition: rig.h:518
int rig_mem_count(RIG *rig)
get memory channel count
Definition: mem.c:1635
int write_delay
Definition: rig.h:1239
Memory channel list definition.
Definition: rig.h:1120
Definition: rig.h:180
Definition: rig.h:865
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:1218
Definition: rig.h:741
level/parm granularity definition
Definition: rig.h:1153
Definition: rig.h:198
rig_model_t rig_probe(hamlib_port_t *port)
try to guess a rig
Definition: rig.c:3859
int transceive
Definition: rig.h:1271
Definition: rig.h:868
shortfreq_t rptr_offs
Definition: rig.h:1021
int rig_set_ant(RIG *rig, vfo_t vfo, ant_t ant)
set the antenna
Definition: rig.c:3459
ptt_t
PTT status.
Definition: rig.h:441
float min
Definition: rig.h:588
vfo_op_t rig_parse_vfo_op(const char *s)
Convert alpha string to enum RIG_OP_...
Definition: misc.c:766
int rig_close(RIG *rig)
close the communication to the rig
Definition: rig.c:857
int bank_num
Definition: rig.h:1006
Definition: rig.h:738
int write_delay
Definition: rig.h:1472
Definition: rig.h:739
int timeout
Definition: rig.h:1479
int rig_set_freq_callback(RIG *rig, freq_cb_t cb, char *arg)
set the callback for freq events
Definition: event.c:525
int start
Definition: rig.h:1121
rmode_t modes
Definition: rig.h:962
struct freq_range_list freq_range_t
Frequency range.
Definition: rig.h:199
Definition: rig.h:131
dcd_e
DCD status.
Definition: rig.h:416
Definition: rig.h:433
vfo_t rig_parse_vfo(const char *s)
Convert alpha string to enum RIG_VFO_...
Definition: misc.c:423
rig_type_t
Rig type flags.
Definition: rig.h:229
int flags
Definition: rig.h:1032
char * freq_arg
Definition: rig.h:1636
Definition: rig.h:515
FILE * rig_set_debug_file(FILE *stream)
change stderr to some different output
Definition: debug.c:255
int vfo_t
VFO definition.
Definition: rig.h:350
int rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
get the value of a level
Definition: settings.c:146
Definition: rig.h:696
token_t rig_token_lookup(RIG *rig, const char *name)
lookup a token id
Definition: conf.c:916
int conf
Definition: rig.h:1506
Definition: rig.h:854
struct rig_caps * caps
Definition: rig.h:1661
Definition: rig.h:1097
Definition: rig.h:428
Definition: rig.h:514
int rig_need_debug(enum rig_debug_level_e debug_level)
Useful for dump_hex, etc.
Definition: debug.c:126
Definition: rig.h:461
enum rig_conf_e type
Definition: rig.h:585
Definition: rig.h:129
vfo_t vfo
Definition: rig.h:899
Definition: rig.h:101
int rig_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code)
get the current encoding DCS code
Definition: tones.c:292
int data_bits
Definition: rig.h:1487
The Rig structure.
Definition: rig.h:1660
const char * rig_strptrshift(rptr_shift_t)
convert enum RIG_RPT_SHIFT_... to printable character
Definition: misc.c:891
freq_t tx_freq
Definition: rig.h:1013
const struct confparams * cfgparams
Definition: rig.h:1288
vfo_t tx_vfo
Definition: rig.h:1018
Definition: rig.h:858
Definition: rig.h:516
Definition: rig.h:703
Definition: rig.h:212
int rig_get_chan_all(RIG *rig, channel_t chans[])
get all channel data
Definition: mem.c:1215
int rig_set_mem_all_cb(RIG *rig, chan_cb_t chan_cb, confval_cb_t parm_cb, char *arg)
set all channel and non-channel data by call-back
Definition: mem.c:1314
Definition: rig.h:458
Definition: rig.h:100
tone_t dcs_sql
Definition: rig.h:1030
Definition: rig.h:1099
int rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
set a radio level setting
Definition: settings.c:76
int rig_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
get the value of a level extra parameter
Definition: settings.c:672
cal_table_t str_cal
Definition: rig.h:1552
Definition: rig.h:609
int iface
Definition: rig.h:1507
int retry
Definition: rig.h:1480
Definition: rig.h:534
const struct confparams * extlevels
Definition: rig.h:1255
Definition: rig.h:535
Definition: rig.h:570
split_t split
Definition: rig.h:1017
int rig_get_mem_all(RIG *rig, channel_t chans[], const struct confparams cfgps[], value_t vals[])
get all channel and non-channel data
Definition: mem.c:1513
Definition: rig.h:262
enum dcd_e dcd_t
DCD status.
Definition: rig.h:95
int targetable_vfo
Definition: rig.h:1270
serial_control_state_e
Serial control state.
Definition: rig.h:219
Definition: rig.h:706
Definition: rig.h:284
Definition: rig.h:693
Definition: rig.h:852
pbwidth_t rig_passband_narrow(RIG *rig, rmode_t mode)
get the narrow passband of a mode
Definition: rig.c:1425
int rig_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
perform Memory/VFO operations
Definition: rig.c:3948
shortfreq_t max_xit
Definition: rig.h:1557
Definition: rig.h:509
Definition: rig.h:220
Definition: rig.h:234
const char * combostr[8]
Definition: rig.h:593
Definition: rig.h:712
int serial_rate_max
Definition: rig.h:1233
int rig_set_dcd_callback(RIG *rig, dcd_cb_t cb, char *arg)
set the callback for dcd events
Definition: event.c:645
Port definition.
Definition: rig.h:1462
value_t max
Definition: rig.h:1155
Definition: rig.h:694
int rig_set_chan_all_cb(RIG *rig, chan_cb_t chan_cb, char *arg)
set all channel data, by callback
Definition: mem.c:1087
setting_t has_get_func
Definition: rig.h:1244
int rig_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts)
get the current Tuning Step
Definition: rig.c:3387
Definition: rig.h:472
Definition: rig.h:482
int bank_qty
Definition: rig.h:1273
const char * rig_strscan(scan_t scan)
Convert enum RIG_SCAN_... to alpha string.
Definition: misc.c:864
int rig_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
set the split mode
Definition: rig.c:2888
int rig_set_powerstat(RIG *rig, powerstat_t status)
turn on/off the radio
Definition: rig.c:3756
int ant
Definition: rig.h:1008
Definition: rig.h:211
setting_t has_set_func
Definition: rig.h:1245
Configuration parameter structure.
Definition: rig.h:579
tone_t ctcss_sql
Definition: rig.h:1028
int rig_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
set the Tuning Step
Definition: rig.c:3319
Definition: rig.h:177
Definition: rig.h:190
int rig_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
set the repeater offset
Definition: rig.c:2200
int rig_set_channel(RIG *rig, const channel_t *chan)
set channel data
Definition: mem.c:683
Definition: rig.h:531
Definition: rig.h:202
Definition: rig.h:690
const char * label
Definition: rig.h:582
int val
Definition: rig.h:1172
int rig_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
set the RIT
Definition: rig.c:3047
vfo_op_t vfo_ops
Definition: rig.h:1268
Definition: rig.h:701
Definition: rig.h:455
Definition: rig.h:713
ant_t ant
Definition: rig.h:900
struct confparams::@10::@12 c
int rig_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
set CTCSS sub-tone frequency
Definition: tones.c:100
rig_port_e
Port type.
Definition: rig.h:176
int rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
set the split frequencies
Definition: rig.c:2336
Definition: rig.h:181
Definition: rig.h:132
hamlib_port_t dcdport
Definition: rig.h:1540
channel_cap_t mem_caps
Definition: rig.h:1125
int rig_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
get the current RIT offset
Definition: rig.c:3115
Definition: rig.h:859
setting_t has_get_parm
Definition: rig.h:1248
Definition: rig.h:431
int rig_get_channel(RIG *rig, channel_t *chan)
get channel data
Definition: mem.c:835
int rig_set_ptt_callback(RIG *rig, ptt_cb_t cb, char *arg)
set the callback for ptt events
Definition: event.c:615
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:155
int comm_state
Definition: rig.h:1583
const char * rig_get_info(RIG *rig)
get general information from the radio
Definition: rig.c:4357
Definition: rig.h:1096
float max
Definition: rig.h:589
int rig_get_vfo(RIG *rig, vfo_t *vfo)
get the current VFO
Definition: rig.c:1575
void rig_debug(enum rig_debug_level_e debug_level, const char *fmt,...)
Default is debugging messages are done through stderr.
Definition: debug.c:137
const struct confparams * extparms
Definition: rig.h:1254
rmode_t current_mode
Definition: rig.h:1590
const char * clone_combo_get
Definition: rig.h:1453
Definition: rig.h:459
char * mode_arg
Definition: rig.h:1638
const char * version
Definition: rig.h:1223
char * vendor_name
Definition: rig.h:1509
Definition: rig.h:856
Definition: rig.h:238
rptr_shift_t rptr_shift
Definition: rig.h:1020
Definition: rig.h:536
double vfo_comp
Definition: rig.h:1542
Definition: rig.h:707
Definition: rig.h:533

Generated by doxygen 1.8.12

Hamlib documentation for version 3.2 -- Sun May 20 2018 13:24:23
Project page: http://www.hamlib.org