Loading...
Searching...
No Matches
rig.h
Go to the documentation of this file.
/*
* Hamlib Interface - API header
* Copyright (c) 2000-2003 by Frank Singleton
* Copyright (c) 2000-2012 by Stephane Fillod
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#ifndef _RIG_H
#define _RIG_H 1
// as of 2023-11-23 rig_caps is no longer constant
// this #define allows clients to test which declaration to use for backwards compatibility
// As of 2025-01-03 removing this -- fldigi was the only one that got it right
// riglist_foreach is now constant again but others are not
// #define RIGCAPS_NOT_CONST 1
#define BUILTINFUNC 0
// Our shared secret password
#define HAMLIB_SECRET_LENGTH 32
#define HAMLIB_TRACE rig_debug(RIG_DEBUG_TRACE,"%s%s(%d) trace\n",hl_stars(STATE(rig)->depth), __FILE__, __LINE__)
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <inttypes.h>
#include <time.h>
// to stop warnings about including winsock2.h before windows.h
#if defined(_WIN32)
#include <winsock2.h>
#include <windows.h>
#include <ws2tcpip.h>
#else
//#include <sys/socket.h> // doesn't seem we need this
#include <netinet/in.h>
//#include <arpa/inet.h>
#endif
// mingw64 still shows __TIMESIZE != 64
// need to do more testing
#if 0
#if __TIMESIZE != 64
#warning TIMESIZE != 64 -- Please report your OS system to hamlib-developer@lists.sourceforge.net
#endif
#endif
// For MSVC install the NUGet pthread package
#if defined(_MSC_VER)
#define HAVE_STRUCT_TIMESPEC
#endif
#include <pthread.h>
/* Rig list is in a separate file so as not to mess up w/ this one */
#include <hamlib/riglist.h>
//#include <hamlib/config.h>
/* Define macros for handling attributes, if the compiler implements them
* Should be available in c23-capable compilers, or c++11 ones
*/
// From ISO/IEC 9899:202y n3301 working draft
#ifndef __has_c_attribute
#define __has_c_attribute(x) 0
#endif
// Macro to mark fallthrough as OK
// Squelch warnings if -Wimplicit-fallthrough added to CFLAGS
#if __has_c_attribute(fallthrough)
#define HL_FALLTHROUGH [[fallthrough]];
#else
/* Fall back to nothing */
#define HL_FALLTHROUGH
#endif
// Macro to mark function or variable as deprecated/obsolete
#if __has_c_attribute(deprecated)
#define HL_DEPRECATED [[deprecated]]
#else
// Make it vanish
#define HL_DEPRECATED
#endif
/* __BEGIN_DECLS should be used at the beginning of your declarations,
* so that C++ compilers don't mangle their names. Use __END_DECLS at
* the end of C declarations. */
#undef __BEGIN_DECLS
#undef __END_DECLS
#ifdef __cplusplus
# define __BEGIN_DECLS extern "C" {
# define __END_DECLS }
#else
# define __BEGIN_DECLS /* empty */
# define __END_DECLS /* empty */
#endif
/* HAMLIB_PARAMS is a macro used to wrap function prototypes, so that compilers
* that don't understand ANSI C prototypes still work, and ANSI C
* compilers can issue warnings about type mismatches. */
#undef HAMLIB_PARAMS
#if defined (__STDC__) \
|| defined (_AIX) \
|| (defined (__mips) && defined (_SYSTYPE_SVR4)) \
|| defined(__CYGWIN__) \
|| defined(_WIN32) \
|| defined(__cplusplus)
# define HAMLIB_PARAMS(protos) protos
# define rig_ptr_t void *
# define amp_ptr_t void *
#else
# define HAMLIB_PARAMS(protos) ()
# define rig_ptr_t char *
# define amp_ptr_t char *
#endif
#include <hamlib/rig_dll.h>
#ifndef SWIGLUA
#define CONSTANT_64BIT_FLAG(BIT) (1ull << (BIT))
#else
/* SWIG's older Lua generator doesn't grok ull due to Lua using a
double-precision floating point type internally for number
representations (max 53 bits of precision) so makes a string
constant from a constant number literal using ull */
// #define CONSTANT_64BIT_FLAG(BIT) (1 << (BIT))
// #define SWIGLUAHIDE
/* But this appears to have been fixed so we'll use the correct one now
If you have the older version of SWIG comment out this line and use
the two above */
// This 1ul definition works on swig 4.0.1 and lua 5.3.5
#define CONSTANT_64BIT_FLAG(BIT) (1ul << (BIT))
#endif
__BEGIN_DECLS
// cookie is 26-char time code plus 10-char (2^31-1) random number
#define HAMLIB_COOKIE_SIZE 37
extern int cookie_use; // this is global as once one client requests it everybody needs to honor it
extern int skip_init; // allow rigctl to skip any radio commands at startup
extern HAMLIB_EXPORT_VAR(const char) hamlib_version[];
extern HAMLIB_EXPORT_VAR(const char) hamlib_copyright[];
extern HAMLIB_EXPORT_VAR(const char *) hamlib_version2;
extern HAMLIB_EXPORT_VAR(const char *) hamlib_copyright2;
enum rig_errcode_e {
RIG_OK = 0,
RIG_EINVAL,
RIG_ECONF,
RIG_ENOMEM,
RIG_ENIMPL,
RIG_ETIMEOUT,
RIG_EIO,
RIG_EINTERNAL,
RIG_EPROTO,
RIG_ERJCTED,
RIG_ETRUNC,
RIG_ENAVAIL,
RIG_ENTARGET,
RIG_BUSERROR,
RIG_BUSBUSY,
RIG_EARG,
RIG_EVFO,
RIG_EDOM,
RIG_EDEPRECATED,
RIG_ESECURITY,
RIG_EPOWER,
RIG_ELIMIT,
RIG_EACCESS,
RIG_EEND // MUST BE LAST ITEM IN LAST
};
#define RIG_IS_SOFT_ERRCODE(errcode) (errcode == -RIG_EINVAL || errcode == -RIG_ENIMPL || errcode == -RIG_ERJCTED \
|| errcode == -RIG_ETRUNC || errcode == -RIG_ENAVAIL || errcode == -RIG_ENTARGET \
|| errcode == -RIG_EVFO || errcode == -RIG_EDOM || errcode == -RIG_EDEPRECATED \
|| errcode == -RIG_ESECURITY || errcode == -RIG_EPOWER)
#define NETRIGCTL_RET "RPRT "
enum rig_debug_level_e {
RIG_DEBUG_NONE = 0,
RIG_DEBUG_BUG,
RIG_DEBUG_ERR,
RIG_DEBUG_WARN,
RIG_DEBUG_VERBOSE,
RIG_DEBUG_TRACE,
RIG_DEBUG_CACHE
};
/* --------------- Rig capabilities -----------------*/
/* Forward struct references
* may also include structures defined elsewhere,
* but pointed to by rig
*/
struct rig;
struct rig_state;
struct rig_cache;
struct hamlib_port;
typedef struct hamlib_port hamlib_port_t;
//---Start cut here---
struct hamlib_port_deprecated;
typedef struct hamlib_port_deprecated hamlib_port_t_deprecated;
//---End cut here---
typedef struct s_rig RIG;
#define HAMLIB_RIGNAMSIZ 30
#define HAMLIB_RIGVERSIZ 8
#define HAMLIB_FILPATHLEN 512
/* Debian: Hamlib 4.3 drops FILPATHLEN, restore until all rdeps have been updated */
#define FILPATHLEN HAMLIB_FILPATHLEN
#define HAMLIB_FRQRANGESIZ 30
#define HAMLIB_MAXCHANDESC 30 /* describe channel eg: "WWV 5 MHz" */
#define HAMLIB_TSLSTSIZ 20 /* max tuning step list size, zero ended */
#define HAMLIB_FLTLSTSIZ 60 /* max mode/filter list size, zero ended */
#define HAMLIB_MAXDBLSTSIZ 8 /* max preamp/att levels supported, zero ended */
#define HAMLIB_CHANLSTSIZ 16 /* max mem_list size, zero ended */
#define HAMLIB_MAX_AGC_LEVELS 8 /* max AGC levels supported */
#define HAMLIB_MAX_SPECTRUM_SCOPES 4 /* max number of spectrum scopes supported */
#define HAMLIB_MAX_SPECTRUM_MODES 5 /* max number of spectrum modes supported */
#define HAMLIB_MAX_SPECTRUM_AVG_MODES 12 /* max number of spectrum averaging modes supported */
#define HAMLIB_MAX_SPECTRUM_SPANS 20 /* max number of spectrum modes supported */
#define HAMLIB_MAX_SPECTRUM_DATA 2048 /* max number of data bytes in a single spectrum line */
#define HAMLIB_MAX_CAL_LENGTH 32 /* max calibration plots in cal_table_t */
#define HAMLIB_MAX_MODES 63
#define HAMLIB_MAX_VFOS 31
#define HAMLIB_MAX_ROTORS 31
#define HAMLIB_MAX_VFO_OPS 31
#define HAMLIB_MAX_RSCANS 31
#define HAMLIB_MAX_SNAPSHOT_PACKET_SIZE 16384 /* maximum number of bytes in a UDP snapshot packet */
typedef unsigned int tone_t;
#define CTCSS_LIST_SIZE 60
#define DCS_LIST_SIZE 128
typedef enum rig_port_e {
RIG_PORT_NONE = 0,
RIG_PORT_SERIAL,
RIG_PORT_NETWORK,
RIG_PORT_DEVICE,
RIG_PORT_PACKET,
RIG_PORT_DTMF,
RIG_PORT_ULTRA,
RIG_PORT_RPC,
RIG_PORT_PARALLEL,
RIG_PORT_USB,
RIG_PORT_UDP_NETWORK,
RIG_PORT_CM108,
RIG_PORT_GPIO,
RIG_PORT_GPION,
} rig_port_t;
enum serial_parity_e {
RIG_PARITY_NONE = 0,
RIG_PARITY_ODD,
RIG_PARITY_EVEN,
RIG_PARITY_MARK,
RIG_PARITY_SPACE
};
enum serial_handshake_e {
RIG_HANDSHAKE_NONE = 0,
RIG_HANDSHAKE_XONXOFF,
RIG_HANDSHAKE_HARDWARE
};
enum serial_control_state_e {
RIG_SIGNAL_UNSET = 0,
RIG_SIGNAL_ON,
RIG_SIGNAL_OFF
};
typedef enum {
RIG_FLAG_RECEIVER = (1 << 1),
RIG_FLAG_TRANSMITTER = (1 << 2),
RIG_FLAG_SCANNER = (1 << 3),
RIG_FLAG_MOBILE = (1 << 4),
RIG_FLAG_HANDHELD = (1 << 5),
RIG_FLAG_COMPUTER = (1 << 6),
RIG_FLAG_TRUNKING = (1 << 7),
RIG_FLAG_APRS = (1 << 8),
RIG_FLAG_TNC = (1 << 9),
RIG_FLAG_DXCLUSTER = (1 << 10),
RIG_FLAG_TUNER = (1 << 11)
} rig_type_t;
/* TODO: kill me, and replace by real AGC delay */
enum agc_level_e {
RIG_AGC_OFF = 0,
RIG_AGC_SUPERFAST,
RIG_AGC_FAST,
RIG_AGC_SLOW,
RIG_AGC_USER,
RIG_AGC_MEDIUM,
RIG_AGC_AUTO,
RIG_AGC_LONG,
RIG_AGC_ON,
RIG_AGC_NONE
};
#define RIG_FLAG_TRANSCEIVER (RIG_FLAG_RECEIVER|RIG_FLAG_TRANSMITTER)
#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)
#define RIG_TYPE_OTHER 0
#define RIG_TYPE_TRANSCEIVER RIG_FLAG_TRANSCEIVER
#define RIG_TYPE_HANDHELD (RIG_FLAG_TRANSCEIVER|RIG_FLAG_HANDHELD)
#define RIG_TYPE_MOBILE (RIG_FLAG_TRANSCEIVER|RIG_FLAG_MOBILE)
#define RIG_TYPE_RECEIVER RIG_FLAG_RECEIVER
#define RIG_TYPE_PCRECEIVER (RIG_FLAG_COMPUTER|RIG_FLAG_RECEIVER)
#define RIG_TYPE_SCANNER (RIG_FLAG_SCANNER|RIG_FLAG_RECEIVER)
#define RIG_TYPE_TRUNKSCANNER (RIG_TYPE_SCANNER|RIG_FLAG_TRUNKING)
#define RIG_TYPE_COMPUTER (RIG_FLAG_TRANSCEIVER|RIG_FLAG_COMPUTER)
#define RIG_TYPE_TUNER RIG_FLAG_TUNER
enum rig_status_e {
RIG_STATUS_ALPHA = 0,
RIG_STATUS_UNTESTED,
RIG_STATUS_BETA,
RIG_STATUS_STABLE,
RIG_STATUS_BUGGY
/* RIG_STATUS_NEW * *!< Initial release of code
* !! Use of RIG_STATUS_NEW is deprecated. Do not use it anymore */
};
#define RIG_STATUS_NEW RIG_STATUS_UNTESTED
typedef enum {
RIG_RPT_SHIFT_NONE = 0,
RIG_RPT_SHIFT_MINUS,
RIG_RPT_SHIFT_PLUS
} rptr_shift_t;
typedef enum {
RIG_SPLIT_OFF = 0,
RIG_SPLIT_ON,
} split_t;
typedef double freq_t;
#define PRIfreq ".0f"
#define SCNfreq "lf"
#define FREQFMT SCNfreq
typedef signed long shortfreq_t;
#define Hz(f) ((freq_t)(f))
#define kHz(f) ((freq_t)((f)*(freq_t)1000))
#define MHz(f) ((freq_t)((f)*(freq_t)1000000))
#define GHz(f) ((freq_t)((f)*(freq_t)1000000000))
#define s_Hz(f) ((shortfreq_t)(f))
#define s_kHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000))
#define s_MHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000))
#define s_GHz(f) ((shortfreq_t)((f)*(shortfreq_t)1000000000))
#define RIG_FREQ_NONE Hz(0)
typedef unsigned int vfo_t;
#define RIG_VFO_N(n) (1u<<(n))
#define RIG_VFO_NONE 0
#define RIG_VFO_A RIG_VFO_N(0)
#define RIG_VFO_B RIG_VFO_N(1)
#define RIG_VFO_C RIG_VFO_N(2)
// Any addition VFOS need to go from 3-20
// To maintain backward compatibility these values cannot change
#define RIG_VFO_SUB_A RIG_VFO_N(21)
#define RIG_VFO_SUB_B RIG_VFO_N(22)
#define RIG_VFO_SUB_C RIG_VFO_N(3)
#define RIG_VFO_MAIN_A RIG_VFO_N(23)
#define RIG_VFO_MAIN_B RIG_VFO_N(24)
#define RIG_VFO_MAIN_C RIG_VFO_N(4)
#define RIG_VFO_OTHER RIG_VFO_N(5)
#define RIG_VFO_SUB RIG_VFO_N(25)
#define RIG_VFO_MAIN RIG_VFO_N(26)
#define RIG_VFO_VFO RIG_VFO_N(27)
#define RIG_VFO_MEM RIG_VFO_N(28)
#define RIG_VFO_CURR RIG_VFO_N(29)
#define RIG_VFO_TX_FLAG RIG_VFO_N(30)
#define RIG_VFO_ALL RIG_VFO_N(31)
// we can also use RIG_VFO_N(31) if needed
// Misc VFO Macros
#define RIG_VFO_TX_VFO(v) ((v)|RIG_VFO_TX_FLAG)
#define RIG_VFO_TX RIG_VFO_TX_VFO(RIG_VFO_CURR)
#define RIG_VFO_RX RIG_VFO_CURR
/*
* targetable bitfields, for internal use.
* In rig.c lack of a flag will cause a VFO change if needed
* So setting this flag will mean the backend handles any VFO needs
* For many rigs RITXIT, PTT, MEM, and BANK are non-VFO commands so need these flags to avoid unnecessary VFO swapping
*/
#define RIG_TARGETABLE_NONE 0
#define RIG_TARGETABLE_FREQ (1<<0)
#define RIG_TARGETABLE_MODE (1<<1) // mode by vfo or same mode on both vfos
#define RIG_TARGETABLE_PURE (1<<2) // deprecated -- not used -- reuse it
#define RIG_TARGETABLE_TONE (1<<3)
#define RIG_TARGETABLE_FUNC (1<<4)
#define RIG_TARGETABLE_LEVEL (1<<5)
#define RIG_TARGETABLE_RITXIT (1<<6)
#define RIG_TARGETABLE_PTT (1<<7)
#define RIG_TARGETABLE_MEM (1<<8)
#define RIG_TARGETABLE_BANK (1<<9)
#define RIG_TARGETABLE_ANT (1<<10)
#define RIG_TARGETABLE_ROOFING (1<<11) // roofing filter targetable by VFO
#define RIG_TARGETABLE_SPECTRUM (1<<12) // spectrum scope targetable by VFO
#define RIG_TARGETABLE_BAND (1<<13) // Band select -- e.g. Yaesu BS command
#define RIG_TARGETABLE_COMMON (RIG_TARGETABLE_RITXIT | RIG_TARGETABLE_PTT | RIG_TARGETABLE_MEM | RIG_TARGETABLE_BANK)
#define RIG_TARGETABLE_ALL 0x7fffffff
//
//
// Newer Icoms like the 9700 and 910 have VFOA/B on both Main & Sub
// Compared to older rigs which have one or the other
// So we need to distinguish between them
#define VFO_HAS_A_B ((STATE(rig)->vfo_list & (RIG_VFO_A|RIG_VFO_B)) == (RIG_VFO_A|RIG_VFO_B))
#define VFO_HAS_MAIN_SUB ((STATE(rig)->vfo_list & (RIG_VFO_MAIN|RIG_VFO_SUB)) == (RIG_VFO_MAIN|RIG_VFO_SUB))
#define VFO_HAS_MAIN_SUB_ONLY ((!VFO_HAS_A_B) & VFO_HAS_MAIN_SUB)
#define VFO_HAS_MAIN_SUB_A_B_ONLY (VFO_HAS_A_B & VFO_HAS_MAIN_SUB)
#define VFO_HAS_A_B_ONLY (VFO_HAS_A_B & (!VFO_HAS_MAIN_SUB))
#define VFO_DUAL (RIG_VFO_MAIN_A|RIG_VFO_MAIN_B|RIG_VFO_SUB_A|RIG_VFO_SUB_B)
#define VFO_HAS_DUAL ((STATE(rig)->vfo_list & VFO_DUAL) == VFO_DUAL)
#define RIG_PASSBAND_NORMAL s_Hz(0)
#define RIG_PASSBAND_NOCHANGE s_Hz(-1)
typedef shortfreq_t pbwidth_t;
typedef float agc_time_t;
typedef enum dcd_e {
RIG_DCD_OFF = 0,
RIG_DCD_ON
} dcd_t;
typedef enum dcd_type_e {
RIG_DCD_NONE = 0,
RIG_DCD_RIG,
RIG_DCD_SERIAL_DSR,
RIG_DCD_SERIAL_CTS,
RIG_DCD_SERIAL_CAR,
RIG_DCD_PARALLEL,
RIG_DCD_CM108,
RIG_DCD_GPIO,
RIG_DCD_GPION,
} dcd_type_t;
typedef enum {
RIG_PTT_OFF = 0,
RIG_PTT_ON,
RIG_PTT_ON_MIC,
RIG_PTT_ON_DATA
} ptt_t;
typedef enum ptt_type_e {
RIG_PTT_NONE = 0,
RIG_PTT_RIG,
RIG_PTT_SERIAL_DTR,
RIG_PTT_SERIAL_RTS,
RIG_PTT_PARALLEL,
RIG_PTT_RIG_MICDATA,
RIG_PTT_CM108,
RIG_PTT_GPIO,
RIG_PTT_GPION,
} ptt_type_t;
typedef enum {
RIG_POWER_OFF = 0,
RIG_POWER_ON = (1 << 0),
RIG_POWER_STANDBY = (1 << 1),
RIG_POWER_OPERATE = (1 << 2),
RIG_POWER_UNKNOWN = (1 << 3)
} powerstat_t;
typedef enum {
RIG_RESET_NONE = 0,
RIG_RESET_SOFT = (1 << 0),
RIG_RESET_VFO = (1 << 1),
RIG_RESET_MCALL = (1 << 2),
RIG_RESET_MASTER = (1 << 3)
} reset_t;
typedef enum client_e {
RIG_CLIENT_UNKNOWN,
RIG_CLIENT_WSJTX,
RIG_CLIENT_GPREDICT
} client_t;
typedef enum {
RIG_OP_NONE = 0,
RIG_OP_CPY = (1 << 0),
RIG_OP_XCHG = (1 << 1),
RIG_OP_FROM_VFO = (1 << 2),
RIG_OP_TO_VFO = (1 << 3),
RIG_OP_MCL = (1 << 4),
RIG_OP_UP = (1 << 5),
RIG_OP_DOWN = (1 << 6),
RIG_OP_BAND_UP = (1 << 7),
RIG_OP_BAND_DOWN = (1 << 8),
RIG_OP_LEFT = (1 << 9),
RIG_OP_RIGHT = (1 << 10),
RIG_OP_TUNE = (1 << 11),
RIG_OP_TOGGLE = (1 << 12)
} vfo_op_t;
typedef enum { // numbers here reflect the Yaesu values
RIG_BAND_160M = 0,
RIG_BAND_80M = 1,
RIG_BAND_60M = 2,
RIG_BAND_40M = 3,
RIG_BAND_30M = 4,
RIG_BAND_20M = 5,
RIG_BAND_17M = 6,
RIG_BAND_15M = 7,
RIG_BAND_12M = 8,
RIG_BAND_10M = 9,
RIG_BAND_6M = 10,
RIG_BAND_GEN = 11,
RIG_BAND_MW = 12,
RIG_BAND_UNUSED = 13,
RIG_BAND_AIR = 14,
RIG_BAND_144MHZ = 15,
RIG_BAND_430MHZ = 16,
} hamlib_band_t;
typedef enum { // numbers here reflect generic values -- need to map to rig values
RIG_BANDSELECT_UNUSED = CONSTANT_64BIT_FLAG(0),
RIG_BANDSELECT_2200M = CONSTANT_64BIT_FLAG(1),
RIG_BANDSELECT_600M = CONSTANT_64BIT_FLAG(2),
RIG_BANDSELECT_160M = CONSTANT_64BIT_FLAG(3),
RIG_BANDSELECT_80M = CONSTANT_64BIT_FLAG(4),
RIG_BANDSELECT_60M = CONSTANT_64BIT_FLAG(5),
RIG_BANDSELECT_40M = CONSTANT_64BIT_FLAG(6),
RIG_BANDSELECT_30M = CONSTANT_64BIT_FLAG(7),
RIG_BANDSELECT_20M = CONSTANT_64BIT_FLAG(8),
RIG_BANDSELECT_17M = CONSTANT_64BIT_FLAG(9),
RIG_BANDSELECT_15M = CONSTANT_64BIT_FLAG(10),
RIG_BANDSELECT_12M = CONSTANT_64BIT_FLAG(11),
RIG_BANDSELECT_10M = CONSTANT_64BIT_FLAG(12),
RIG_BANDSELECT_6M = CONSTANT_64BIT_FLAG(13),
RIG_BANDSELECT_WFM = CONSTANT_64BIT_FLAG(14),
RIG_BANDSELECT_GEN = CONSTANT_64BIT_FLAG(15),
RIG_BANDSELECT_MW = CONSTANT_64BIT_FLAG(16),
RIG_BANDSELECT_AIR = CONSTANT_64BIT_FLAG(17),
RIG_BANDSELECT_4M = CONSTANT_64BIT_FLAG(18),
RIG_BANDSELECT_2M = CONSTANT_64BIT_FLAG(19),
RIG_BANDSELECT_1_25M = CONSTANT_64BIT_FLAG(20),
RIG_BANDSELECT_70CM = CONSTANT_64BIT_FLAG(21),
RIG_BANDSELECT_33CM = CONSTANT_64BIT_FLAG(22),
RIG_BANDSELECT_23CM = CONSTANT_64BIT_FLAG(23),
RIG_BANDSELECT_13CM = CONSTANT_64BIT_FLAG(24),
RIG_BANDSELECT_9CM = CONSTANT_64BIT_FLAG(25),
RIG_BANDSELECT_5CM = CONSTANT_64BIT_FLAG(26),
RIG_BANDSELECT_3CM = CONSTANT_64BIT_FLAG(27),
} hamlib_bandselect_t;
#define RIG_BANDSELECT_ALL
#define RIG_BANDSELECT_LF (RIG_BANDSELECT_2200M | RIG_BANDSELECT_600M)
#define RIG_BANDSELECT_HF (RIG_BANDSELECT_160M | RIG_BANDSELECT_80M | RIG_BANDSELECT_60M | RIG_BANDSELECT_40M\
| RIG_BANDSELECT_30M | RIG_BANDSELECT_20M | RIG_BANDSELECT_17M | RIG_BANDSELECT_15M | RIG_BANDSELECT_12M\
| RIG_BANDSELECT_10M | RIG_BANDSELECT_6M)
#define RIG_BANDSELECT_VHF (RIG_BANDSELECT_AIR | RIG_BANDSELECT_2M| RIG_BANDSELECT_1_25M(
#define RIG_BANDSELECT_UHF (RIG_BANDSELECT_70CM)
typedef enum {
RIG_SCAN_NONE = 0,
RIG_SCAN_MEM = (1 << 0),
RIG_SCAN_SLCT = (1 << 1),
RIG_SCAN_PRIO = (1 << 2),
RIG_SCAN_PROG = (1 << 3),
RIG_SCAN_DELTA = (1 << 4),
RIG_SCAN_VFO = (1 << 5),
RIG_SCAN_PLT = (1 << 6),
RIG_SCAN_STOP = (1 << 7)
} scan_t;
typedef long hamlib_token_t;
#define token_t hamlib_token_t
#define RIG_CONF_END 0
/* strongly inspired from soundmodem. Thanks Thomas! */
enum rig_conf_e {
RIG_CONF_STRING,
RIG_CONF_COMBO,
RIG_CONF_NUMERIC,
RIG_CONF_CHECKBUTTON,
RIG_CONF_BUTTON,
RIG_CONF_BINARY,
RIG_CONF_INT
};
#define RIG_COMBO_MAX 16
#define RIG_BIN_MAX 80
struct confparams {
hamlib_token_t token;
const char *name;
const char *label;
const char *tooltip;
const char *dflt;
enum rig_conf_e type;
union {
struct {
float min;
float max;
float step;
} n;
struct {
const char *combostr[RIG_COMBO_MAX];
} c;
} u;
};
typedef enum {
RIG_ANN_NONE = 0,
RIG_ANN_OFF = RIG_ANN_NONE,
RIG_ANN_FREQ = (1 << 0),
RIG_ANN_RXMODE = (1 << 1),
RIG_ANN_CW = (1 << 2),
RIG_ANN_ENG = (1 << 3),
RIG_ANN_JAP = (1 << 4)
} ann_t;
typedef unsigned int ant_t;
#define RIG_ANT_NONE 0
#define RIG_ANT_N(n) ((ant_t)1<<(n))
#define RIG_ANT_1 RIG_ANT_N(0)
#define RIG_ANT_2 RIG_ANT_N(1)
#define RIG_ANT_3 RIG_ANT_N(2)
#define RIG_ANT_4 RIG_ANT_N(3)
#define RIG_ANT_5 RIG_ANT_N(4)
#define RIG_ANT_UNKNOWN RIG_ANT_N(30)
#define RIG_ANT_CURR RIG_ANT_N(31)
#define RIG_ANT_MAX 32
#define RIG_AGC_LAST 99999
#if 1 // deprecated
enum meter_level_e {
RIG_METER_NONE = 0, /*< No display meter */
RIG_METER_SWR = (1 << 0), /*< Stationary Wave Ratio */
RIG_METER_COMP = (1 << 1), /*< Compression level */
RIG_METER_ALC = (1 << 2), /*< ALC */
RIG_METER_IC = (1 << 3), /*< IC */
RIG_METER_DB = (1 << 4), /*< DB */
RIG_METER_PO = (1 << 5), /*< Power Out */
RIG_METER_VDD = (1 << 6), /*< Final Amp Voltage */
RIG_METER_TEMP = (1 << 7) /*< Final Amp Temperature */
};
#endif
typedef union {
signed int i;
unsigned int u;
float f;
char *s;
const char *cs;
struct {
int l;
unsigned char *d; /* Pointer to data buffer */
} b;
} value_t;
typedef uint64_t rig_level_e;
#define RIG_LEVEL_NONE 0
#define RIG_LEVEL_PREAMP CONSTANT_64BIT_FLAG(0)
#define RIG_LEVEL_ATT CONSTANT_64BIT_FLAG(1)
#define RIG_LEVEL_VOXDELAY CONSTANT_64BIT_FLAG(2)
#define RIG_LEVEL_AF CONSTANT_64BIT_FLAG(3)
#define RIG_LEVEL_RF CONSTANT_64BIT_FLAG(4)
#define RIG_LEVEL_SQL CONSTANT_64BIT_FLAG(5)
#define RIG_LEVEL_IF CONSTANT_64BIT_FLAG(6)
#define RIG_LEVEL_APF CONSTANT_64BIT_FLAG(7)
#define RIG_LEVEL_NR CONSTANT_64BIT_FLAG(8)
#define RIG_LEVEL_PBT_IN CONSTANT_64BIT_FLAG(9)
#define RIG_LEVEL_PBT_OUT CONSTANT_64BIT_FLAG(10)
#define RIG_LEVEL_CWPITCH CONSTANT_64BIT_FLAG(11)
#define RIG_LEVEL_RFPOWER CONSTANT_64BIT_FLAG(12)
#define RIG_LEVEL_MICGAIN CONSTANT_64BIT_FLAG(13)
#define RIG_LEVEL_KEYSPD CONSTANT_64BIT_FLAG(14)
#define RIG_LEVEL_NOTCHF CONSTANT_64BIT_FLAG(15)
#define RIG_LEVEL_COMP CONSTANT_64BIT_FLAG(16)
#define RIG_LEVEL_AGC CONSTANT_64BIT_FLAG(17)
#define RIG_LEVEL_BKINDL CONSTANT_64BIT_FLAG(18)
#define RIG_LEVEL_BALANCE CONSTANT_64BIT_FLAG(19)
#define RIG_LEVEL_METER CONSTANT_64BIT_FLAG(20)
#define RIG_LEVEL_VOXGAIN CONSTANT_64BIT_FLAG(21)
#define RIG_LEVEL_ANTIVOX CONSTANT_64BIT_FLAG(22)
#define RIG_LEVEL_SLOPE_LOW CONSTANT_64BIT_FLAG(23)
#define RIG_LEVEL_SLOPE_HIGH CONSTANT_64BIT_FLAG(24)
#define RIG_LEVEL_BKIN_DLYMS CONSTANT_64BIT_FLAG(25)
#define RIG_LEVEL_RAWSTR CONSTANT_64BIT_FLAG(26)
//#define RIG_LEVEL_SQLSTAT CONSTANT_64BIT_FLAG(27) /*!< \c SQLSTAT -- SQL status, arg int (open=1/closed=0). Deprecated, use get_dcd instead */
#define RIG_LEVEL_SWR CONSTANT_64BIT_FLAG(28)
#define RIG_LEVEL_ALC CONSTANT_64BIT_FLAG(29)
#define RIG_LEVEL_STRENGTH CONSTANT_64BIT_FLAG(30)
/* RIG_LEVEL_BWC (1<<31) */
#define RIG_LEVEL_RFPOWER_METER CONSTANT_64BIT_FLAG(32)
#define RIG_LEVEL_COMP_METER CONSTANT_64BIT_FLAG(33)
#define RIG_LEVEL_VD_METER CONSTANT_64BIT_FLAG(34)
#define RIG_LEVEL_ID_METER CONSTANT_64BIT_FLAG(35)
#define RIG_LEVEL_NOTCHF_RAW CONSTANT_64BIT_FLAG(36)
#define RIG_LEVEL_MONITOR_GAIN CONSTANT_64BIT_FLAG(37)
#define RIG_LEVEL_NB CONSTANT_64BIT_FLAG(38)
#define RIG_LEVEL_RFPOWER_METER_WATTS CONSTANT_64BIT_FLAG(39)
#define RIG_LEVEL_SPECTRUM_MODE CONSTANT_64BIT_FLAG(40)
#define RIG_LEVEL_SPECTRUM_SPAN CONSTANT_64BIT_FLAG(41)
#define RIG_LEVEL_SPECTRUM_EDGE_LOW CONSTANT_64BIT_FLAG(42)
#define RIG_LEVEL_SPECTRUM_EDGE_HIGH CONSTANT_64BIT_FLAG(43)
#define RIG_LEVEL_SPECTRUM_SPEED CONSTANT_64BIT_FLAG(44)
#define RIG_LEVEL_SPECTRUM_REF CONSTANT_64BIT_FLAG(45)
#define RIG_LEVEL_SPECTRUM_AVG CONSTANT_64BIT_FLAG(46)
#define RIG_LEVEL_SPECTRUM_ATT CONSTANT_64BIT_FLAG(47)
#define RIG_LEVEL_TEMP_METER CONSTANT_64BIT_FLAG(48)
#define RIG_LEVEL_BAND_SELECT CONSTANT_64BIT_FLAG(49)
#define RIG_LEVEL_USB_AF CONSTANT_64BIT_FLAG(50)
#define RIG_LEVEL_USB_AF_INPUT CONSTANT_64BIT_FLAG(51)
#define RIG_LEVEL_AGC_TIME CONSTANT_64BIT_FLAG(52)
#define RIG_LEVEL_53 CONSTANT_64BIT_FLAG(53)
#define RIG_LEVEL_54 CONSTANT_64BIT_FLAG(54)
#define RIG_LEVEL_55 CONSTANT_64BIT_FLAG(55)
#define RIG_LEVEL_56 CONSTANT_64BIT_FLAG(56)
#define RIG_LEVEL_57 CONSTANT_64BIT_FLAG(57)
#define RIG_LEVEL_58 CONSTANT_64BIT_FLAG(58)
#define RIG_LEVEL_59 CONSTANT_64BIT_FLAG(59)
#define RIG_LEVEL_60 CONSTANT_64BIT_FLAG(60)
#define RIG_LEVEL_61 CONSTANT_64BIT_FLAG(61)
#define RIG_LEVEL_62 CONSTANT_64BIT_FLAG(62)
#define RIG_LEVEL_63 CONSTANT_64BIT_FLAG(63)
#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)
#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)
#define RIG_LEVEL_IS_FLOAT(l) ((l)&RIG_LEVEL_FLOAT_LIST)
#define RIG_LEVEL_SET(l) ((l)&~RIG_LEVEL_READONLY_LIST)
enum rig_parm_e {
RIG_PARM_NONE = 0,
RIG_PARM_ANN = (1 << 0),
RIG_PARM_APO = (1 << 1),
RIG_PARM_BACKLIGHT = (1 << 2),
RIG_PARM_BEEP = (1 << 4),
RIG_PARM_TIME = (1 << 5),
RIG_PARM_BAT = (1 << 6),
RIG_PARM_KEYLIGHT = (1 << 7),
RIG_PARM_SCREENSAVER = (1 << 8),
RIG_PARM_AFIF = (1 << 9),
RIG_PARM_BANDSELECT = (1 << 10),
RIG_PARM_KEYERTYPE = (1 << 11),
RIG_PARM_AFIF_LAN = (1 << 12),
RIG_PARM_AFIF_WLAN = (1 << 13),
RIG_PARM_AFIF_ACC = (1 << 14)
};
enum rig_keyertype_e {
RIG_KEYERTYPE_STRAIGHT = 0,
RIG_KEYERTYPE_BUG = (1 << 0),
RIG_KEYERTYPE_PADDLE = (1 << 1),
RIG_KEYERTYPE_UNKNOWN = (1 << 2)
};
enum cookie_e {
RIG_COOKIE_GET,
RIG_COOKIE_RELEASE,
RIG_COOKIE_RENEW,
};
enum multicast_item_e {
RIG_MULTICAST_POLL, // hamlib will be polling the rig for all rig items
RIG_MULTICAST_TRANSCEIVE, // transceive will be turned on and processed
RIG_MULTICAST_SPECTRUM // spectrum data will be included
};
#define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT|RIG_PARM_BACKLIGHT)
#define RIG_PARM_STRING_LIST (RIG_PARM_BANDSELECT|RIG_PARM_KEYERTYPE)
#define RIG_PARM_READONLY_LIST (RIG_PARM_BAT)
#define RIG_PARM_IS_FLOAT(l) ((l)&RIG_PARM_FLOAT_LIST)
#define RIG_PARM_IS_STRING(l) ((l)&RIG_PARM_STRING_LIST)
#define RIG_PARM_SET(l) ((l)&~RIG_PARM_READONLY_LIST)
typedef uint64_t setting_t;
#define RIG_SETTING_MAX 64
#define RIG_TRN_OFF 0
#define RIG_TRN_RIG 1
#define RIG_TRN_POLL 2
/*
* The C standard dictates that an enum constant is a 32 bit signed integer.
* Setting a constant's bit 31 created a negative value that on amd64 had the
* upper 32 bits set as well when assigned to the misc.c:rig_func_str structure.
* This caused misc.c:rig_strfunc() to fail its comparison for RIG_FUNC_XIT
* on amd64 (x86_64). To use bit 31 as an unsigned long, preprocessor macros
* have been used instead as a 'const unsigned long' which cannot be used to
* initialize the rig_func_str.func members. TNX KA6MAL, AC6SL. - N0NB
*/
#define RIG_FUNC_NONE 0
#define RIG_FUNC_FAGC CONSTANT_64BIT_FLAG (0)
#define RIG_FUNC_NB CONSTANT_64BIT_FLAG (1)
#define RIG_FUNC_COMP CONSTANT_64BIT_FLAG (2)
#define RIG_FUNC_VOX CONSTANT_64BIT_FLAG (3)
#define RIG_FUNC_TONE CONSTANT_64BIT_FLAG (4)
#define RIG_FUNC_TSQL CONSTANT_64BIT_FLAG (5)
#define RIG_FUNC_SBKIN CONSTANT_64BIT_FLAG (6)
#define RIG_FUNC_FBKIN CONSTANT_64BIT_FLAG (7)
#define RIG_FUNC_ANF CONSTANT_64BIT_FLAG (8)
#define RIG_FUNC_NR CONSTANT_64BIT_FLAG (9)
#define RIG_FUNC_AIP CONSTANT_64BIT_FLAG (10)
#define RIG_FUNC_APF CONSTANT_64BIT_FLAG (11)
#define RIG_FUNC_MON CONSTANT_64BIT_FLAG (12)
#define RIG_FUNC_MN CONSTANT_64BIT_FLAG (13)
#define RIG_FUNC_RF CONSTANT_64BIT_FLAG (14)
#define RIG_FUNC_ARO CONSTANT_64BIT_FLAG (15)
#define RIG_FUNC_LOCK CONSTANT_64BIT_FLAG (16)
#define RIG_FUNC_MUTE CONSTANT_64BIT_FLAG (17)
#define RIG_FUNC_VSC CONSTANT_64BIT_FLAG (18)
#define RIG_FUNC_REV CONSTANT_64BIT_FLAG (19)
#define RIG_FUNC_SQL CONSTANT_64BIT_FLAG (20)
#define RIG_FUNC_ABM CONSTANT_64BIT_FLAG (21)
#define RIG_FUNC_BC CONSTANT_64BIT_FLAG (22)
#define RIG_FUNC_MBC CONSTANT_64BIT_FLAG (23)
#define RIG_FUNC_RIT CONSTANT_64BIT_FLAG (24)
#define RIG_FUNC_AFC CONSTANT_64BIT_FLAG (25)
#define RIG_FUNC_SATMODE CONSTANT_64BIT_FLAG (26)
#define RIG_FUNC_SCOPE CONSTANT_64BIT_FLAG (27)
#define RIG_FUNC_RESUME CONSTANT_64BIT_FLAG (28)
#define RIG_FUNC_TBURST CONSTANT_64BIT_FLAG (29)
#define RIG_FUNC_TUNER CONSTANT_64BIT_FLAG (30)
#define RIG_FUNC_XIT CONSTANT_64BIT_FLAG (31)
#ifndef SWIGLUAHIDE
/* Hide the top 32 bits from the old Lua binding as they can't be represented */
#define RIG_FUNC_NB2 CONSTANT_64BIT_FLAG (32)
#define RIG_FUNC_CSQL CONSTANT_64BIT_FLAG (33)
#define RIG_FUNC_AFLT CONSTANT_64BIT_FLAG (34)
#define RIG_FUNC_ANL CONSTANT_64BIT_FLAG (35)
#define RIG_FUNC_BC2 CONSTANT_64BIT_FLAG (36)
#define RIG_FUNC_DUAL_WATCH CONSTANT_64BIT_FLAG (37)
#define RIG_FUNC_DIVERSITY CONSTANT_64BIT_FLAG (38)
#define RIG_FUNC_DSQL CONSTANT_64BIT_FLAG (39)
#define RIG_FUNC_SCEN CONSTANT_64BIT_FLAG (40)
#define RIG_FUNC_SLICE CONSTANT_64BIT_FLAG (41)
#define RIG_FUNC_TRANSCEIVE CONSTANT_64BIT_FLAG (42)
#define RIG_FUNC_SPECTRUM CONSTANT_64BIT_FLAG (43)
#define RIG_FUNC_SPECTRUM_HOLD CONSTANT_64BIT_FLAG (44)
#define RIG_FUNC_SEND_MORSE CONSTANT_64BIT_FLAG (45)
#define RIG_FUNC_SEND_VOICE_MEM CONSTANT_64BIT_FLAG (46)
#define RIG_FUNC_OVF_STATUS CONSTANT_64BIT_FLAG (47)
#define RIG_FUNC_SYNC CONSTANT_64BIT_FLAG (48)
#define RIG_FUNC_BIT49 CONSTANT_64BIT_FLAG (49)
#define RIG_FUNC_BIT50 CONSTANT_64BIT_FLAG (50)
#define RIG_FUNC_BIT51 CONSTANT_64BIT_FLAG (51)
#define RIG_FUNC_BIT52 CONSTANT_64BIT_FLAG (52)
#define RIG_FUNC_BIT53 CONSTANT_64BIT_FLAG (53)
#define RIG_FUNC_BIT54 CONSTANT_64BIT_FLAG (54)
#define RIG_FUNC_BIT55 CONSTANT_64BIT_FLAG (55)
#define RIG_FUNC_BIT56 CONSTANT_64BIT_FLAG (56)
#define RIG_FUNC_BIT57 CONSTANT_64BIT_FLAG (57)
#define RIG_FUNC_BIT58 CONSTANT_64BIT_FLAG (58)
#define RIG_FUNC_BIT59 CONSTANT_64BIT_FLAG (59)
#define RIG_FUNC_BIT60 CONSTANT_64BIT_FLAG (60)
#define RIG_FUNC_BIT61 CONSTANT_64BIT_FLAG (61)
#define RIG_FUNC_BIT62 CONSTANT_64BIT_FLAG (62)
#define RIG_FUNC_BIT63 CONSTANT_64BIT_FLAG (63)
/* 63 is this highest bit number that can be used */
#endif
#define mW(p) ((int)(p))
#define Watts(p) ((int)((p)*1000))
#define W(p) Watts(p)
#if 0 // deprecating kW macro as this doesn't make sense
#define kW(p) ((int)((p)*1000000L))
#endif
typedef uint64_t rmode_t;
#define RIG_MODE_NONE 0
#define RIG_MODE_AM CONSTANT_64BIT_FLAG (0)
#define RIG_MODE_CW CONSTANT_64BIT_FLAG (1)
#define RIG_MODE_USB CONSTANT_64BIT_FLAG (2)
#define RIG_MODE_LSB CONSTANT_64BIT_FLAG (3)
#define RIG_MODE_RTTY CONSTANT_64BIT_FLAG (4)
#define RIG_MODE_FM CONSTANT_64BIT_FLAG (5)
#define RIG_MODE_WFM CONSTANT_64BIT_FLAG (6)
#define RIG_MODE_CWR CONSTANT_64BIT_FLAG (7)
#define RIG_MODE_RTTYR CONSTANT_64BIT_FLAG (8)
#define RIG_MODE_AMS CONSTANT_64BIT_FLAG (9)
#define RIG_MODE_PKTLSB CONSTANT_64BIT_FLAG (10)
#define RIG_MODE_PKTUSB CONSTANT_64BIT_FLAG (11)
#define RIG_MODE_PKTFM CONSTANT_64BIT_FLAG (12)
#define RIG_MODE_ECSSUSB CONSTANT_64BIT_FLAG (13)
#define RIG_MODE_ECSSLSB CONSTANT_64BIT_FLAG (14)
#define RIG_MODE_FAX CONSTANT_64BIT_FLAG (15)
#define RIG_MODE_SAM CONSTANT_64BIT_FLAG (16)
#define RIG_MODE_SAL CONSTANT_64BIT_FLAG (17)
#define RIG_MODE_SAH CONSTANT_64BIT_FLAG (18)
#define RIG_MODE_DSB CONSTANT_64BIT_FLAG (19)
#define RIG_MODE_FMN CONSTANT_64BIT_FLAG (21)
#define RIG_MODE_PKTAM CONSTANT_64BIT_FLAG (22)
#define RIG_MODE_P25 CONSTANT_64BIT_FLAG (23)
#define RIG_MODE_DSTAR CONSTANT_64BIT_FLAG (24)
#define RIG_MODE_DPMR CONSTANT_64BIT_FLAG (25)
#define RIG_MODE_NXDNVN CONSTANT_64BIT_FLAG (26)
#define RIG_MODE_NXDN_N CONSTANT_64BIT_FLAG (27)
#define RIG_MODE_DCR CONSTANT_64BIT_FLAG (28)
#define RIG_MODE_AMN CONSTANT_64BIT_FLAG (29)
#define RIG_MODE_PSK CONSTANT_64BIT_FLAG (30)
#define RIG_MODE_PSKR CONSTANT_64BIT_FLAG (31)
#ifndef SWIGLUAHIDE
/* hide the top 32 bits from the Lua binding as they will not work */
#define RIG_MODE_DD CONSTANT_64BIT_FLAG (32)
#define RIG_MODE_C4FM CONSTANT_64BIT_FLAG (33)
#define RIG_MODE_PKTFMN CONSTANT_64BIT_FLAG (34)
#define RIG_MODE_SPEC CONSTANT_64BIT_FLAG (35)
#define RIG_MODE_CWN CONSTANT_64BIT_FLAG (36)
#define RIG_MODE_IQ CONSTANT_64BIT_FLAG (37)
#define RIG_MODE_ISBUSB CONSTANT_64BIT_FLAG (38)
#define RIG_MODE_ISBLSB CONSTANT_64BIT_FLAG (39)
#define RIG_MODE_USBD1 CONSTANT_64BIT_FLAG (40)
#define RIG_MODE_USBD2 CONSTANT_64BIT_FLAG (41)
#define RIG_MODE_USBD3 CONSTANT_64BIT_FLAG (42)
#define RIG_MODE_LSBD1 CONSTANT_64BIT_FLAG (43)
#define RIG_MODE_LSBD2 CONSTANT_64BIT_FLAG (44)
#define RIG_MODE_LSBD3 CONSTANT_64BIT_FLAG (45)
#define RIG_MODE_WFMS CONSTANT_64BIT_FLAG (46)
#define RIG_MODE_BIT47 CONSTANT_64BIT_FLAG (47)
#define RIG_MODE_BIT48 CONSTANT_64BIT_FLAG (48)
#define RIG_MODE_BIT49 CONSTANT_64BIT_FLAG (49)
#define RIG_MODE_BIT50 CONSTANT_64BIT_FLAG (50)
#define RIG_MODE_BIT51 CONSTANT_64BIT_FLAG (51)
#define RIG_MODE_BIT52 CONSTANT_64BIT_FLAG (52)
#define RIG_MODE_BIT53 CONSTANT_64BIT_FLAG (53)
#define RIG_MODE_BIT54 CONSTANT_64BIT_FLAG (54)
#define RIG_MODE_BIT55 CONSTANT_64BIT_FLAG (55)
#define RIG_MODE_BIT56 CONSTANT_64BIT_FLAG (56)
#define RIG_MODE_BIT57 CONSTANT_64BIT_FLAG (57)
#define RIG_MODE_BIT58 CONSTANT_64BIT_FLAG (58)
#define RIG_MODE_BIT59 CONSTANT_64BIT_FLAG (59)
#define RIG_MODE_BIT60 CONSTANT_64BIT_FLAG (60)
#define RIG_MODE_BIT61 CONSTANT_64BIT_FLAG (61)
#define RIG_MODE_BIT62 CONSTANT_64BIT_FLAG (62)
#define RIG_MODE_TESTS_MAX CONSTANT_64BIT_FLAG (63)
#define RIG_MODE_ALL (0xffffffff)
#endif
#define RIG_MODE_SSB (RIG_MODE_USB|RIG_MODE_LSB)
#define RIG_MODE_PKTSSB (RIG_MODE_PKTUSB|RIG_MODE_PKTLSB)
#define RIG_MODE_ECSS (RIG_MODE_ECSSUSB|RIG_MODE_ECSSLSB)
#define RIG_DBLST_END 0 /* end marker in a preamp/att level list */
#define RIG_IS_DBLST_END(d) ((d)==0)
typedef struct freq_range_list {
freq_t startf;
freq_t endf;
rmode_t modes;
int low_power;
int high_power;
vfo_t vfo;
ant_t ant;
char *label;
} freq_range_t;
#define RIG_FRNG_END {Hz(0),Hz(0),RIG_MODE_NONE,0,0,RIG_VFO_NONE}
#define RIG_IS_FRNG_END(r) ((r).startf == Hz(0) && (r).endf == Hz(0))
struct tuning_step_list {
rmode_t modes;
shortfreq_t ts;
};
#define RIG_TS_ANY 0
#define RIG_TS_END {RIG_MODE_NONE, 0}
#define RIG_IS_TS_END(t) ((t).modes == RIG_MODE_NONE && (t).ts == 0)
struct filter_list {
rmode_t modes;
pbwidth_t width;
};
#define RIG_FLT_ANY 0
#define RIG_FLT_END {RIG_MODE_NONE, 0}
#define RIG_IS_FLT_END(f) ((f).modes == RIG_MODE_NONE)
#define DEBUGMSGSAVE_SIZE 24000
#define RIG_CHFLAG_NONE 0
#define RIG_CHFLAG_SKIP (1<<0)
#define RIG_CHFLAG_DATA (1<<1)
#define RIG_CHFLAG_PSKIP (1<<2)
struct ext_list {
hamlib_token_t token;
value_t val;
};
#define RIG_EXT_END {0, {.i=0}}
#define RIG_IS_EXT_END(x) ((x).token == 0)
struct channel {
int channel_num;
int bank_num;
vfo_t vfo;
ant_t ant;
freq_t freq;
rmode_t mode;
pbwidth_t width;
freq_t tx_freq;
rmode_t tx_mode;
pbwidth_t tx_width;
split_t split;
vfo_t tx_vfo;
rptr_shift_t rptr_shift;
shortfreq_t rptr_offs;
shortfreq_t tuning_step;
shortfreq_t rit;
shortfreq_t xit;
setting_t funcs;
value_t levels[RIG_SETTING_MAX];
tone_t ctcss_tone;
tone_t ctcss_sql;
tone_t dcs_code;
tone_t dcs_sql;
int scan_group;
unsigned int flags;
char channel_desc[HAMLIB_MAXCHANDESC];
struct ext_list
*ext_levels;
char tag[32];
};
typedef struct channel channel_t;
struct channel_cap {
unsigned bank_num: 1;
unsigned vfo: 1;
unsigned ant: 1;
unsigned freq: 1;
unsigned mode: 1;
unsigned width: 1;
unsigned tx_freq: 1;
unsigned tx_mode: 1;
unsigned tx_width: 1;
unsigned split: 1;
unsigned tx_vfo: 1;
unsigned rptr_shift: 1;
unsigned rptr_offs: 1;
unsigned tuning_step: 1;
unsigned rit: 1;
unsigned xit: 1;
setting_t funcs;
setting_t levels;
unsigned ctcss_tone: 1;
unsigned ctcss_sql: 1;
unsigned dcs_code: 1;
unsigned dcs_sql: 1;
unsigned scan_group: 1;
unsigned flags: 1;
unsigned channel_desc: 1;
unsigned ext_levels: 1;
unsigned tag: 1;
};
typedef struct channel_cap channel_cap_t;
typedef enum {
RIG_MTYPE_NONE = 0,
RIG_MTYPE_MEM,
RIG_MTYPE_EDGE,
RIG_MTYPE_CALL,
RIG_MTYPE_MEMOPAD,
RIG_MTYPE_SAT,
RIG_MTYPE_BAND,
RIG_MTYPE_PRIO,
RIG_MTYPE_VOICE,
RIG_MTYPE_MORSE,
RIG_MTYPE_SPLIT
} chan_type_t;
struct chan_list {
int startc;
int endc;
chan_type_t type;
channel_cap_t mem_caps;
};
#define RIG_CHAN_END {0,0,RIG_MTYPE_NONE}
#define RIG_IS_CHAN_END(c) ((c).type == RIG_MTYPE_NONE)
#define RIG_MEM_CAPS_ALL -1
typedef struct chan_list chan_t;
struct gran {
value_t min;
value_t max;
value_t step;
};
typedef struct gran gran_t;
struct cal_table {
int size;
struct {
int raw;
int val;
} table[HAMLIB_MAX_CAL_LENGTH];
};
typedef struct cal_table cal_table_t;
#define EMPTY_STR_CAL { 0, { { 0, 0 }, } }
struct cal_table_float {
int size;
struct {
int raw;
float val;
} table[HAMLIB_MAX_CAL_LENGTH];
};
typedef struct cal_table_float cal_table_float_t;
#define EMPTY_FLOAT_CAL { 0, { { 0, 0f }, } }
typedef int (* chan_cb_t)(RIG *, vfo_t vfo, channel_t **, int, const chan_t *, rig_ptr_t);
typedef int (* confval_cb_t)(RIG *,
const struct confparams *,
value_t *,
rig_ptr_t);
struct rig_spectrum_scope
{
int id;
char *name;
};
enum rig_spectrum_mode_e {
RIG_SPECTRUM_MODE_NONE = 0,
RIG_SPECTRUM_MODE_CENTER,
RIG_SPECTRUM_MODE_FIXED,
RIG_SPECTRUM_MODE_CENTER_SCROLL,
RIG_SPECTRUM_MODE_FIXED_SCROLL,
};
struct rig_spectrum_avg_mode
{
int id;
char *name;
};
struct rig_spectrum_line
{
int id;
int data_level_min;
int data_level_max;
double signal_strength_min;
double signal_strength_max;
enum rig_spectrum_mode_e spectrum_mode;
freq_t center_freq;
freq_t span_freq;
freq_t low_edge_freq;
freq_t high_edge_freq;
size_t spectrum_data_length;
unsigned char *spectrum_data;
};
struct deferred_config_item {
struct deferred_config_item *nextt;
hamlib_token_t token;
char *value; // strdup'ed, must be freed
};
typedef struct deferred_config_item deferred_config_item_t;
struct deferred_config_header {
struct deferred_config_item *firstt; // NULL if none
struct deferred_config_item *lastt;
};
typedef struct deferred_config_header deferred_config_header_t;
#define RIG_MODEL(arg) .rig_model=arg,.macro_name=#arg
#define HAMLIB_CHECK_RIG_CAPS "HAMLIB_CHECK_RIG_CAPS"
struct rig_caps {
rig_model_t rig_model;
const char *model_name;
const char *mfg_name;
const char *version;
const char *copyright;
enum rig_status_e status;
int rig_type;
ptt_type_t ptt_type;
dcd_type_t dcd_type;
rig_port_t port_type;
int serial_rate_min;
int serial_rate_max;
int serial_data_bits;
int serial_stop_bits;
enum serial_parity_e serial_parity;
enum serial_handshake_e serial_handshake;
int write_delay;
int post_write_delay;
int timeout;
int retry;
setting_t has_get_func;
setting_t has_set_func;
setting_t has_get_level;
setting_t has_set_level;
setting_t has_get_parm;
setting_t has_set_parm;
gran_t level_gran[RIG_SETTING_MAX];
gran_t parm_gran[RIG_SETTING_MAX];
const struct confparams *extparms;
const struct confparams *extlevels;
const struct confparams *extfuncs;
int *ext_tokens;
tone_t *ctcss_list;
tone_t *dcs_list;
int preamp[HAMLIB_MAXDBLSTSIZ];
int attenuator[HAMLIB_MAXDBLSTSIZ];
shortfreq_t max_rit;
shortfreq_t max_xit;
shortfreq_t max_ifshift;
int agc_level_count;
enum agc_level_e agc_levels[HAMLIB_MAX_AGC_LEVELS];
ann_t announces;
vfo_op_t vfo_ops;
scan_t scan_ops;
int targetable_vfo;
int transceive;
int bank_qty;
int chan_desc_sz;
chan_t chan_list[HAMLIB_CHANLSTSIZ];
// As of 2020-02-12 we know of 5 models from Icom USA, EUR, ITR, TPE, KOR for the IC-9700
// So we currently have 5 ranges we need to deal with
// The backend for the model should fill in the label field to explain what model it is
// The the IC-9700 in ic7300.c for an example
freq_range_t rx_range_list1[HAMLIB_FRQRANGESIZ];
freq_range_t tx_range_list1[HAMLIB_FRQRANGESIZ];
freq_range_t rx_range_list2[HAMLIB_FRQRANGESIZ];
freq_range_t tx_range_list2[HAMLIB_FRQRANGESIZ];
freq_range_t rx_range_list3[HAMLIB_FRQRANGESIZ];
freq_range_t tx_range_list3[HAMLIB_FRQRANGESIZ];
freq_range_t rx_range_list4[HAMLIB_FRQRANGESIZ];
freq_range_t tx_range_list4[HAMLIB_FRQRANGESIZ];
freq_range_t rx_range_list5[HAMLIB_FRQRANGESIZ];
freq_range_t tx_range_list5[HAMLIB_FRQRANGESIZ];
struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ];
struct filter_list filters[HAMLIB_FLTLSTSIZ];
cal_table_t str_cal;
cal_table_float_t swr_cal;
cal_table_float_t alc_cal;
cal_table_float_t rfpower_meter_cal;
cal_table_float_t comp_meter_cal;
cal_table_float_t vd_meter_cal;
cal_table_float_t id_meter_cal;
struct rig_spectrum_scope spectrum_scopes[HAMLIB_MAX_SPECTRUM_SCOPES];
enum rig_spectrum_mode_e spectrum_modes[HAMLIB_MAX_SPECTRUM_MODES];
freq_t spectrum_spans[HAMLIB_MAX_SPECTRUM_SPANS];
struct rig_spectrum_avg_mode spectrum_avg_modes[HAMLIB_MAX_SPECTRUM_AVG_MODES];
int spectrum_attenuator[HAMLIB_MAXDBLSTSIZ];
const struct confparams *cfgparams;
const rig_ptr_t priv;
/*
* Rig API
*
*/
int (*rig_init)(RIG *rig);
int (*rig_cleanup)(RIG *rig);
int (*rig_open)(RIG *rig);
int (*rig_close)(RIG *rig);
/*
* General API commands, from most primitive to least.. :()
* List Set/Get functions pairs
*/
int (*set_freq)(RIG *rig, vfo_t vfo, freq_t freq);
int (*get_freq)(RIG *rig, vfo_t vfo, freq_t *freq);
int (*set_mode)(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width);
int (*get_mode)(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width);
int (*set_vfo)(RIG *rig, vfo_t vfo);
int (*get_vfo)(RIG *rig, vfo_t *vfo);
int (*set_ptt)(RIG *rig, vfo_t vfo, ptt_t ptt);
int (*get_ptt)(RIG *rig, vfo_t vfo, ptt_t *ptt);
int (*get_dcd)(RIG *rig, vfo_t vfo, dcd_t *dcd);
int (*set_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift);
int (*get_rptr_shift)(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift);
int (*set_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t offs);
int (*get_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t *offs);
int (*set_split_freq)(RIG *rig, vfo_t vfo, freq_t tx_freq);
int (*get_split_freq)(RIG *rig, vfo_t vfo, freq_t *tx_freq);
int (*set_split_mode)(RIG *rig,
vfo_t vfo,
rmode_t tx_mode,
pbwidth_t tx_width);
int (*get_split_mode)(RIG *rig,
vfo_t vfo,
rmode_t *tx_mode,
pbwidth_t *tx_width);
int (*set_split_freq_mode)(RIG *rig,
vfo_t vfo,
freq_t tx_freq,
rmode_t tx_mode,
pbwidth_t tx_width);
int (*get_split_freq_mode)(RIG *rig,
vfo_t vfo,
freq_t *tx_freq,
rmode_t *tx_mode,
pbwidth_t *tx_width);
int (*set_split_vfo)(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo);
int (*get_split_vfo)(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo);
int (*set_rit)(RIG *rig, vfo_t vfo, shortfreq_t rit);
int (*get_rit)(RIG *rig, vfo_t vfo, shortfreq_t *rit);
int (*set_xit)(RIG *rig, vfo_t vfo, shortfreq_t xit);
int (*get_xit)(RIG *rig, vfo_t vfo, shortfreq_t *xit);
int (*set_ts)(RIG *rig, vfo_t vfo, shortfreq_t ts);
int (*get_ts)(RIG *rig, vfo_t vfo, shortfreq_t *ts);
int (*set_dcs_code)(RIG *rig, vfo_t vfo, tone_t code);
int (*get_dcs_code)(RIG *rig, vfo_t vfo, tone_t *code);
int (*set_tone)(RIG *rig, vfo_t vfo, tone_t tone);
int (*get_tone)(RIG *rig, vfo_t vfo, tone_t *tone);
int (*set_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t tone);
int (*get_ctcss_tone)(RIG *rig, vfo_t vfo, tone_t *tone);
int (*set_dcs_sql)(RIG *rig, vfo_t vfo, tone_t code);
int (*get_dcs_sql)(RIG *rig, vfo_t vfo, tone_t *code);
int (*set_tone_sql)(RIG *rig, vfo_t vfo, tone_t tone);
int (*get_tone_sql)(RIG *rig, vfo_t vfo, tone_t *tone);
int (*set_ctcss_sql)(RIG *rig, vfo_t vfo, tone_t tone);
int (*get_ctcss_sql)(RIG *rig, vfo_t vfo, tone_t *tone);
int (*power2mW)(RIG *rig,
unsigned int *mwpower,
float power,
freq_t freq,
rmode_t mode);
int (*mW2power)(RIG *rig,
float *power,
unsigned int mwpower,
freq_t freq,
rmode_t mode);
int (*set_powerstat)(RIG *rig, powerstat_t status);
int (*get_powerstat)(RIG *rig, powerstat_t *status);
int (*reset)(RIG *rig, reset_t reset);
int (*set_ant)(RIG *rig, vfo_t vfo, ant_t ant, value_t option);
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);
int (*set_level)(RIG *rig, vfo_t vfo, setting_t level, value_t val);
int (*get_level)(RIG *rig, vfo_t vfo, setting_t level, value_t *val);
int (*set_func)(RIG *rig, vfo_t vfo, setting_t func, int status);
int (*get_func)(RIG *rig, vfo_t vfo, setting_t func, int *status);
int (*set_parm)(RIG *rig, setting_t parm, value_t val);
int (*get_parm)(RIG *rig, setting_t parm, value_t *val);
int (*set_ext_level)(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t val);
int (*get_ext_level)(RIG *rig, vfo_t vfo, hamlib_token_t token, value_t *val);
int (*set_ext_func)(RIG *rig, vfo_t vfo, hamlib_token_t token, int status);
int (*get_ext_func)(RIG *rig, vfo_t vfo, hamlib_token_t token, int *status);
int (*set_ext_parm)(RIG *rig, hamlib_token_t token, value_t val);
int (*get_ext_parm)(RIG *rig, hamlib_token_t token, value_t *val);
int (*set_conf)(RIG *rig, hamlib_token_t token, const char *val);
int (*get_conf)(RIG *rig, hamlib_token_t token, char *val);
int (*send_dtmf)(RIG *rig, vfo_t vfo, const char *digits);
int (*recv_dtmf)(RIG *rig, vfo_t vfo, char *digits, int *length);
int (*send_morse)(RIG *rig, vfo_t vfo, const char *msg);
int (*stop_morse)(RIG *rig, vfo_t vfo);
int (*wait_morse)(RIG *rig, vfo_t vfo);
int (*send_voice_mem)(RIG *rig, vfo_t vfo, int ch);
int (*stop_voice_mem)(RIG *rig, vfo_t vfo);
int (*set_bank)(RIG *rig, vfo_t vfo, int bank);
int (*set_mem)(RIG *rig, vfo_t vfo, int ch);
int (*get_mem)(RIG *rig, vfo_t vfo, int *ch);
int (*vfo_op)(RIG *rig, vfo_t vfo, vfo_op_t op);
int (*scan)(RIG *rig, vfo_t vfo, scan_t scan, int ch);
int (*set_trn)(RIG *rig, int trn);
int (*get_trn)(RIG *rig, int *trn);
int (*decode_event)(RIG *rig);
int (*set_channel)(RIG *rig, vfo_t vfo, const channel_t *chan);
int (*get_channel)(RIG *rig, vfo_t vfo, channel_t *chan, int read_only);
const char * (*get_info)(RIG *rig);
int (*set_chan_all_cb)(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t);
int (*get_chan_all_cb)(RIG *rig, vfo_t vfo, chan_cb_t chan_cb, rig_ptr_t);
int (*set_mem_all_cb)(RIG *rig,
vfo_t vfo,
chan_cb_t chan_cb,
confval_cb_t parm_cb,
rig_ptr_t);
int (*get_mem_all_cb)(RIG *rig,
vfo_t vfo,
chan_cb_t chan_cb,
confval_cb_t parm_cb,
rig_ptr_t);
int (*set_vfo_opt)(RIG *rig, int status); // only for Net Rigctl device
int (*rig_get_vfo_info) (RIG *rig,
vfo_t vfo,
freq_t *freq,
rmode_t *mode,
pbwidth_t *width,
split_t *split);
int(*set_clock) (RIG *rig, int year, int month, int day, int hour, int min, int sec, double msec, int utc_offset);
int(*get_clock) (RIG *rig, int *year, int *month, int *day, int *hour, int *min, int *sec, double *msec, int *utc_offset);
const char *clone_combo_set;
const char *clone_combo_get;
const char *macro_name;
int async_data_supported;
int (*read_frame_direct)(RIG *rig,
size_t buffer_length,
const unsigned char *buffer);
int (*is_async_frame)(RIG *rig,
size_t frame_length,
const unsigned char *frame);
int (*process_async_frame)(RIG *rig,
size_t frame_length,
const unsigned char *frame);
// this will be used to check rigcaps structure is compatible with client
char *hamlib_check_rig_caps; // a constant value we can check for hamlib integrity
int (*get_conf2)(RIG *rig, hamlib_token_t token, char *val, int val_len);
int (*password)(RIG *rig, const char *key1); /*< Send encrypted password if rigctld is secured with -A/--password */
int (*set_lock_mode)(RIG *rig, int mode);
int (*get_lock_mode)(RIG *rig, int *mode);
short timeout_retry;
short morse_qsize;
// int (*bandwidth2rig)(RIG *rig, enum bandwidth_t bandwidth);
// enum bandwidth_t (*rig2bandwidth)(RIG *rig, int rigbandwidth);
};
// all functions enumerated for rig_get_function_ptr
enum rig_function_e {
RIG_FUNCTION_INIT,
RIG_FUNCTION_CLEANUP,
RIG_FUNCTION_OPEN,
RIG_FUNCTION_CLOSE,
RIG_FUNCTION_SET_FREQ,
RIG_FUNCTION_GET_FREQ,
RIG_FUNCTION_SET_MODE,
RIG_FUNCTION_GET_MODE,
RIG_FUNCTION_SET_VFO,
RIG_FUNCTION_GET_VFO,
RIG_FUNCTION_SET_PTT,
RIG_FUNCTION_GET_PTT,
RIG_FUNCTION_GET_DCD,
RIG_FUNCTION_SET_RPTR_SHIFT,
RIG_FUNCTION_GET_RPTR_SHIFT,
RIG_FUNCTION_SET_RPTR_OFFS,
RIG_FUNCTION_GET_RPTR_OFFS,
RIG_FUNCTION_SET_SPLIT_FREQ,
RIG_FUNCTION_GET_SPLIT_FREQ,
RIG_FUNCTION_SET_SPLIT_MODE,
RIG_FUNCTION_SET_SPLIT_FREQ_MODE,
RIG_FUNCTION_GET_SPLIT_FREQ_MODE,
RIG_FUNCTION_SET_SPLIT_VFO,
RIG_FUNCTION_GET_SPLIT_VFO,
RIG_FUNCTION_SET_RIT,
RIG_FUNCTION_GET_RIT,
RIG_FUNCTION_SET_XIT,
RIG_FUNCTION_GET_XIT,
RIG_FUNCTION_SET_TS,
RIG_FUNCTION_GET_TS,
RIG_FUNCTION_SET_DCS_CODE,
RIG_FUNCTION_GET_DCS_CODE,
RIG_FUNCTION_SET_TONE,
RIG_FUNCTION_GET_TONE,
RIG_FUNCTION_SET_CTCSS_TONE,
RIG_FUNCTION_GET_CTCSS_TONE,
RIG_FUNCTION_SET_DCS_SQL,
RIG_FUNCTION_GET_DCS_SQL,
RIG_FUNCTION_SET_TONE_SQL,
RIG_FUNCTION_GET_TONE_SQL,
RIG_FUNCTION_SET_CTCSS_SQL,
RIG_FUNCTION_GET_CTCSS_SQL,
RIG_FUNCTION_POWER2MW,
RIG_FUNCTION_MW2POWER,
RIG_FUNCTION_SET_POWERSTAT,
RIG_FUNCTION_GET_POWERSTAT,
RIG_FUNCTION_RESET,
RIG_FUNCTION_SET_ANT,
RIG_FUNCTION_GET_ANT,
RIG_FUNCTION_SET_LEVEL,
RIG_FUNCTION_GET_LEVEL,
RIG_FUNCTION_SET_FUNC,
RIG_FUNCTION_GET_FUNC,
RIG_FUNCTION_SET_PARM,
RIG_FUNCTION_GET_PARM,
RIG_FUNCTION_SET_EXT_LEVEL,
RIG_FUNCTION_GET_EXT_LEVEL,
RIG_FUNCTION_SET_EXT_FUNC,
RIG_FUNCTION_GET_EXT_FUNC,
RIG_FUNCTION_SET_EXT_PARM,
RIG_FUNCTION_GET_EXT_PARM,
RIG_FUNCTION_SET_CONF,
RIG_FUNCTION_GET_CONF,
RIG_FUNCTION_SEND_DTMF,
RIG_FUNCTION_SEND_MORSE,
RIG_FUNCTION_STOP_MORSE,
RIG_FUNCTION_WAIT_MORSE,
RIG_FUNCTION_SEND_VOICE_MEM,
RIG_FUNCTION_SET_BANK,
RIG_FUNCTION_SET_MEM,
RIG_FUNCTION_GET_MEM,
RIG_FUNCTION_VFO_OP,
RIG_FUNCTION_SCAN,
RIG_FUNCTION_SET_TRN,
RIG_FUNCTION_GET_TRN,
RIG_FUNCTION_DECODE_EVENT,
RIG_FUNCTION_SET_CHANNEL,
RIG_FUNCTION_GET_CHANNEL,
RIG_FUNCTION_GET_INFO,
RIG_FUNCTION_SET_CHAN_ALL_CB,
RIG_FUNCTION_GET_CHAN_ALL_CB,
RIG_FUNCTION_SET_MEM_ALL_CB,
RIG_FUNCTION_GET_MEM_ALL_CB,
RIG_FUNCTION_SET_VFO_OPT,
RIG_FUNCTION_READ_FRAME_DIRECT,
RIG_FUNCTION_IS_ASYNC_FRAME,
RIG_FUNCTION_PROCESS_ASYNC_FRAME,
RIG_FUNCTION_GET_CONF2,
RIG_FUNCTION_STOP_VOICE_MEM,
};
extern HAMLIB_EXPORT (void *) rig_get_function_ptr(rig_model_t rig_model, enum rig_function_e rig_function);
// values enumerated for rig->caps values
enum rig_caps_int_e {
RIG_CAPS_TARGETABLE_VFO,
RIG_CAPS_RIG_MODEL,
RIG_CAPS_PORT_TYPE,
RIG_CAPS_PTT_TYPE,
RIG_CAPS_HAS_GET_LEVEL,
RIG_CAPS_HAS_SET_LEVEL,
};
enum rig_caps_cptr_e {
RIG_CAPS_VERSION_CPTR,
RIG_CAPS_MFG_NAME_CPTR,
RIG_CAPS_MODEL_NAME_CPTR,
RIG_CAPS_STATUS_CPTR
};
extern HAMLIB_EXPORT (uint64_t) rig_get_caps_int(rig_model_t rig_model, enum rig_caps_int_e rig_caps);
extern HAMLIB_EXPORT (const char *) rig_get_caps_cptr(rig_model_t rig_model, enum rig_caps_cptr_e rig_caps);
struct hamlib_async_pipe;
typedef struct hamlib_async_pipe hamlib_async_pipe_t;
//---Start cut here---
// Definition of struct hamlib_port moved to port.h
// Temporary include here until 5.0
/* For non-invasive debugging */
#ifndef NO_OLD_INCLUDES
__END_DECLS
#include <hamlib/port.h>
__BEGIN_DECLS
#endif
//---End cut here---
/* Macros to access data structures/pointers
* Make it easier to change location in preparation
* for moving them out of rig->state.
* See https://github.com/Hamlib/Hamlib/issues/1445
* https://github.com/Hamlib/Hamlib/issues/1452
* https://github.com/Hamlib/Hamlib/issues/1420
* https://github.com/Hamlib/Hamlib/issues/536
* https://github.com/Hamlib/Hamlib/issues/487
*/
// Note: Experimental, and subject to change!!
#if defined(IN_HAMLIB)
/* These are for internal use only */
#define RIGPORT(r) (&(r)->state.rigport)
#define PTTPORT(r) (&(r)->state.pttport)
#define DCDPORT(r) (&(r)->state.dcdport)
//Moved to src/cache.h #define CACHE(r) ((r)->cache_addr)
#define AMPPORT(a) (&(a)->state.ampport)
#define ROTPORT(r) (&(r)->state.rotport)
#define ROTPORT2(r) (&(r)->state.rotport2)
//Moved to include/hamlib/rig_state.h #define STATE(r) (&r->state)
//Moved to include/hamlib/amp_state.h #define AMPSTATE(a) (&(a)->state)
//Moved to include/hamlib/rot_state.h #define ROTSTATE(r) (&(r)->state)
/* Then when the rigport address is stored as a pointer somewhere else(say,
* in the rig structure itself), the definition could be changed to
* #define RIGPORT(r) r->somewhereelse
* and every reference is updated.
*/
#else
/* Define external unique names */
//#define HAMLIB_RIGPORT(r) ((hamlib_port_t *)rig_data_pointer(r, RIG_PTRX_RIGPORT))
//#define HAMLIB_PTTPORT(r) ((hamlib_port_t *)rig_data_pointer(r, RIG_PTRX_PTTPORT))
//#define HAMLIB_DCDPORT(r) ((hamlib_port_t *)rig_data_pointer(r, RIG_PTRX_DCDPORT))
//#define HAMLIB_CACHE(r) ((struct rig_cache *)rig_data_pointer(r, RIG_PTRX_CACHE))
//#define HAMLIB_AMPPORT(a) ((hamlib_port_t *)amp_data_pointer(a, RIG_PTRX_AMPPORT))
//#define HAMLIB_ROTPORT(r) ((hamlib_port_t *)rot_data_pointer(r, RIG_PTRX_ROTPORT))
//#define HAMLIB_ROTPORT2(r) ((hamlib_port_t *)rot_data_pointer(r, RIG_PTRX_ROTPORT2))
//#define HAMLIB_STATE(r) ((struct rig_state *)rig_data_pointer(r, RIG_PTRX_STATE))
//#define HAMLIB_AMPSTATE(a) ((struct amp_state *)amp_data_pointer(a, RIG_PTRX_AMPSTATE))
//#define HAMLIB_ROTSTATE(r) ((struct rot_state *)rot_data_pointer(r, RIG_PTRX_ROTSTATE))
#endif
typedef enum {
RIG_PTRX_NONE=0,
RIG_PTRX_RIGPORT,
RIG_PTRX_PTTPORT,
RIG_PTRX_DCDPORT,
RIG_PTRX_CACHE,
RIG_PTRX_AMPPORT,
RIG_PTRX_ROTPORT,
RIG_PTRX_ROTPORT2,
RIG_PTRX_STATE,
RIG_PTRX_AMPSTATE,
RIG_PTRX_ROTSTATE,
// New entries go directly above this line====================
RIG_PTRX_MAXIMUM
} rig_ptrx_t;
#define HAMLIB_ELAPSED_GET 0
#define HAMLIB_ELAPSED_SET 1
#define HAMLIB_ELAPSED_INVALIDATE 2
#define HAMLIB_CACHE_ALWAYS (-1)
typedef enum {
HAMLIB_CACHE_ALL, // to set all cache timeouts at once
HAMLIB_CACHE_VFO,
HAMLIB_CACHE_FREQ,
HAMLIB_CACHE_MODE,
HAMLIB_CACHE_PTT,
HAMLIB_CACHE_SPLIT,
HAMLIB_CACHE_WIDTH
} hamlib_cache_t;
typedef enum {
TWIDDLE_OFF,
TWIDDLE_ON
} twiddle_state_t;
struct rig_cache_deprecated {
int timeout_ms; // the cache timeout for invalidating itself
vfo_t vfo;
//freq_t freq; // to be deprecated in 4.1 when full Main/Sub/A/B caching is implemented in 4.1
// other abstraction here is based on dual vfo rigs and mapped to all others
// So we have four possible states of rig
// MainA, MainB, SubA, SubB
// Main is the Main VFO and Sub is for the 2nd VFO
// Most rigs have MainA and MainB
// Dual VFO rigs can have SubA and SubB too
// For dual VFO rigs simplex operations are all done on MainA/MainB -- ergo this abstraction
freq_t freqCurr; // Other VFO
freq_t freqOther; // Other VFO
freq_t freqMainA; // VFO_A, VFO_MAIN, and VFO_MAINA
freq_t freqMainB; // VFO_B, VFO_SUB, and VFO_MAINB
freq_t freqMainC; // VFO_C, VFO_MAINC
freq_t freqSubA; // VFO_SUBA -- only for rigs with dual Sub VFOs
freq_t freqSubB; // VFO_SUBB -- only for rigs with dual Sub VFOs
freq_t freqSubC; // VFO_SUBC -- only for rigs with 3 Sub VFOs
freq_t freqMem; // VFO_MEM -- last MEM channel
rmode_t modeCurr;
rmode_t modeOther;
rmode_t modeMainA;
rmode_t modeMainB;
rmode_t modeMainC;
rmode_t modeSubA;
rmode_t modeSubB;
rmode_t modeSubC;
rmode_t modeMem;
pbwidth_t widthCurr; // if non-zero then rig has separate width for MainA
pbwidth_t widthOther; // if non-zero then rig has separate width for MainA
pbwidth_t widthMainA; // if non-zero then rig has separate width for MainA
pbwidth_t widthMainB; // if non-zero then rig has separate width for MainB
pbwidth_t widthMainC; // if non-zero then rig has separate width for MainC
pbwidth_t widthSubA; // if non-zero then rig has separate width for SubA
pbwidth_t widthSubB; // if non-zero then rig has separate width for SubB
pbwidth_t widthSubC; // if non-zero then rig has separate width for SubC
pbwidth_t widthMem; // if non-zero then rig has separate width for Mem
ptt_t ptt;
split_t split;
vfo_t split_vfo; // split caches two values
struct timespec time_freqCurr;
struct timespec time_freqOther;
struct timespec time_freqMainA;
struct timespec time_freqMainB;
struct timespec time_freqMainC;
struct timespec time_freqSubA;
struct timespec time_freqSubB;
struct timespec time_freqSubC;
struct timespec time_freqMem;
struct timespec time_vfo;
struct timespec time_modeCurr;
struct timespec time_modeOther;
struct timespec time_modeMainA;
struct timespec time_modeMainB;
struct timespec time_modeMainC;
struct timespec time_modeSubA;
struct timespec time_modeSubB;
struct timespec time_modeSubC;
struct timespec time_modeMem;
struct timespec time_widthCurr;
struct timespec time_widthOther;
struct timespec time_widthMainA;
struct timespec time_widthMainB;
struct timespec time_widthMainC;
struct timespec time_widthSubA;
struct timespec time_widthSubB;
struct timespec time_widthSubC;
struct timespec time_widthMem;
struct timespec time_ptt;
struct timespec time_split;
int satmode; // if rig is in satellite mode
};
#include <hamlib/multicast.h>
struct multicast_s
{
int multicast_running;
int sock;
int seqnumber;
volatile int runflag; // = 0;
pthread_t threadid;
// this mutex is needed to control serial access
// as of 2023-05-13 we have main thread and multicast thread needing it
// eventually we should be able to use cached info only in the main thread to avoid contention
pthread_mutex_t mutex;
int mutex_initialized;
//#ifdef HAVE_ARPA_INET_H
//struct ip_mreq mreq; // = {0};
struct sockaddr_in dest_addr; // = {0};
int port;
//#endif
};
typedef unsigned int rig_comm_status_t;
#define RIG_COMM_STATUS_OK 0x00
#define RIG_COMM_STATUS_CONNECTING 0x01
#define RIG_COMM_STATUS_DISCONNECTED 0x02
#define RIG_COMM_STATUS_TERMINATED 0x03
#define RIG_COMM_STATUS_WARNING 0x04
#define RIG_COMM_STATUS_ERROR 0x05
//---Start cut here---
/* rig_state definition moved to include/hamlib/rig_state.h */
#ifndef NO_OLD_INCLUDES
__END_DECLS
#include <hamlib/rig_state.h>
__BEGIN_DECLS
#endif
//---End cut here---
typedef int (*vprintf_cb_t)(enum rig_debug_level_e,
rig_ptr_t,
const char *,
va_list);
typedef int (*freq_cb_t)(RIG *, vfo_t, freq_t, rig_ptr_t);
typedef int (*mode_cb_t)(RIG *, vfo_t, rmode_t, pbwidth_t, rig_ptr_t);
typedef int (*vfo_cb_t)(RIG *, vfo_t, rig_ptr_t);
typedef int (*ptt_cb_t)(RIG *, vfo_t, ptt_t, rig_ptr_t);
typedef int (*dcd_cb_t)(RIG *, vfo_t, dcd_t, rig_ptr_t);
typedef int (*pltune_cb_t)(RIG *,
vfo_t, freq_t *,
rmode_t *,
pbwidth_t *,
rig_ptr_t);
typedef int (*spectrum_cb_t)(RIG *,
struct rig_spectrum_line *,
rig_ptr_t);
// Do NOT add/remove from this structure -- it will break DLL backwards compatibility
struct rig_callbacks {
freq_cb_t freq_event;
rig_ptr_t freq_arg;
mode_cb_t mode_event;
rig_ptr_t mode_arg;
vfo_cb_t vfo_event;
rig_ptr_t vfo_arg;
ptt_cb_t ptt_event;
rig_ptr_t ptt_arg;
dcd_cb_t dcd_event;
rig_ptr_t dcd_arg;
pltune_cb_t pltune;
rig_ptr_t pltune_arg;
spectrum_cb_t spectrum_event;
rig_ptr_t spectrum_arg;
/* etc.. */
};
struct s_rig {
struct rig_caps *caps;
// Do not remove the deprecated structure -- it will mess up DLL backwards compatibility
struct rig_state_deprecated state_deprecated;
struct rig_callbacks callbacks;
// state should really be a pointer but that's a LOT of changes involved
struct rig_state state;
/* Data after this line is for hamlib internal use only,
* and should *NOT* be referenced by applications, as layout will change!
*/
struct rig_cache *cache_addr;
};
/* --------------- API function prototypes -----------------*/
extern HAMLIB_EXPORT(RIG *) rig_init HAMLIB_PARAMS((rig_model_t rig_model));
extern HAMLIB_EXPORT(int) rig_open HAMLIB_PARAMS((RIG *rig));
/*
* General API commands, from most primitive to least.. :()
* List Set/Get functions pairs
*/
extern HAMLIB_EXPORT(int)
rig_flush_force(hamlib_port_t *port, int flush_async_data);
extern HAMLIB_EXPORT(int)
rig_flush(hamlib_port_t *port);
extern HAMLIB_EXPORT(void)
rig_lock(RIG *rig, int lock);
#if BUILTINFUNC
#define rig_set_freq(r,v,f) rig_set_freq(r,v,f,__builtin_FUNCTION())
extern HAMLIB_EXPORT(int)
rig_set_freq HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
freq_t freq, const char*));
#else
extern HAMLIB_EXPORT(int)
rig_set_freq HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
freq_t freq));
#endif
#if BUILTINFUNC
#define rig_get_freq(r,v,f) rig_get_freq(r,v,f,__builtin_FUNCTION())
extern HAMLIB_EXPORT(int)
rig_get_freq HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
freq_t *freq, const char*));
#else
extern HAMLIB_EXPORT(int)
rig_get_freq HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
freq_t *freq));
#endif
extern HAMLIB_EXPORT(int)
rig_set_mode HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
rmode_t mode,
pbwidth_t width));
extern HAMLIB_EXPORT(int)
rig_get_mode HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
rmode_t *mode,
pbwidth_t *width));
#if BUILTINFUNC
#define rig_set_vfo(r,v) rig_set_vfo(r,v,__builtin_FUNCTION())
extern HAMLIB_EXPORT(int)
rig_set_vfo HAMLIB_PARAMS((RIG *rig,
vfo_t vfo, const char *func));
#else
extern HAMLIB_EXPORT(int)
rig_set_vfo HAMLIB_PARAMS((RIG *rig,
vfo_t vfo));
#endif
extern HAMLIB_EXPORT(int)
rig_get_vfo HAMLIB_PARAMS((RIG *rig,
vfo_t *vfo));
extern HAMLIB_EXPORT(int)
rig_get_vfo_info HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
freq_t *freq,
rmode_t *mode,
pbwidth_t *width,
split_t *split,
int *satmode));
extern HAMLIB_EXPORT(int)
rig_get_vfo_list HAMLIB_PARAMS((RIG *rig, char *buf, int buflen));
extern HAMLIB_EXPORT(int)
netrigctl_get_vfo_mode HAMLIB_PARAMS((RIG *rig));
extern HAMLIB_EXPORT(int)
rig_set_ptt HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
ptt_t ptt));
extern HAMLIB_EXPORT(int)
rig_get_ptt HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
ptt_t *ptt));
extern HAMLIB_EXPORT(int)
rig_get_dcd HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
dcd_t *dcd));
extern HAMLIB_EXPORT(int)
rig_set_rptr_shift HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
rptr_shift_t rptr_shift));
extern HAMLIB_EXPORT(int)
rig_get_rptr_shift HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
rptr_shift_t *rptr_shift));
extern HAMLIB_EXPORT(int)
rig_set_rptr_offs HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
shortfreq_t rptr_offs));
extern HAMLIB_EXPORT(int)
rig_get_rptr_offs HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
shortfreq_t *rptr_offs));
extern HAMLIB_EXPORT(int)
rig_set_ctcss_tone HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
tone_t tone));
extern HAMLIB_EXPORT(int)
rig_get_ctcss_tone HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
tone_t *tone));
extern HAMLIB_EXPORT(int)
rig_set_dcs_code HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
tone_t code));
extern HAMLIB_EXPORT(int)
rig_get_dcs_code HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
tone_t *code));
extern HAMLIB_EXPORT(int)
rig_set_ctcss_sql HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
tone_t tone));
extern HAMLIB_EXPORT(int)
rig_get_ctcss_sql HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
tone_t *tone));
extern HAMLIB_EXPORT(int)
rig_set_dcs_sql HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
tone_t code));
extern HAMLIB_EXPORT(int)
rig_get_dcs_sql HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
tone_t *code));
extern HAMLIB_EXPORT(int)
rig_set_split_freq HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
freq_t tx_freq));
extern HAMLIB_EXPORT(int)
rig_get_split_freq HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
freq_t *tx_freq));
extern HAMLIB_EXPORT(int)
rig_set_split_mode HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
rmode_t tx_mode,
pbwidth_t tx_width));
extern HAMLIB_EXPORT(int)
rig_get_split_mode HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
rmode_t *tx_mode,
pbwidth_t *tx_width));
extern HAMLIB_EXPORT(int)
rig_set_split_freq_mode HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
freq_t tx_freq,
rmode_t tx_mode,
pbwidth_t tx_width));
extern HAMLIB_EXPORT(int)
rig_get_split_freq_mode HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
freq_t *tx_freq,
rmode_t *tx_mode,
pbwidth_t *tx_width));
extern HAMLIB_EXPORT(int)
rig_set_split_vfo HAMLIB_PARAMS((RIG *,
vfo_t rx_vfo,
split_t split,
vfo_t tx_vfo));
extern HAMLIB_EXPORT(int)
rig_get_split_vfo HAMLIB_PARAMS((RIG *,
vfo_t rx_vfo,
split_t *split,
vfo_t *tx_vfo));
extern HAMLIB_EXPORT(int)
rig_set_rit HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
shortfreq_t rit));
extern HAMLIB_EXPORT(int)
rig_get_rit HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
shortfreq_t *rit));
extern HAMLIB_EXPORT(int)
rig_set_xit HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
shortfreq_t xit));
extern HAMLIB_EXPORT(int)
rig_get_xit HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
shortfreq_t *xit));
extern HAMLIB_EXPORT(int)
rig_set_ts HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
shortfreq_t ts));
extern HAMLIB_EXPORT(int)
rig_get_ts HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
shortfreq_t *ts));
extern HAMLIB_EXPORT(int)
rig_power2mW HAMLIB_PARAMS((RIG *rig,
unsigned int *mwpower,
float power,
freq_t freq,
rmode_t mode));
extern HAMLIB_EXPORT(int)
rig_mW2power HAMLIB_PARAMS((RIG *rig,
float *power,
unsigned int mwpower,
freq_t freq,
rmode_t mode));
extern HAMLIB_EXPORT(shortfreq_t)
rig_get_resolution HAMLIB_PARAMS((RIG *rig,
rmode_t mode));
extern HAMLIB_EXPORT(int)
rig_set_level HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
setting_t level,
value_t val));
extern HAMLIB_EXPORT(int)
rig_get_level HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
setting_t level,
value_t *val));
#define rig_get_strength(r,v,s) rig_get_level((r),(v),RIG_LEVEL_STRENGTH, (value_t*)(s))
extern HAMLIB_EXPORT(int)
rig_set_parm HAMLIB_PARAMS((RIG *rig,
setting_t parm,
value_t val));
extern HAMLIB_EXPORT(int)
rig_get_parm HAMLIB_PARAMS((RIG *rig,
setting_t parm,
value_t *val));
extern HAMLIB_EXPORT(int)
rig_set_conf HAMLIB_PARAMS((RIG *rig,
hamlib_token_t token,
const char *val));
// deprecating rig_get_conf
HL_DEPRECATED extern HAMLIB_EXPORT(int)
rig_get_conf HAMLIB_PARAMS((RIG *rig,
hamlib_token_t token,
char *val));
extern HAMLIB_EXPORT(int)
rig_get_conf2 HAMLIB_PARAMS((RIG *rig,
hamlib_token_t token,
char *val,
int val_len));
extern HAMLIB_EXPORT(int)
rig_set_powerstat HAMLIB_PARAMS((RIG *rig,
powerstat_t status));
extern HAMLIB_EXPORT(int)
rig_get_powerstat HAMLIB_PARAMS((RIG *rig,
powerstat_t *status));
extern HAMLIB_EXPORT(int)
rig_reset HAMLIB_PARAMS((RIG *rig,
reset_t reset)); /* dangerous! */
extern HAMLIB_EXPORT(int)
rig_set_ext_level HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
hamlib_token_t token,
value_t val));
extern HAMLIB_EXPORT(int)
rig_get_ext_level HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
hamlib_token_t token,
value_t *val));
extern HAMLIB_EXPORT(int)
rig_set_ext_func HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
hamlib_token_t token,
int status));
extern HAMLIB_EXPORT(int)
rig_get_ext_func HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
hamlib_token_t token,
int *status));
extern HAMLIB_EXPORT(int)
rig_set_ext_parm HAMLIB_PARAMS((RIG *rig,
hamlib_token_t token,
value_t val));
extern HAMLIB_EXPORT(int)
rig_get_ext_parm HAMLIB_PARAMS((RIG *rig,
hamlib_token_t token,
value_t *val));
extern HAMLIB_EXPORT(int)
rig_ext_func_foreach HAMLIB_PARAMS((RIG *rig,
int (*cfunc)(RIG *,
const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rig_ext_level_foreach HAMLIB_PARAMS((RIG *rig,
int (*cfunc)(RIG *,
const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rig_ext_parm_foreach HAMLIB_PARAMS((RIG *rig,
int (*cfunc)(RIG *,
const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(const struct confparams *)
rig_ext_lookup HAMLIB_PARAMS((RIG *rig,
const char *name));
extern HAMLIB_EXPORT(const struct confparams *)
rig_ext_lookup_tok HAMLIB_PARAMS((RIG *rig,
hamlib_token_t token));
extern HAMLIB_EXPORT(hamlib_token_t)
rig_ext_token_lookup HAMLIB_PARAMS((RIG *rig,
const char *name));
extern HAMLIB_EXPORT(int)
rig_token_foreach HAMLIB_PARAMS((RIG *rig,
int (*cfunc)(const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(const struct confparams *)
rig_confparam_lookup HAMLIB_PARAMS((RIG *rig,
const char *name));
extern HAMLIB_EXPORT(hamlib_token_t)
rig_token_lookup HAMLIB_PARAMS((RIG *rig,
const char *name));
extern HAMLIB_EXPORT(int)
rig_close HAMLIB_PARAMS((RIG *rig));
extern HAMLIB_EXPORT(int)
rig_cleanup HAMLIB_PARAMS((RIG *rig));
extern HAMLIB_EXPORT(int)
rig_set_ant HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
ant_t ant, /* antenna */
value_t option)); /* optional ant info */
extern HAMLIB_EXPORT(int)
rig_get_ant HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
ant_t ant,
value_t *option,
ant_t *ant_curr,
ant_t *ant_tx,
ant_t *ant_rx));
extern HAMLIB_EXPORT(setting_t)
rig_has_get_level HAMLIB_PARAMS((RIG *rig,
setting_t level));
extern HAMLIB_EXPORT(setting_t)
rig_has_set_level HAMLIB_PARAMS((RIG *rig,
setting_t level));
extern HAMLIB_EXPORT(setting_t)
rig_has_get_parm HAMLIB_PARAMS((RIG *rig,
setting_t parm));
extern HAMLIB_EXPORT(setting_t)
rig_has_set_parm HAMLIB_PARAMS((RIG *rig,
setting_t parm));
extern HAMLIB_EXPORT(setting_t)
rig_has_get_func HAMLIB_PARAMS((RIG *rig,
setting_t func));
extern HAMLIB_EXPORT(setting_t)
rig_has_set_func HAMLIB_PARAMS((RIG *rig,
setting_t func));
extern HAMLIB_EXPORT(int)
rig_set_func HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
setting_t func,
int status));
extern HAMLIB_EXPORT(int)
rig_get_func HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
setting_t func,
int *status));
extern HAMLIB_EXPORT(int)
rig_send_dtmf HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
const char *digits));
extern HAMLIB_EXPORT(int)
rig_recv_dtmf HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
char *digits,
int *length));
extern HAMLIB_EXPORT(int)
rig_send_morse HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
const char *msg));
extern HAMLIB_EXPORT(int)
rig_stop_morse HAMLIB_PARAMS((RIG *rig,
vfo_t vfo));
extern HAMLIB_EXPORT(int)
rig_wait_morse HAMLIB_PARAMS((RIG *rig,
vfo_t vfo));
extern HAMLIB_EXPORT(int)
rig_send_voice_mem HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
int ch));
extern HAMLIB_EXPORT(int)
rig_stop_voice_mem HAMLIB_PARAMS((RIG *rig,
vfo_t vfo));
extern HAMLIB_EXPORT(int)
rig_set_bank HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
int bank));
extern HAMLIB_EXPORT(int)
rig_set_mem HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
int ch));
extern HAMLIB_EXPORT(int)
rig_get_mem HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
int *ch));
extern HAMLIB_EXPORT(int)
rig_vfo_op HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
vfo_op_t op));
extern HAMLIB_EXPORT(vfo_op_t)
rig_has_vfo_op HAMLIB_PARAMS((RIG *rig,
vfo_op_t op));
extern HAMLIB_EXPORT(int)
rig_scan HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
scan_t scan,
int ch));
extern HAMLIB_EXPORT(scan_t)
rig_has_scan HAMLIB_PARAMS((RIG *rig,
scan_t scan));
extern HAMLIB_EXPORT(int)
rig_set_channel HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
const channel_t *chan)); /* mem */
extern HAMLIB_EXPORT(int)
rig_get_channel HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
channel_t *chan, int read_only));
extern HAMLIB_EXPORT(int)
rig_set_chan_all HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
const channel_t chans[]));
extern HAMLIB_EXPORT(int)
rig_get_chan_all HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
channel_t chans[]));
extern HAMLIB_EXPORT(int)
rig_set_chan_all_cb HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
chan_cb_t chan_cb,
rig_ptr_t));
extern HAMLIB_EXPORT(int)
rig_get_chan_all_cb HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
chan_cb_t chan_cb,
rig_ptr_t));
extern HAMLIB_EXPORT(int)
rig_set_mem_all_cb HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
chan_cb_t chan_cb,
confval_cb_t parm_cb,
rig_ptr_t));
extern HAMLIB_EXPORT(int)
rig_get_mem_all_cb HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
chan_cb_t chan_cb,
confval_cb_t parm_cb,
rig_ptr_t));
extern HAMLIB_EXPORT(int)
rig_set_mem_all HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
const channel_t *chan,
const struct confparams *,
const value_t *));
extern HAMLIB_EXPORT(int)
rig_get_mem_all HAMLIB_PARAMS((RIG *rig,
vfo_t vfo,
channel_t *chan,
const struct confparams *,
value_t *));
extern HAMLIB_EXPORT(const chan_t *)
rig_lookup_mem_caps HAMLIB_PARAMS((RIG *rig,
int ch));
extern HAMLIB_EXPORT(int)
rig_mem_count HAMLIB_PARAMS((RIG *rig));
HL_DEPRECATED
extern HAMLIB_EXPORT(int)
rig_set_trn HAMLIB_PARAMS((RIG *rig,
int trn));
HL_DEPRECATED
extern HAMLIB_EXPORT(int)
rig_get_trn HAMLIB_PARAMS((RIG *rig,
int *trn));
extern HAMLIB_EXPORT(int)
rig_set_freq_callback HAMLIB_PARAMS((RIG *,
freq_cb_t,
rig_ptr_t));
extern HAMLIB_EXPORT(int)
rig_set_mode_callback HAMLIB_PARAMS((RIG *,
mode_cb_t,
rig_ptr_t));
extern HAMLIB_EXPORT(int)
rig_set_vfo_callback HAMLIB_PARAMS((RIG *,
vfo_cb_t,
rig_ptr_t));
extern HAMLIB_EXPORT(int)
rig_set_ptt_callback HAMLIB_PARAMS((RIG *,
ptt_cb_t,
rig_ptr_t));
extern HAMLIB_EXPORT(int)
rig_set_dcd_callback HAMLIB_PARAMS((RIG *,
dcd_cb_t,
rig_ptr_t));
extern HAMLIB_EXPORT(int)
rig_set_pltune_callback HAMLIB_PARAMS((RIG *,
pltune_cb_t,
rig_ptr_t));
extern HAMLIB_EXPORT(int)
rig_set_spectrum_callback HAMLIB_PARAMS((RIG *,
spectrum_cb_t,
rig_ptr_t));
extern HAMLIB_EXPORT(int)
rig_set_twiddle HAMLIB_PARAMS((RIG *rig,
int seconds));
extern HAMLIB_EXPORT(int)
rig_get_twiddle HAMLIB_PARAMS((RIG *rig,
int *seconds));
extern HAMLIB_EXPORT(int)
rig_set_uplink HAMLIB_PARAMS((RIG *rig,
int val));
extern HAMLIB_EXPORT(const char *)
rig_get_info HAMLIB_PARAMS((RIG *rig));
extern HAMLIB_EXPORT(struct rig_caps *)
rig_get_caps HAMLIB_PARAMS((rig_model_t rig_model));
extern HAMLIB_EXPORT(const freq_range_t *)
rig_get_range HAMLIB_PARAMS((const freq_range_t *range_list,
freq_t freq,
rmode_t mode));
extern HAMLIB_EXPORT(pbwidth_t)
rig_passband_normal HAMLIB_PARAMS((RIG *rig,
rmode_t mode));
extern HAMLIB_EXPORT(pbwidth_t)
rig_passband_narrow HAMLIB_PARAMS((RIG *rig,
rmode_t mode));
extern HAMLIB_EXPORT(pbwidth_t)
rig_passband_wide HAMLIB_PARAMS((RIG *rig,
rmode_t mode));
extern HAMLIB_EXPORT(const char *)
rigerror HAMLIB_PARAMS((int errnum));
extern HAMLIB_EXPORT(const char *)
rigerror2 HAMLIB_PARAMS((int errnum));
extern HAMLIB_EXPORT(int)
rig_setting2idx HAMLIB_PARAMS((setting_t s));
#define HAMLIB_SETTINGS_FILE "hamlib_settings"
extern HAMLIB_EXPORT(setting_t)
rig_idx2setting(int i);
/*
* Even if these functions are prefixed with "rig_", they are not rig specific
* Maybe "hamlib_" would have been better. Let me know. --SF
*/
extern HAMLIB_EXPORT(void)
rig_set_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
extern HAMLIB_EXPORT(void)
rig_get_debug HAMLIB_PARAMS((enum rig_debug_level_e *debug_level));
extern HAMLIB_EXPORT(void)
rig_set_debug_time_stamp HAMLIB_PARAMS((int flag));
#define rig_set_debug_level(level) rig_set_debug(level)
extern HAMLIB_EXPORT(int)
rig_need_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level));
extern HAMLIB_EXPORT(void)add2debugmsgsave(const char *s);
// this needs to be fairly big to avoid compiler warnings
extern HAMLIB_EXPORT_VAR(char) debugmsgsave[DEBUGMSGSAVE_SIZE]; // last debug msg
extern HAMLIB_EXPORT_VAR(char) debugmsgsave2[DEBUGMSGSAVE_SIZE]; // last-1 debug msg
// debugmsgsave3 is deprecated
extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debug msg
#define rig_debug_clear() { debugmsgsave[0] = debugmsgsave2[0] = debugmsgsave3[0] = 0; };
#ifndef __cplusplus
#ifdef __GNUC__
// doing the debug macro with a dummy sprintf allows gcc to check the format string
#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)
#endif
#endif
// Measuring elapsed time -- local variable inside function when macro is used
#define ELAPSED1 struct timespec __begin; elapsed_ms(&__begin, HAMLIB_ELAPSED_SET);
#define ELAPSED2 rig_debug(RIG_DEBUG_VERBOSE, "%s%d:%s: elapsed=%.0lfms\n", hl_stars(STATE(rig)->depth), STATE(rig)->depth, __func__, elapsed_ms(&__begin, HAMLIB_ELAPSED_GET));
// use this instead of snprintf for automatic detection of buffer limit
#define SNPRINTF(s,n,...) { if (snprintf(s,n,##__VA_ARGS__) >= (n)) fprintf(stderr,"***** %s(%d): message truncated *****\n", __func__, __LINE__); }
extern HAMLIB_EXPORT(void)
rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level,
const char *fmt, ...));
extern HAMLIB_EXPORT(vprintf_cb_t)
rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb,
rig_ptr_t arg));
extern HAMLIB_EXPORT(FILE *)
rig_set_debug_file HAMLIB_PARAMS((FILE *stream));
extern HAMLIB_EXPORT(int)
rig_register HAMLIB_PARAMS((struct rig_caps *caps));
extern HAMLIB_EXPORT(int)
rig_unregister HAMLIB_PARAMS((rig_model_t rig_model));
extern HAMLIB_EXPORT(int)
rig_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rig_caps *, rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rig_list_foreach_model HAMLIB_PARAMS((int (*cfunc)(const rig_model_t rig_model, rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rig_load_backend HAMLIB_PARAMS((const char *be_name));
extern HAMLIB_EXPORT(int)
rig_check_backend HAMLIB_PARAMS((rig_model_t rig_model));
extern HAMLIB_EXPORT(int)
rig_load_all_backends HAMLIB_PARAMS((void));
typedef int (*rig_probe_func_t)(const hamlib_port_t *, rig_model_t, rig_ptr_t);
extern HAMLIB_EXPORT(int)
rig_probe_all HAMLIB_PARAMS((hamlib_port_t *p,
rig_probe_func_t,
rig_ptr_t));
extern HAMLIB_EXPORT(rig_model_t)
rig_probe HAMLIB_PARAMS((hamlib_port_t *p));
/* Misc calls */
extern HAMLIB_EXPORT(const char *) rig_strrmode(rmode_t mode);
extern HAMLIB_EXPORT(int) rig_strrmodes(rmode_t modes, char *buf, int buflen);
extern HAMLIB_EXPORT(const char *) rig_strvfo(vfo_t vfo);
extern HAMLIB_EXPORT(const char *) rig_strfunc(setting_t);
extern HAMLIB_EXPORT(const char *) rig_strlevel(setting_t);
extern HAMLIB_EXPORT(const char *) rig_strparm(setting_t);
extern HAMLIB_EXPORT(const char *) rig_stragclevel(enum agc_level_e level);
extern HAMLIB_EXPORT(enum agc_level_e) rig_levelagcstr (const char *agcString);
extern HAMLIB_EXPORT(enum agc_level_e) rig_levelagcvalue (int agcValue);
extern HAMLIB_EXPORT(value_t) rig_valueagclevel (enum agc_level_e agcLevel);
extern HAMLIB_EXPORT(const char *) rig_strptrshift(rptr_shift_t);
extern HAMLIB_EXPORT(const char *) rig_strvfop(vfo_op_t op);
extern HAMLIB_EXPORT(const char *) rig_strscan(scan_t scan);
extern HAMLIB_EXPORT(const char *) rig_strstatus(enum rig_status_e status);
extern HAMLIB_EXPORT(const char *) rig_strmtype(chan_type_t mtype);
extern HAMLIB_EXPORT(const char *) rig_strspectrummode(enum rig_spectrum_mode_e mode);
extern HAMLIB_EXPORT(const char *) rig_strcommstatus(rig_comm_status_t vfo);
extern HAMLIB_EXPORT(rmode_t) rig_parse_mode(const char *s);
extern HAMLIB_EXPORT(vfo_t) rig_parse_vfo(const char *s);
extern HAMLIB_EXPORT(setting_t) rig_parse_func(const char *s);
extern HAMLIB_EXPORT(setting_t) rig_parse_level(const char *s);
extern HAMLIB_EXPORT(setting_t) rig_parse_parm(const char *s);
extern HAMLIB_EXPORT(vfo_op_t) rig_parse_vfo_op(const char *s);
extern HAMLIB_EXPORT(scan_t) rig_parse_scan(const char *s);
extern HAMLIB_EXPORT(rptr_shift_t) rig_parse_rptr_shift(const char *s);
extern HAMLIB_EXPORT(chan_type_t) rig_parse_mtype(const char *s);
extern HAMLIB_EXPORT(const char *) rig_license HAMLIB_PARAMS((void));
extern HAMLIB_EXPORT(const char *) rig_version HAMLIB_PARAMS((void));
extern HAMLIB_EXPORT(const char *) rig_copyright HAMLIB_PARAMS((void));
extern HAMLIB_EXPORT(void) rig_no_restore_ai(void);
extern HAMLIB_EXPORT(int) rig_get_cache_timeout_ms(RIG *rig, hamlib_cache_t selection);
extern HAMLIB_EXPORT(int) rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection, int ms);
extern HAMLIB_EXPORT(int) rig_set_vfo_opt(RIG *rig, int status);
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);
extern HAMLIB_EXPORT(int) rig_get_rig_info(RIG *rig, char *response, int max_response_len);
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);
extern HAMLIB_EXPORT(int) rig_get_cache_freq(RIG *rig, vfo_t vfo, freq_t *freq, int * cache_ms_freq);
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);
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);
typedef unsigned long rig_useconds_t;
extern HAMLIB_EXPORT(int) hl_usleep(rig_useconds_t msec);
extern HAMLIB_EXPORT(int) rig_cookie(RIG *rig, enum cookie_e cookie_cmd, char *cookie, int cookie_len);
extern HAMLIB_EXPORT(int) rig_password(RIG *rig, const char *key1);
extern HAMLIB_EXPORT(void) rig_password_generate_secret(char *pass,
char result[HAMLIB_SECRET_LENGTH + 1]);
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);
extern HAMLIB_EXPORT(int)
longlat2locator HAMLIB_PARAMS((double longitude,
double latitude,
char *locator_res,
int pair_count));
extern HAMLIB_EXPORT(int)
locator2longlat HAMLIB_PARAMS((double *longitude,
double *latitude,
const char *locator));
extern HAMLIB_EXPORT(char*) rig_make_md5(const char *pass);
extern HAMLIB_EXPORT(int) rig_set_lock_mode(RIG *rig, int lock);
extern HAMLIB_EXPORT(int) rig_get_lock_mode(RIG *rig, int *lock);
extern HAMLIB_EXPORT(int) rig_is_model(RIG *rig, rig_model_t model);
extern HAMLIB_EXPORT(char*) rig_date_strget(char *buf, int buflen, int localtime);
enum GPIO { GPIO1, GPIO2, GPIO3, GPIO4 };
extern HAMLIB_EXPORT(int) rig_cm108_get_bit(hamlib_port_t *p, enum GPIO gpio, int *bit);
extern HAMLIB_EXPORT(int) rig_cm108_set_bit(hamlib_port_t *p, enum GPIO gpio, int bit);
extern HAMLIB_EXPORT(int) rig_band_changed(RIG *rig, hamlib_bandselect_t band);
extern HAMLIB_EXPORT(void *) rig_data_pointer(RIG *rig, rig_ptrx_t idx);
__END_DECLS
#endif /* _RIG_H */
add2debugmsgsave
void add2debugmsgsave(const char *s)
Handle stack trace messages.
Definition rig.c:426
hamlib_port_t_deprecated
struct hamlib_port_deprecated hamlib_port_t_deprecated
hamlib_port_t
struct hamlib_port hamlib_port_t
Port definition.
rig_parse_parm
setting_t rig_parse_parm(const char *s)
Convert alpha string to RIG_PARM_...
Definition misc.c:1315
rig_parse_vfo
vfo_t rig_parse_vfo(const char *s)
Convert alpha string to enum RIG_VFO_...
Definition misc.c:650
rig_strparm
const char * rig_strparm(setting_t parm)
Convert enum RIG_PARM_... to alpha string.
Definition misc.c:1365
rig_strspectrummode
const char * rig_strspectrummode(enum rig_spectrum_mode_e mode)
Convert enum RIG_SPECTRUM_MODE_... to alpha string.
Definition misc.c:1823
rig_strrmodes
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:581
rig_strvfo
const char * rig_strvfo(vfo_t vfo)
Convert enum RIG_VFO_... to alpha string.
Definition misc.c:679
rig_strscan
const char * rig_strscan(scan_t rscan)
Convert enum RIG_SCAN_... to alpha string.
Definition misc.c:1658
rig_parse_rptr_shift
rptr_shift_t rig_parse_rptr_shift(const char *s)
Convert alpha char to enum RIG_RPT_SHIFT_...
Definition misc.c:1712
rig_levelagcstr
enum agc_level_e rig_levelagcstr(const char *agcString)
Convert AGC string... to agc_level_e.
Definition misc.c:1517
rig_strfunc
const char * rig_strfunc(setting_t func)
Convert enum RIG_FUNC_... to alpha string.
Definition misc.c:896
rig_valueagclevel
value_t rig_valueagclevel(enum agc_level_e agcLevel)
Convert a enum agc_level_e to value.
Definition misc.c:1466
rig_strptrshift
const char * rig_strptrshift(rptr_shift_t shift)
convert enum RIG_RPT_SHIFT_... to printable character
Definition misc.c:1687
rig_idx2setting
uint64_t rig_idx2setting(int i)
Definition misc.c:808
rig_parse_mtype
chan_type_t rig_parse_mtype(const char *s)
Convert alpha string to enum RIG_MTYPE_...
Definition misc.c:1758
rig_stragclevel
const char * rig_stragclevel(enum agc_level_e level)
Convert enum RIG_AGC_... to alpha string.
Definition misc.c:1441
rig_levelagcvalue
enum agc_level_e rig_levelagcvalue(int agcValue)
Convert a value to agc_level_e – constrains the range.
Definition misc.c:1486
rig_strcommstatus
const char * rig_strcommstatus(rig_comm_status_t status)
Convert enum RIG_COMM_STATUS... to alpha string.
Definition misc.c:2755
rig_strstatus
const char * rig_strstatus(enum rig_status_e status)
Convert enum RIG_STATUS_... to printable string.
Definition misc.c:429
rig_parse_level
setting_t rig_parse_level(const char *s)
Convert alpha string to enum RIG_LEVEL_...
Definition misc.c:1110
rig_parse_scan
scan_t rig_parse_scan(const char *s)
Convert alpha string to enum RIG_SCAN_...
Definition misc.c:1633
rig_strrmode
const char * rig_strrmode(rmode_t mode)
Convert enum RIG_MODE to alpha string.
Definition misc.c:549
rig_parse_func
setting_t rig_parse_func(const char *s)
Convert alpha string to enum RIG_FUNC_...
Definition misc.c:820
rig_strmtype
const char * rig_strmtype(chan_type_t mtype)
Convert enum RIG_MTYPE_... to alpha string.
Definition misc.c:1783
rig_parse_mode
rmode_t rig_parse_mode(const char *s)
Convert alpha string to enum RIG_MODE.
Definition misc.c:522
rig_strvfop
const char * rig_strvfop(vfo_op_t op)
Convert enum RIG_OP_... to alpha string.
Definition misc.c:1588
rig_strlevel
const char * rig_strlevel(setting_t level)
Convert enum RIG_LEVEL_... to alpha string.
Definition misc.c:1191
rig_flush_force
int rig_flush_force(hamlib_port_t *port, int flush_async_data)
Force flush of rig communication data buffers.
Definition misc.c:2261
rig_parse_vfo_op
vfo_op_t rig_parse_vfo_op(const char *s)
Convert alpha string to enum RIG_OP_...
Definition misc.c:1563
rig_get_info
const char * rig_get_info(RIG *rig)
get general information from the radio
Definition rig.c:7950
rig_set_vfo
int rig_set_vfo(RIG *rig, vfo_t vfo)
set the current VFO
Definition rig.c:3370
vfo_t
unsigned int vfo_t
VFO definition.
Definition rig.h:533
rig_get_split_freq_mode
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:5660
rig_send_dtmf
int rig_send_dtmf(RIG *rig, vfo_t vfo, const char *digits)
send DTMF digits
Definition rig.c:7332
rig_set_twiddle
int rig_set_twiddle(RIG *rig, int seconds)
timeout (secs) to stop rigctld when VFO is manually changed
Definition rig.c:1968
chan_t
struct chan_list chan_t
chan_t type
Definition rig.h:1737
ant_t
unsigned int ant_t
Antenna typedef.
Definition rig.h:1004
meter_level_e
meter_level_e
Level display meters.
Definition rig.h:1028
rig_get_rig_info
int rig_get_rig_info(RIG *rig, char *response, int max_response_len)
get freq/mode/width for requested VFO
Definition rig.c:8017
rig_get_mem_all
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:1527
rig_get_dcd
int rig_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
get the status of the DCD
Definition rig.c:4282
client_t
enum client_e client_t
serial_parity_e
serial_parity_e
Serial parity.
Definition rig.h:348
rig_get_split_vfo
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:5999
rig_get_mode
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:3039
rig_get_cache
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:311
rig_set_channel
int rig_set_channel(RIG *rig, vfo_t vfo, const channel_t *chan)
set channel data
Definition mem.c:683
rig_set_split_vfo
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:5748
dcd_e
dcd_e
Definition rig.h:669
cal_table_t
struct cal_table cal_table_t
calibration table type
Definition rig.h:1786
rig_ext_token_lookup
hamlib_token_t rig_ext_token_lookup(RIG *rig, const char *name)
Simple lookup returning token id associated with name.
Definition ext.c:323
rig_set_freq_callback
int rig_set_freq_callback(RIG *rig, freq_cb_t cb, rig_ptr_t arg)
set the callback for freq events
Definition event.c:374
hamlib_band_t
hamlib_band_t
Band enumeration.
Definition rig.h:797
hamlib_copyright2
const char * hamlib_copyright2
Hamlib copyright notice.
Definition rig.c:126
rig_get_rptr_offs
int rig_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs)
get the current repeater offset
Definition rig.c:4666
rig_get_ext_func
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:858
rig_set_powerstat
int rig_set_powerstat(RIG *rig, powerstat_t status)
turn on/off the radio
Definition rig.c:6906
rig_get_powerstat
int rig_get_powerstat(RIG *rig, powerstat_t *status)
get the on/off status of the radio
Definition rig.c:6958
rig_set_dcs_sql
int rig_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
set the current DCS code
Definition tones.c:496
hamlib_token_t
long hamlib_token_t
configuration token
Definition rig.h:882
serial_control_state_e
serial_control_state_e
Serial control state.
Definition rig.h:370
rig_set_mem
int rig_set_mem(RIG *rig, vfo_t vfo, int ch)
set the current memory channel number
Definition mem.c:67
rig_power2mW
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:6725
rig_has_set_func
setting_t rig_has_set_func(RIG *rig, setting_t func)
check ability of radio functions
Definition settings.c:468
rig_get_vfo
int rig_get_vfo(RIG *rig, vfo_t *vfo)
get the current VFO
Definition rig.c:3517
rig_set_split_freq_mode
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:5518
rmode_t
uint64_t rmode_t
Radio mode.
Definition rig.h:1381
rig_set_vfo_callback
int rig_set_vfo_callback(RIG *rig, vfo_cb_t cb, rig_ptr_t arg)
set the callback for vfo events
Definition event.c:430
pbwidth_t
shortfreq_t pbwidth_t
Definition rig.h:665
rig_set_level
int rig_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
set a radio level setting
Definition settings.c:74
rig_get_rit
int rig_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
get the current RIT offset
Definition rig.c:6170
rig_cleanup
int rig_cleanup(RIG *rig)
release a rig handle and free associated memory
Definition rig.c:1924
rig_type_t
rig_type_t
Rig type flags.
Definition rig.h:380
rig_get_mem
int rig_get_mem(RIG *rig, vfo_t vfo, int *ch)
get the current memory channel number
Definition mem.c:130
rig_set_mem_all
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:1459
rig_set_ext_parm
int rig_set_ext_parm(RIG *rig, hamlib_token_t token, value_t val)
set a radio parm extra parameter
Definition settings.c:923
rig_port_t
enum rig_port_e rig_port_t
Port type.
split_t
split_t
Split mode.
Definition rig.h:462
rig_get_vfo_list
int rig_get_vfo_list(RIG *rig, char *buf, int buflen)
get list of available vfos
Definition rig.c:8205
rptr_shift_t
rptr_shift_t
Repeater shift type.
Definition rig.h:452
rig_license
const char * rig_license()
get the Hamlib license
Definition rig.c:8263
rig_set_mem_all_cb
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:1325
rig_get_dcs_sql
int rig_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code)
get the current DCS code
Definition tones.c:559
rig_has_scan
scan_t rig_has_scan(RIG *rig, scan_t scan)
check availability of scanning functions
Definition rig.c:7227
client_e
client_e
Definition rig.h:751
rig_get_clock
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:8242
rig_get_mem_all_cb
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:1393
rig_set_ctcss_sql
int rig_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
set CTCSS squelch
Definition tones.c:365
ann_t
ann_t
Announce.
Definition rig.h:947
rig_set_dcs_code
int rig_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code)
set the current encoding DCS code
Definition tones.c:231
rig_set_dcd_callback
int rig_set_dcd_callback(RIG *rig, dcd_cb_t cb, rig_ptr_t arg)
set the callback for dcd events
Definition event.c:486
rig_get_channel
int rig_get_channel(RIG *rig, vfo_t vfox, channel_t *chan, int read_only)
get channel data
Definition mem.c:827
rig_get_freq
int rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
get the frequency of the target VFO
Definition rig.c:2498
rig_set_func
int rig_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
activate/de-activate functions of radio
Definition settings.c:499
rig_get_ptt
int rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
get the status of the PTT
Definition rig.c:3957
rig_get_chan_all_cb
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:1125
rig_mW2power
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:6799
rig_set_bank
int rig_set_bank(RIG *rig, vfo_t vfo, int bank)
set the current memory bank
Definition mem.c:193
rig_ext_lookup_tok
const struct confparams * rig_ext_lookup_tok(RIG *rig, hamlib_token_t token)
lookup ext token, return pointer to confparams struct.
Definition ext.c:278
rig_ext_func_foreach
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:81
rig_version
const char * rig_version()
get the Hamlib version
Definition rig.c:8273
rig_get_ctcss_sql
int rig_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone)
get the current CTCSS squelch
Definition tones.c:433
rig_set_debug_file
FILE * rig_set_debug_file(FILE *stream)
Change the output stream from stderr to a different stream.
Definition debug.c:333
rig_get_xit
int rig_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
get the current XIT offset
Definition rig.c:6320
rig_get_caps_cptr
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:2700
rig_set_spectrum_callback
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:544
rig_get_parm
int rig_get_parm(RIG *rig, setting_t parm, value_t *val)
get the value of a parameter
Definition settings.c:286
rig_get_caps_int
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:2654
rig_caps_int_e
rig_caps_int_e
Enumeration of rig->caps values.
Definition rig.h:2350
rig_get_trn
int rig_get_trn(RIG *rig, int *trn)
get the current transceive mode
Definition event.c:601
rig_set_rptr_offs
int rig_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
set the repeater offset
Definition rig.c:4589
rig_get_ctcss_tone
int rig_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
get the current CTCSS sub-tone frequency
Definition tones.c:167
rig_has_set_level
setting_t rig_has_set_level(RIG *rig, setting_t level)
check settable ability of level settings
Definition settings.c:350
rig_parm_e
rig_parm_e
Rig Parameters.
Definition rig.h:1158
rig_set_ant
int rig_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
set the antenna
Definition rig.c:6552
rig_set_debug_time_stamp
void rig_set_debug_time_stamp(int flag)
Enable or disable the time stamp on debugging output.
Definition debug.c:189
rig_get_resolution
shortfreq_t rig_get_resolution(RIG *rig, rmode_t mode)
get the best frequency resolution of the rig
Definition rig.c:6864
rig_get_vfo_info
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:8124
rig_passband_wide
pbwidth_t rig_passband_wide(RIG *rig, rmode_t mode)
get the wide passband of a mode
Definition rig.c:3311
channel_t
struct channel channel_t
Channel structure typedef.
Definition rig.h:1634
setting_t
uint64_t setting_t
Setting bit mask.
Definition rig.h:1223
powerstat_t
powerstat_t
Radio power state.
Definition rig.h:727
multicast_item_e
multicast_item_e
Multicast data items 3 different data item can be included in the multicast JSON.
Definition rig.h:1201
rig_has_get_func
setting_t rig_has_get_func(RIG *rig, setting_t func)
check ability of radio functions
Definition settings.c:438
rig_set_uplink
int rig_set_uplink(RIG *rig, int val)
For GPredict to avoid reading frequency on uplink VFO.
Definition rig.c:1992
rig_get_func
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:596
rig_set_split_freq
int rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
set the split frequencies
Definition rig.c:4749
rig_probe_all
int rig_probe_all(hamlib_port_t *port, rig_probe_func_t cfunc, rig_ptr_t data)
try to guess rigs
Definition rig.c:7086
rig_errcode_e
rig_errcode_e
Hamlib error codes.
Definition rig.h:196
rig_ext_parm_foreach
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:181
rig_conf_e
rig_conf_e
parameter types
Definition rig.h:904
scan_t
scan_t
Rig Scan operation.
Definition rig.h:866
rig_send_voice_mem
int rig_send_voice_mem(RIG *rig, vfo_t vfo, int ch)
send voice memory content
Definition rig.c:7768
rig_recv_dtmf
int rig_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length)
receive DTMF digits
Definition rig.c:7409
rig_set_mode_callback
int rig_set_mode_callback(RIG *rig, mode_cb_t cb, rig_ptr_t arg)
set the callback for mode events
Definition event.c:402
rig_set_freq
int rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
set the frequency of the target VFO
Definition rig.c:2150
rig_set_ptt
int rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
set PTT on/off
Definition rig.c:3621
rig_set_ext_level
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:661
hamlib_version2
const char * hamlib_version2
Hamlib version string.
Definition rig.c:113
freq_t
double freq_t
Frequency type.
Definition rig.h:473
rig_scan
int rig_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
perform Memory/VFO operations
Definition rig.c:7260
cookie_e
cookie_e
Rig Cookie enumerations.
Definition rig.h:1191
rig_send_morse
int rig_send_morse(RIG *rig, vfo_t vfo, const char *msg)
send morse code
Definition rig.c:7485
rig_get_function_ptr
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:2361
rig_setting2idx
int rig_setting2idx(setting_t s)
basically convert setting_t expressed 2^n to n
Definition settings.c:982
rig_mem_count
int rig_mem_count(RIG *rig)
get memory channel count
Definition mem.c:1651
ptt_t
ptt_t
PTT status.
Definition rig.h:696
rig_lookup_mem_caps
const chan_t * rig_lookup_mem_caps(RIG *rig, int ch)
lookup the memory type and capabilities
Definition mem.c:1586
dcd_type_e
dcd_type_e
DCD (Data Carrier Detect) type.
Definition rig.h:680
rig_init
RIG * rig_init(rig_model_t rig_model)
Allocate a new RIG handle.
Definition rig.c:616
rig_has_get_parm
setting_t rig_has_get_parm(RIG *rig, setting_t parm)
check retrieval ability of parameter settings
Definition settings.c:380
rig_ext_level_foreach
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:131
rig_get_ext_level
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:727
rig_set_pltune_callback
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:516
rig_get_conf
int rig_get_conf(RIG *rig, hamlib_token_t token, char *val)
get the value of a configuration parameter
Definition conf.c:1559
freq_range_t
struct freq_range_list freq_range_t
Frequency range.
rig_set_clock
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:8224
rig_set_ctcss_tone
int rig_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
set CTCSS sub-tone frequency
Definition tones.c:99
rig_set_mode
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:2838
vfo_op_t
vfo_op_t
VFO operation.
Definition rig.h:773
rig_get_ts
int rig_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts)
get the current Tuning Step
Definition rig.c:6470
ptt_type_t
enum ptt_type_e ptt_type_t
PTT (Push To Talk) type.
shortfreq_t
signed long shortfreq_t
Short frequency type.
Definition rig.h:495
rig_get_debug
void rig_get_debug(enum rig_debug_level_e *debug_level)
Get the current debug level.
Definition debug.c:159
rig_set_debug_callback
vprintf_cb_t rig_set_debug_callback(vprintf_cb_t cb, rig_ptr_t arg)
Set callback to handle debugging messages.
Definition debug.c:315
rig_copyright
const char * rig_copyright()
get the Hamlib copyright
Definition rig.c:8283
rig_need_debug
int rig_need_debug(enum rig_debug_level_e debug_level)
Test if a given debug level is active.
Definition debug.c:175
rig_port_e
rig_port_e
Port type.
Definition rig.h:327
rig_wait_morse
int rig_wait_morse(RIG *rig, vfo_t vfo)
wait morse code
Definition rig.c:7697
rig_close
int rig_close(RIG *rig)
close the communication to the rig
Definition rig.c:1750
rig_passband_narrow
pbwidth_t rig_passband_narrow(RIG *rig, rmode_t mode)
get the narrow passband of a mode
Definition rig.c:3258
serial_handshake_e
serial_handshake_e
Serial handshake.
Definition rig.h:360
rigerror
const char * rigerror(int errnum)
Add error message to debug output.
Definition rig.c:520
rig_get_cache_freq
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:553
agc_level_e
agc_level_e
AGC delay settings.
Definition rig.h:398
tone_t
unsigned int tone_t
CTCSS and DCS type definition.
Definition rig.h:317
rig_get_chan_all
int rig_get_chan_all(RIG *rig, vfo_t vfo, channel_t chans[])
get all channel data
Definition mem.c:1209
rig_set_chan_all
int rig_set_chan_all(RIG *rig, vfo_t vfo, const channel_t chans[])
set all channel data
Definition mem.c:1166
rig_set_vfo_opt
int rig_set_vfo_opt(RIG *rig, int status)
set the vfo option for rigctld
Definition rig.c:7911
rig_set_ptt_callback
int rig_set_ptt_callback(RIG *rig, ptt_cb_t cb, rig_ptr_t arg)
set the callback for ptt events
Definition event.c:458
rig_passband_normal
pbwidth_t rig_passband_normal(RIG *rig, rmode_t mode)
get the normal passband of a mode
Definition rig.c:3207
rig_debug_level_e
rig_debug_level_e
Hamlib debug levels.
Definition rig.h:246
RIG_SETTING_MAX
#define RIG_SETTING_MAX
Maximum # of rig settings.
Definition rig.h:1229
rig_ext_lookup
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:231
rig_has_set_parm
setting_t rig_has_set_parm(RIG *rig, setting_t parm)
check settable ability of parameter settings
Definition settings.c:409
channel_cap_t
struct channel_cap channel_cap_t
Channel cap.
Definition rig.h:1676
RIG
struct s_rig RIG
Rig structure definition (see rig for details).
Definition rig.h:277
rig_set_ext_func
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:792
rig_confparam_lookup
const struct confparams * rig_confparam_lookup(RIG *rig, const char *name)
lookup a confparam struct
Definition conf.c:1393
rig_set_rit
int rig_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
set the RIT
Definition rig.c:6098
hamlib_bandselect_t
hamlib_bandselect_t
Definition rig.h:817
rig_stop_voice_mem
int rig_stop_voice_mem(RIG *rig, vfo_t vfo)
stop sending voice memory
Definition rig.c:7837
rig_get_twiddle
int rig_get_twiddle(RIG *rig, int *seconds)
get the twiddle timeout value (secs)
Definition rig.c:2019
rig_set_ts
int rig_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
set the Tuning Step
Definition rig.c:6398
rig_get_ant
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:6632
rig_open
int rig_open(RIG *rig)
open the communication to the rig
Definition rig.c:1040
rig_set_parm
int rig_set_parm(RIG *rig, setting_t parm, value_t val)
set a radio parameter
Definition settings.c:252
dcd_type_t
enum dcd_type_e dcd_type_t
DCD (Data Carrier Detect) type.
rig_get_dcs_code
int rig_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code)
get the current encoding DCS code
Definition tones.c:294
rig_token_lookup
hamlib_token_t rig_token_lookup(RIG *rig, const char *name)
lookup a token id
Definition conf.c:1467
rig_stop_morse
int rig_stop_morse(RIG *rig, vfo_t vfo)
stop morse code
Definition rig.c:7582
ptt_type_e
ptt_type_e
PTT (Push To Talk) type.
Definition rig.h:711
rig_has_get_level
setting_t rig_has_get_level(RIG *rig, setting_t level)
check retrieval ability of level settings
Definition settings.c:320
rig_level_e
uint64_t rig_level_e
Rig Level Settings.
Definition rig.h:1070
rig_get_level
int rig_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
get the value of a level
Definition settings.c:157
rigerror2
const char * rigerror2(int errnum)
Get the string describing the passed error code.
Definition rig.c:492
rig_set_chan_all_cb
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:1078
rig_set_split_mode
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:5116
rig_reset
int rig_reset(RIG *rig, reset_t reset)
reset the radio
Definition rig.c:7013
gran_t
struct gran gran_t
gran_t type
Definition rig.h:1760
rig_token_foreach
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:1331
rig_set_trn
int rig_set_trn(RIG *rig, int trn)
control the transceive mode
Definition event.c:577
rig_has_vfo_op
vfo_op_t rig_has_vfo_op(RIG *rig, vfo_op_t op)
check retrieval ability of VFO operations
Definition rig.c:7115
rig_get_rptr_shift
int rig_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
get the current repeater shift
Definition rig.c:4505
rig_get_split_mode
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:5354
rig_set_rptr_shift
int rig_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
set the repeater shift
Definition rig.c:4427
reset_t
reset_t
Reset operation.
Definition rig.h:739
rig_function_e
rig_function_e
Enumeration of all rig_ functions.
Definition rig.h:2247
rig_get_split_freq
int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
get the current split frequencies
Definition rig.c:4939
rig_set_debug
void rig_set_debug(enum rig_debug_level_e debug_level)
Change the current debug level.
Definition debug.c:146
rig_get_range
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:7875
rig_get_ext_parm
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:955
rig_vfo_op
int rig_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
perform Memory/VFO operations
Definition rig.c:7144
rig_status_e
rig_status_e
Development status of the backend.
Definition rig.h:432
rig_set_xit
int rig_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit)
set the XIT
Definition rig.c:6248
rig_set_conf
int rig_set_conf(RIG *rig, hamlib_token_t token, const char *val)
set a radio configuration parameter
Definition conf.c:1498
rig_debug
void rig_debug(enum rig_debug_level_e debug_level, const char *fmt,...)
Print debugging messages through stderr by default.
Definition debug.c:205
cal_table_float_t
struct cal_table_float cal_table_float_t
calibration table type for float values
Definition rig.h:1816
rig_cookie
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:8312
rig_spectrum_mode_e
rig_spectrum_mode_e
Spectrum scope modes.
Definition rig.h:1840
rig_probe
rig_model_t rig_probe(hamlib_port_t *port)
try to guess a rig
Definition rig.c:7058
chan_type_t
chan_type_t
Memory channel type definition.
Definition rig.h:1689
RIG_PARITY_MARK
@ RIG_PARITY_MARK
Definition rig.h:352
RIG_PARITY_NONE
@ RIG_PARITY_NONE
Definition rig.h:349
RIG_PARITY_EVEN
@ RIG_PARITY_EVEN
Definition rig.h:351
RIG_PARITY_SPACE
@ RIG_PARITY_SPACE
Definition rig.h:353
RIG_PARITY_ODD
@ RIG_PARITY_ODD
Definition rig.h:350
RIG_DCD_ON
@ RIG_DCD_ON
Definition rig.h:671
RIG_DCD_OFF
@ RIG_DCD_OFF
Definition rig.h:670
RIG_BAND_AIR
@ RIG_BAND_AIR
Definition rig.h:812
RIG_BAND_UNUSED
@ RIG_BAND_UNUSED
Definition rig.h:811
RIG_BAND_20M
@ RIG_BAND_20M
Definition rig.h:803
RIG_BAND_12M
@ RIG_BAND_12M
Definition rig.h:806
RIG_BAND_60M
@ RIG_BAND_60M
Definition rig.h:800
RIG_BAND_10M
@ RIG_BAND_10M
Definition rig.h:807
RIG_BAND_430MHZ
@ RIG_BAND_430MHZ
Definition rig.h:814
RIG_BAND_40M
@ RIG_BAND_40M
Definition rig.h:801
RIG_BAND_15M
@ RIG_BAND_15M
Definition rig.h:805
RIG_BAND_GEN
@ RIG_BAND_GEN
Definition rig.h:809
RIG_BAND_30M
@ RIG_BAND_30M
Definition rig.h:802
RIG_BAND_144MHZ
@ RIG_BAND_144MHZ
Definition rig.h:813
RIG_BAND_80M
@ RIG_BAND_80M
Definition rig.h:799
RIG_BAND_MW
@ RIG_BAND_MW
Definition rig.h:810
RIG_BAND_6M
@ RIG_BAND_6M
Definition rig.h:808
RIG_BAND_17M
@ RIG_BAND_17M
Definition rig.h:804
RIG_BAND_160M
@ RIG_BAND_160M
Definition rig.h:798
RIG_SIGNAL_ON
@ RIG_SIGNAL_ON
Definition rig.h:372
RIG_SIGNAL_OFF
@ RIG_SIGNAL_OFF
Definition rig.h:373
RIG_SIGNAL_UNSET
@ RIG_SIGNAL_UNSET
Definition rig.h:371
RIG_FLAG_COMPUTER
@ RIG_FLAG_COMPUTER
Definition rig.h:386
RIG_FLAG_TUNER
@ RIG_FLAG_TUNER
Definition rig.h:391
RIG_FLAG_SCANNER
@ RIG_FLAG_SCANNER
Definition rig.h:383
RIG_FLAG_TRANSMITTER
@ RIG_FLAG_TRANSMITTER
Definition rig.h:382
RIG_FLAG_MOBILE
@ RIG_FLAG_MOBILE
Definition rig.h:384
RIG_FLAG_TRUNKING
@ RIG_FLAG_TRUNKING
Definition rig.h:387
RIG_FLAG_APRS
@ RIG_FLAG_APRS
Definition rig.h:388
RIG_FLAG_TNC
@ RIG_FLAG_TNC
Definition rig.h:389
RIG_FLAG_HANDHELD
@ RIG_FLAG_HANDHELD
Definition rig.h:385
RIG_FLAG_DXCLUSTER
@ RIG_FLAG_DXCLUSTER
Definition rig.h:390
RIG_FLAG_RECEIVER
@ RIG_FLAG_RECEIVER
Definition rig.h:381
RIG_SPLIT_ON
@ RIG_SPLIT_ON
Definition rig.h:464
RIG_SPLIT_OFF
@ RIG_SPLIT_OFF
Definition rig.h:463
RIG_RPT_SHIFT_PLUS
@ RIG_RPT_SHIFT_PLUS
Definition rig.h:455
RIG_RPT_SHIFT_MINUS
@ RIG_RPT_SHIFT_MINUS
Definition rig.h:454
RIG_RPT_SHIFT_NONE
@ RIG_RPT_SHIFT_NONE
Definition rig.h:453
RIG_CLIENT_WSJTX
@ RIG_CLIENT_WSJTX
Definition rig.h:753
RIG_CLIENT_UNKNOWN
@ RIG_CLIENT_UNKNOWN
Definition rig.h:752
RIG_CLIENT_GPREDICT
@ RIG_CLIENT_GPREDICT
Definition rig.h:754
RIG_ANN_RXMODE
@ RIG_ANN_RXMODE
Definition rig.h:951
RIG_ANN_OFF
@ RIG_ANN_OFF
Definition rig.h:949
RIG_ANN_ENG
@ RIG_ANN_ENG
Definition rig.h:953
RIG_ANN_FREQ
@ RIG_ANN_FREQ
Definition rig.h:950
RIG_ANN_NONE
@ RIG_ANN_NONE
Definition rig.h:948
RIG_ANN_CW
@ RIG_ANN_CW
Definition rig.h:952
RIG_ANN_JAP
@ RIG_ANN_JAP
Definition rig.h:954
RIG_PARM_BEEP
@ RIG_PARM_BEEP
Definition rig.h:1163
RIG_PARM_AFIF_LAN
@ RIG_PARM_AFIF_LAN
Definition rig.h:1171
RIG_PARM_AFIF_WLAN
@ RIG_PARM_AFIF_WLAN
Definition rig.h:1172
RIG_PARM_BANDSELECT
@ RIG_PARM_BANDSELECT
Definition rig.h:1169
RIG_PARM_TIME
@ RIG_PARM_TIME
Definition rig.h:1164
RIG_PARM_SCREENSAVER
@ RIG_PARM_SCREENSAVER
Definition rig.h:1167
RIG_PARM_ANN
@ RIG_PARM_ANN
Definition rig.h:1160
RIG_PARM_AFIF
@ RIG_PARM_AFIF
Definition rig.h:1168
RIG_PARM_NONE
@ RIG_PARM_NONE
Definition rig.h:1159
RIG_PARM_KEYERTYPE
@ RIG_PARM_KEYERTYPE
Definition rig.h:1170
RIG_PARM_AFIF_ACC
@ RIG_PARM_AFIF_ACC
Definition rig.h:1173
RIG_PARM_BACKLIGHT
@ RIG_PARM_BACKLIGHT
Definition rig.h:1162
RIG_PARM_KEYLIGHT
@ RIG_PARM_KEYLIGHT
Definition rig.h:1166
RIG_PARM_BAT
@ RIG_PARM_BAT
Definition rig.h:1165
RIG_PARM_APO
@ RIG_PARM_APO
Definition rig.h:1161
RIG_POWER_OPERATE
@ RIG_POWER_OPERATE
Definition rig.h:731
RIG_POWER_UNKNOWN
@ RIG_POWER_UNKNOWN
Definition rig.h:732
RIG_POWER_STANDBY
@ RIG_POWER_STANDBY
Definition rig.h:730
RIG_POWER_OFF
@ RIG_POWER_OFF
Definition rig.h:728
RIG_POWER_ON
@ RIG_POWER_ON
Definition rig.h:729
RIG_ENIMPL
@ RIG_ENIMPL
Definition rig.h:201
RIG_ECONF
@ RIG_ECONF
Definition rig.h:199
RIG_ELIMIT
@ RIG_ELIMIT
Definition rig.h:218
RIG_ENAVAIL
@ RIG_ENAVAIL
Definition rig.h:208
RIG_OK
@ RIG_OK
Definition rig.h:197
RIG_EPROTO
@ RIG_EPROTO
Definition rig.h:205
RIG_EINTERNAL
@ RIG_EINTERNAL
Definition rig.h:204
RIG_EDOM
@ RIG_EDOM
Definition rig.h:214
RIG_EIO
@ RIG_EIO
Definition rig.h:203
RIG_EVFO
@ RIG_EVFO
Definition rig.h:213
RIG_ETIMEOUT
@ RIG_ETIMEOUT
Definition rig.h:202
RIG_ENOMEM
@ RIG_ENOMEM
Definition rig.h:200
RIG_EARG
@ RIG_EARG
Definition rig.h:212
RIG_EPOWER
@ RIG_EPOWER
Definition rig.h:217
RIG_EACCESS
@ RIG_EACCESS
Definition rig.h:219
RIG_ERJCTED
@ RIG_ERJCTED
Definition rig.h:206
RIG_ESECURITY
@ RIG_ESECURITY
Definition rig.h:216
RIG_BUSERROR
@ RIG_BUSERROR
Definition rig.h:210
RIG_BUSBUSY
@ RIG_BUSBUSY
Definition rig.h:211
RIG_EDEPRECATED
@ RIG_EDEPRECATED
Definition rig.h:215
RIG_ENTARGET
@ RIG_ENTARGET
Definition rig.h:209
RIG_EINVAL
@ RIG_EINVAL
Definition rig.h:198
RIG_ETRUNC
@ RIG_ETRUNC
Definition rig.h:207
RIG_CONF_STRING
@ RIG_CONF_STRING
Definition rig.h:905
RIG_CONF_BUTTON
@ RIG_CONF_BUTTON
Definition rig.h:909
RIG_CONF_CHECKBUTTON
@ RIG_CONF_CHECKBUTTON
Definition rig.h:908
RIG_CONF_BINARY
@ RIG_CONF_BINARY
Definition rig.h:910
RIG_CONF_COMBO
@ RIG_CONF_COMBO
Definition rig.h:906
RIG_CONF_INT
@ RIG_CONF_INT
Definition rig.h:911
RIG_CONF_NUMERIC
@ RIG_CONF_NUMERIC
Definition rig.h:907
RIG_SCAN_DELTA
@ RIG_SCAN_DELTA
Definition rig.h:872
RIG_SCAN_PLT
@ RIG_SCAN_PLT
Definition rig.h:874
RIG_SCAN_PROG
@ RIG_SCAN_PROG
Definition rig.h:871
RIG_SCAN_MEM
@ RIG_SCAN_MEM
Definition rig.h:868
RIG_SCAN_NONE
@ RIG_SCAN_NONE
Definition rig.h:867
RIG_SCAN_VFO
@ RIG_SCAN_VFO
Definition rig.h:873
RIG_SCAN_PRIO
@ RIG_SCAN_PRIO
Definition rig.h:870
RIG_SCAN_SLCT
@ RIG_SCAN_SLCT
Definition rig.h:869
RIG_SCAN_STOP
@ RIG_SCAN_STOP
Definition rig.h:875
RIG_COOKIE_RENEW
@ RIG_COOKIE_RENEW
Definition rig.h:1194
RIG_COOKIE_RELEASE
@ RIG_COOKIE_RELEASE
Definition rig.h:1193
RIG_COOKIE_GET
@ RIG_COOKIE_GET
Definition rig.h:1192
RIG_PTT_OFF
@ RIG_PTT_OFF
Definition rig.h:697
RIG_PTT_ON_DATA
@ RIG_PTT_ON_DATA
Definition rig.h:700
RIG_PTT_ON_MIC
@ RIG_PTT_ON_MIC
Definition rig.h:699
RIG_PTT_ON
@ RIG_PTT_ON
Definition rig.h:698
RIG_DCD_SERIAL_CTS
@ RIG_DCD_SERIAL_CTS
Definition rig.h:684
RIG_DCD_PARALLEL
@ RIG_DCD_PARALLEL
Definition rig.h:686
RIG_DCD_CM108
@ RIG_DCD_CM108
Definition rig.h:687
RIG_DCD_RIG
@ RIG_DCD_RIG
Definition rig.h:682
RIG_DCD_GPION
@ RIG_DCD_GPION
Definition rig.h:689
RIG_DCD_NONE
@ RIG_DCD_NONE
Definition rig.h:681
RIG_DCD_SERIAL_DSR
@ RIG_DCD_SERIAL_DSR
Definition rig.h:683
RIG_DCD_GPIO
@ RIG_DCD_GPIO
Definition rig.h:688
RIG_DCD_SERIAL_CAR
@ RIG_DCD_SERIAL_CAR
Definition rig.h:685
RIG_OP_CPY
@ RIG_OP_CPY
Definition rig.h:775
RIG_OP_DOWN
@ RIG_OP_DOWN
Definition rig.h:781
RIG_OP_TO_VFO
@ RIG_OP_TO_VFO
Definition rig.h:778
RIG_OP_TUNE
@ RIG_OP_TUNE
Definition rig.h:786
RIG_OP_FROM_VFO
@ RIG_OP_FROM_VFO
Definition rig.h:777
RIG_OP_MCL
@ RIG_OP_MCL
Definition rig.h:779
RIG_OP_RIGHT
@ RIG_OP_RIGHT
Definition rig.h:785
RIG_OP_UP
@ RIG_OP_UP
Definition rig.h:780
RIG_OP_TOGGLE
@ RIG_OP_TOGGLE
Definition rig.h:787
RIG_OP_NONE
@ RIG_OP_NONE
Definition rig.h:774
RIG_OP_BAND_UP
@ RIG_OP_BAND_UP
Definition rig.h:782
RIG_OP_BAND_DOWN
@ RIG_OP_BAND_DOWN
Definition rig.h:783
RIG_OP_LEFT
@ RIG_OP_LEFT
Definition rig.h:784
RIG_OP_XCHG
@ RIG_OP_XCHG
Definition rig.h:776
RIG_PORT_PACKET
@ RIG_PORT_PACKET
Definition rig.h:332
RIG_PORT_UDP_NETWORK
@ RIG_PORT_UDP_NETWORK
Definition rig.h:338
RIG_PORT_NONE
@ RIG_PORT_NONE
Definition rig.h:328
RIG_PORT_CM108
@ RIG_PORT_CM108
Definition rig.h:339
RIG_PORT_GPIO
@ RIG_PORT_GPIO
Definition rig.h:340
RIG_PORT_ULTRA
@ RIG_PORT_ULTRA
Definition rig.h:334
RIG_PORT_GPION
@ RIG_PORT_GPION
Definition rig.h:341
RIG_PORT_SERIAL
@ RIG_PORT_SERIAL
Definition rig.h:329
RIG_PORT_PARALLEL
@ RIG_PORT_PARALLEL
Definition rig.h:336
RIG_PORT_NETWORK
@ RIG_PORT_NETWORK
Definition rig.h:330
RIG_PORT_DEVICE
@ RIG_PORT_DEVICE
Definition rig.h:331
RIG_PORT_RPC
@ RIG_PORT_RPC
Definition rig.h:335
RIG_PORT_DTMF
@ RIG_PORT_DTMF
Definition rig.h:333
RIG_PORT_USB
@ RIG_PORT_USB
Definition rig.h:337
RIG_HANDSHAKE_HARDWARE
@ RIG_HANDSHAKE_HARDWARE
Definition rig.h:363
RIG_HANDSHAKE_NONE
@ RIG_HANDSHAKE_NONE
Definition rig.h:361
RIG_HANDSHAKE_XONXOFF
@ RIG_HANDSHAKE_XONXOFF
Definition rig.h:362
RIG_AGC_NONE
@ RIG_AGC_NONE
Definition rig.h:408
RIG_AGC_ON
@ RIG_AGC_ON
Definition rig.h:407
RIG_AGC_USER
@ RIG_AGC_USER
Definition rig.h:403
RIG_DEBUG_ERR
@ RIG_DEBUG_ERR
Definition rig.h:249
RIG_DEBUG_BUG
@ RIG_DEBUG_BUG
Definition rig.h:248
RIG_DEBUG_WARN
@ RIG_DEBUG_WARN
Definition rig.h:250
RIG_DEBUG_TRACE
@ RIG_DEBUG_TRACE
Definition rig.h:252
RIG_DEBUG_VERBOSE
@ RIG_DEBUG_VERBOSE
Definition rig.h:251
RIG_DEBUG_CACHE
@ RIG_DEBUG_CACHE
Definition rig.h:253
RIG_DEBUG_NONE
@ RIG_DEBUG_NONE
Definition rig.h:247
RIG_BANDSELECT_600M
@ RIG_BANDSELECT_600M
Definition rig.h:820
RIG_BANDSELECT_1_25M
@ RIG_BANDSELECT_1_25M
Definition rig.h:838
RIG_BANDSELECT_GEN
@ RIG_BANDSELECT_GEN
Definition rig.h:833
RIG_BANDSELECT_17M
@ RIG_BANDSELECT_17M
Definition rig.h:827
RIG_BANDSELECT_6M
@ RIG_BANDSELECT_6M
Definition rig.h:831
RIG_BANDSELECT_9CM
@ RIG_BANDSELECT_9CM
Definition rig.h:843
RIG_BANDSELECT_160M
@ RIG_BANDSELECT_160M
Definition rig.h:821
RIG_BANDSELECT_AIR
@ RIG_BANDSELECT_AIR
Definition rig.h:835
RIG_BANDSELECT_20M
@ RIG_BANDSELECT_20M
Definition rig.h:826
RIG_BANDSELECT_MW
@ RIG_BANDSELECT_MW
Definition rig.h:834
RIG_BANDSELECT_2200M
@ RIG_BANDSELECT_2200M
Definition rig.h:819
RIG_BANDSELECT_23CM
@ RIG_BANDSELECT_23CM
Definition rig.h:841
RIG_BANDSELECT_UNUSED
@ RIG_BANDSELECT_UNUSED
Definition rig.h:818
RIG_BANDSELECT_33CM
@ RIG_BANDSELECT_33CM
Definition rig.h:840
RIG_BANDSELECT_60M
@ RIG_BANDSELECT_60M
Definition rig.h:823
RIG_BANDSELECT_3CM
@ RIG_BANDSELECT_3CM
Definition rig.h:845
RIG_BANDSELECT_4M
@ RIG_BANDSELECT_4M
Definition rig.h:836
RIG_BANDSELECT_12M
@ RIG_BANDSELECT_12M
Definition rig.h:829
RIG_BANDSELECT_WFM
@ RIG_BANDSELECT_WFM
Definition rig.h:832
RIG_BANDSELECT_5CM
@ RIG_BANDSELECT_5CM
Definition rig.h:844
RIG_BANDSELECT_15M
@ RIG_BANDSELECT_15M
Definition rig.h:828
RIG_BANDSELECT_30M
@ RIG_BANDSELECT_30M
Definition rig.h:825
RIG_BANDSELECT_70CM
@ RIG_BANDSELECT_70CM
Definition rig.h:839
RIG_BANDSELECT_40M
@ RIG_BANDSELECT_40M
Definition rig.h:824
RIG_BANDSELECT_80M
@ RIG_BANDSELECT_80M
Definition rig.h:822
RIG_BANDSELECT_13CM
@ RIG_BANDSELECT_13CM
Definition rig.h:842
RIG_BANDSELECT_2M
@ RIG_BANDSELECT_2M
Definition rig.h:837
RIG_BANDSELECT_10M
@ RIG_BANDSELECT_10M
Definition rig.h:830
RIG_PTT_RIG
@ RIG_PTT_RIG
Definition rig.h:713
RIG_PTT_RIG_MICDATA
@ RIG_PTT_RIG_MICDATA
Definition rig.h:717
RIG_PTT_SERIAL_DTR
@ RIG_PTT_SERIAL_DTR
Definition rig.h:714
RIG_PTT_NONE
@ RIG_PTT_NONE
Definition rig.h:712
RIG_PTT_PARALLEL
@ RIG_PTT_PARALLEL
Definition rig.h:716
RIG_PTT_GPION
@ RIG_PTT_GPION
Definition rig.h:720
RIG_PTT_GPIO
@ RIG_PTT_GPIO
Definition rig.h:719
RIG_PTT_CM108
@ RIG_PTT_CM108
Definition rig.h:718
RIG_PTT_SERIAL_RTS
@ RIG_PTT_SERIAL_RTS
Definition rig.h:715
RIG_RESET_MCALL
@ RIG_RESET_MCALL
Definition rig.h:743
RIG_RESET_MASTER
@ RIG_RESET_MASTER
Definition rig.h:744
RIG_RESET_NONE
@ RIG_RESET_NONE
Definition rig.h:740
RIG_RESET_VFO
@ RIG_RESET_VFO
Definition rig.h:742
RIG_RESET_SOFT
@ RIG_RESET_SOFT
Definition rig.h:741
RIG_STATUS_STABLE
@ RIG_STATUS_STABLE
Definition rig.h:436
RIG_STATUS_BUGGY
@ RIG_STATUS_BUGGY
Definition rig.h:437
RIG_STATUS_UNTESTED
@ RIG_STATUS_UNTESTED
Definition rig.h:434
RIG_STATUS_BETA
@ RIG_STATUS_BETA
Definition rig.h:435
RIG_STATUS_ALPHA
@ RIG_STATUS_ALPHA
Definition rig.h:433
RIG_SPECTRUM_MODE_CENTER_SCROLL
@ RIG_SPECTRUM_MODE_CENTER_SCROLL
Definition rig.h:1844
RIG_SPECTRUM_MODE_FIXED_SCROLL
@ RIG_SPECTRUM_MODE_FIXED_SCROLL
Definition rig.h:1845
RIG_SPECTRUM_MODE_FIXED
@ RIG_SPECTRUM_MODE_FIXED
Definition rig.h:1843
RIG_SPECTRUM_MODE_CENTER
@ RIG_SPECTRUM_MODE_CENTER
Definition rig.h:1842
RIG_MTYPE_VOICE
@ RIG_MTYPE_VOICE
Definition rig.h:1698
RIG_MTYPE_PRIO
@ RIG_MTYPE_PRIO
Definition rig.h:1697
RIG_MTYPE_EDGE
@ RIG_MTYPE_EDGE
Definition rig.h:1692
RIG_MTYPE_MEM
@ RIG_MTYPE_MEM
Definition rig.h:1691
RIG_MTYPE_CALL
@ RIG_MTYPE_CALL
Definition rig.h:1693
RIG_MTYPE_SAT
@ RIG_MTYPE_SAT
Definition rig.h:1695
RIG_MTYPE_MORSE
@ RIG_MTYPE_MORSE
Definition rig.h:1699
RIG_MTYPE_MEMOPAD
@ RIG_MTYPE_MEMOPAD
Definition rig.h:1694
RIG_MTYPE_SPLIT
@ RIG_MTYPE_SPLIT
Definition rig.h:1700
RIG_MTYPE_NONE
@ RIG_MTYPE_NONE
Definition rig.h:1690
RIG_MTYPE_BAND
@ RIG_MTYPE_BAND
Definition rig.h:1696
rig_model_t
uint32_t rig_model_t
Definition riglist.h:1162
locator2longlat
int locator2longlat(double *longitude, double *latitude, const char *locator)
Convert QRA locator (Maidenhead grid square) to Longitude/Latitude.
Definition locator.c:450
longlat2locator
int longlat2locator(double longitude, double latitude, char *locator, int pair_count)
Convert longitude/latitude to QRA locator (Maidenhead grid square).
Definition locator.c:544
port.h
Hamlib port data structures.
rig_send_raw
int rig_send_raw(RIG *rig, const unsigned char *send, int send_len, unsigned char *reply, int reply_len, unsigned char *term)
Send verbatim data.
Definition rig.c:8930
rig_data_pointer
void * rig_data_pointer(RIG *rig, rig_ptrx_t idx)
Get the address of a Hamlib data structure.
Definition rig.c:9116
rig_state.h
Hamlib rig state data structure.
riglist.h
Hamlib rig (radio) model definitions.
cal_table_float
Calibration table struct for float values.
Definition rig.h:1796
cal_table_float::val
float val
Definition rig.h:1800
cal_table_float::size
int size
Definition rig.h:1797
cal_table_float::raw
int raw
Definition rig.h:1799
cal_table_float::table
struct cal_table_float::@206324267037360041346337206233114264360331255211 table[HAMLIB_MAX_CAL_LENGTH]
cal_table
Calibration table struct.
Definition rig.h:1766
cal_table::val
int val
Definition rig.h:1770
cal_table::table
struct cal_table::@204104041075167353032125234343221100143277126270 table[HAMLIB_MAX_CAL_LENGTH]
cal_table::raw
int raw
Definition rig.h:1769
cal_table::size
int size
Definition rig.h:1767
chan_list
Memory channel list definition.
Definition rig.h:1717
chan_list::startc
int startc
Definition rig.h:1718
chan_list::type
chan_type_t type
Definition rig.h:1720
chan_list::mem_caps
channel_cap_t mem_caps
Definition rig.h:1721
chan_list::endc
int endc
Definition rig.h:1719
channel_cap
Channel capability definition.
Definition rig.h:1641
channel_cap::tx_vfo
unsigned tx_vfo
Definition rig.h:1654
channel_cap::tx_freq
unsigned tx_freq
Definition rig.h:1649
channel_cap::mode
unsigned mode
Definition rig.h:1646
channel_cap::dcs_code
unsigned dcs_code
Definition rig.h:1664
channel_cap::rit
unsigned rit
Definition rig.h:1658
channel_cap::dcs_sql
unsigned dcs_sql
Definition rig.h:1665
channel_cap::rptr_offs
unsigned rptr_offs
Definition rig.h:1656
channel_cap::bank_num
unsigned bank_num
Definition rig.h:1642
channel_cap::levels
setting_t levels
Definition rig.h:1661
channel_cap::width
unsigned width
Definition rig.h:1647
channel_cap::rptr_shift
unsigned rptr_shift
Definition rig.h:1655
channel_cap::tx_width
unsigned tx_width
Definition rig.h:1651
channel_cap::ctcss_sql
unsigned ctcss_sql
Definition rig.h:1663
channel_cap::tx_mode
unsigned tx_mode
Definition rig.h:1650
channel_cap::freq
unsigned freq
Definition rig.h:1645
channel_cap::funcs
setting_t funcs
Definition rig.h:1660
channel_cap::ctcss_tone
unsigned ctcss_tone
Definition rig.h:1662
channel_cap::tag
unsigned tag
Definition rig.h:1670
channel_cap::ext_levels
unsigned ext_levels
Definition rig.h:1669
channel_cap::vfo
unsigned vfo
Definition rig.h:1643
channel_cap::ant
unsigned ant
Definition rig.h:1644
channel_cap::split
unsigned split
Definition rig.h:1653
channel_cap::scan_group
unsigned scan_group
Definition rig.h:1666
channel_cap::flags
unsigned flags
Definition rig.h:1667
channel_cap::tuning_step
unsigned tuning_step
Definition rig.h:1657
channel_cap::xit
unsigned xit
Definition rig.h:1659
channel_cap::channel_desc
unsigned channel_desc
Definition rig.h:1668
channel
Channel structure.
Definition rig.h:1596
channel::tuning_step
shortfreq_t tuning_step
Definition rig.h:1614
channel::mode
rmode_t mode
Definition rig.h:1602
channel::ctcss_tone
tone_t ctcss_tone
Definition rig.h:1619
channel::tx_width
pbwidth_t tx_width
Definition rig.h:1607
channel::vfo
vfo_t vfo
Definition rig.h:1599
channel::levels
value_t levels[64]
Definition rig.h:1618
channel::rptr_offs
shortfreq_t rptr_offs
Definition rig.h:1613
channel::tx_vfo
vfo_t tx_vfo
Definition rig.h:1610
channel::dcs_code
tone_t dcs_code
Definition rig.h:1621
channel::funcs
setting_t funcs
Definition rig.h:1617
channel::ext_levels
struct ext_list * ext_levels
Definition rig.h:1626
channel::ctcss_sql
tone_t ctcss_sql
Definition rig.h:1620
channel::xit
shortfreq_t xit
Definition rig.h:1616
channel::bank_num
int bank_num
Definition rig.h:1598
channel::width
pbwidth_t width
Definition rig.h:1603
channel::freq
freq_t freq
Definition rig.h:1601
channel::tag
char tag[32]
Definition rig.h:1628
channel::rptr_shift
rptr_shift_t rptr_shift
Definition rig.h:1612
channel::rit
shortfreq_t rit
Definition rig.h:1615
channel::channel_desc
char channel_desc[HAMLIB_MAXCHANDESC]
Definition rig.h:1625
channel::tx_mode
rmode_t tx_mode
Definition rig.h:1606
channel::split
split_t split
Definition rig.h:1609
channel::tx_freq
freq_t tx_freq
Definition rig.h:1605
channel::ant
ant_t ant
Definition rig.h:1600
channel::flags
unsigned int flags
Definition rig.h:1624
channel::scan_group
int scan_group
Definition rig.h:1623
channel::channel_num
int channel_num
Definition rig.h:1597
channel::dcs_sql
tone_t dcs_sql
Definition rig.h:1622
confparams
Configuration parameter structure.
Definition rig.h:922
confparams::combostr
const char * combostr[RIG_COMBO_MAX]
Definition rig.h:936
confparams::token
hamlib_token_t token
Definition rig.h:923
confparams::tooltip
const char * tooltip
Definition rig.h:926
confparams::dflt
const char * dflt
Definition rig.h:927
confparams::min
float min
Definition rig.h:931
confparams::step
float step
Definition rig.h:933
confparams::c
struct confparams::@271077117126137115141372224306023165325337063331::@202233026007124072042012051105016110342141121271 c
confparams::n
struct confparams::@271077117126137115141372224306023165325337063331::@264315006157305140273037354252055356124357113200 n
confparams::u
union confparams::@271077117126137115141372224306023165325337063331 u
confparams::label
const char * label
Definition rig.h:925
confparams::max
float max
Definition rig.h:932
confparams::name
const char * name
Definition rig.h:924
confparams::type
enum rig_conf_e type
Definition rig.h:928
deferred_config_header
Definition rig.h:1900
deferred_config_item
Definition rig.h:1893
ext_list
Extension attribute definition.
Definition rig.h:1579
ext_list::token
hamlib_token_t token
Definition rig.h:1580
ext_list::val
value_t val
Definition rig.h:1581
filter_list
Filter definition.
Definition rig.h:1546
filter_list::modes
rmode_t modes
Definition rig.h:1547
filter_list::width
pbwidth_t width
Definition rig.h:1548
freq_range_list
Frequency range.
Definition rig.h:1479
freq_range_list::startf
freq_t startf
Definition rig.h:1480
freq_range_list::endf
freq_t endf
Definition rig.h:1481
freq_range_list::low_power
int low_power
Definition rig.h:1483
freq_range_list::label
char * label
Definition rig.h:1487
freq_range_list::ant
ant_t ant
Definition rig.h:1486
freq_range_list::high_power
int high_power
Definition rig.h:1484
freq_range_list::vfo
vfo_t vfo
Definition rig.h:1485
freq_range_list::modes
rmode_t modes
Definition rig.h:1482
gran
level/parm granularity definition
Definition rig.h:1751
gran::max
value_t max
Definition rig.h:1753
gran::step
value_t step
Definition rig.h:1754
gran::min
value_t min
Definition rig.h:1752
hamlib_port_deprecated
Definition port.h:137
hamlib_port
Port definition.
Definition port.h:55
multicast_s
Multicast data items the are unique per rig instantiation This is meant for internal Hamlib use only.
Definition rig.h:2560
rig_cache_deprecated
Rig cache data.
Definition rig.h:2480
rig_cache
Rig cache data.
Definition cache.h:45
rig_callbacks
Callback functions and args for rig event.
Definition rig.h:2640
rig_callbacks::mode_arg
rig_ptr_t mode_arg
Definition rig.h:2644
rig_callbacks::ptt_event
ptt_cb_t ptt_event
Definition rig.h:2647
rig_callbacks::vfo_event
vfo_cb_t vfo_event
Definition rig.h:2645
rig_callbacks::spectrum_event
spectrum_cb_t spectrum_event
Definition rig.h:2653
rig_callbacks::mode_event
mode_cb_t mode_event
Definition rig.h:2643
rig_callbacks::freq_arg
rig_ptr_t freq_arg
Definition rig.h:2642
rig_callbacks::spectrum_arg
rig_ptr_t spectrum_arg
Definition rig.h:2654
rig_callbacks::ptt_arg
rig_ptr_t ptt_arg
Definition rig.h:2648
rig_callbacks::dcd_arg
rig_ptr_t dcd_arg
Definition rig.h:2650
rig_callbacks::dcd_event
dcd_cb_t dcd_event
Definition rig.h:2649
rig_callbacks::pltune_arg
rig_ptr_t pltune_arg
Definition rig.h:2652
rig_callbacks::pltune
pltune_cb_t pltune
Definition rig.h:2651
rig_callbacks::vfo_arg
rig_ptr_t vfo_arg
Definition rig.h:2646
rig_callbacks::freq_event
freq_cb_t freq_event
Definition rig.h:2641
rig_caps
Rig data structure.
Definition rig.h:1935
rig_caps::write_delay
int write_delay
Definition rig.h:1955
rig_caps::has_set_func
setting_t has_set_func
Definition rig.h:1961
rig_caps::serial_handshake
enum serial_handshake_e serial_handshake
Definition rig.h:1953
rig_caps::tuning_steps
struct tuning_step_list tuning_steps[HAMLIB_TSLSTSIZ]
Definition rig.h:2014
rig_caps::retry
int retry
Definition rig.h:1958
rig_caps::model_name
const char * model_name
Definition rig.h:1937
rig_caps::attenuator
int attenuator[HAMLIB_MAXDBLSTSIZ]
Definition rig.h:1979
rig_caps::rx_range_list5
freq_range_t rx_range_list5[HAMLIB_FRQRANGESIZ]
Definition rig.h:2011
rig_caps::serial_data_bits
int serial_data_bits
Definition rig.h:1950
rig_caps::clone_combo_get
const char * clone_combo_get
Definition rig.h:2216
rig_caps::version
const char * version
Definition rig.h:1939
rig_caps::serial_rate_max
int serial_rate_max
Definition rig.h:1949
rig_caps::targetable_vfo
int targetable_vfo
Definition rig.h:1991
rig_caps::swr_cal
cal_table_float_t swr_cal
Definition rig.h:2018
rig_caps::ptt_type
ptt_type_t ptt_type
Definition rig.h:1944
rig_caps::clone_combo_set
const char * clone_combo_set
Definition rig.h:2215
rig_caps::vd_meter_cal
cal_table_float_t vd_meter_cal
Definition rig.h:2022
rig_caps::serial_stop_bits
int serial_stop_bits
Definition rig.h:1951
rig_caps::spectrum_avg_modes
struct rig_spectrum_avg_mode spectrum_avg_modes[HAMLIB_MAX_SPECTRUM_AVG_MODES]
Definition rig.h:2028
rig_caps::ext_tokens
int * ext_tokens
Definition rig.h:1973
rig_caps::parm_gran
gran_t parm_gran[64]
Definition rig.h:1968
rig_caps::macro_name
const char * macro_name
Definition rig.h:2217
rig_caps::dcd_type
dcd_type_t dcd_type
Definition rig.h:1945
rig_caps::async_data_supported
int async_data_supported
Definition rig.h:2219
rig_caps::agc_levels
enum agc_level_e agc_levels[HAMLIB_MAX_AGC_LEVELS]
Definition rig.h:1985
rig_caps::chan_list
chan_t chan_list[HAMLIB_CHANLSTSIZ]
Definition rig.h:1997
rig_caps::preamp
int preamp[HAMLIB_MAXDBLSTSIZ]
Definition rig.h:1978
rig_caps::priv
const rig_ptr_t priv
Definition rig.h:2032
rig_caps::cfgparams
const struct confparams * cfgparams
Definition rig.h:2031
rig_caps::status
enum rig_status_e status
Definition rig.h:1941
rig_caps::tx_range_list5
freq_range_t tx_range_list5[HAMLIB_FRQRANGESIZ]
Definition rig.h:2012
rig_caps::dcs_list
tone_t * dcs_list
Definition rig.h:1976
rig_caps::max_rit
shortfreq_t max_rit
Definition rig.h:1980
rig_caps::extlevels
const struct confparams * extlevels
Definition rig.h:1971
rig_caps::copyright
const char * copyright
Definition rig.h:1940
rig_caps::max_xit
shortfreq_t max_xit
Definition rig.h:1981
rig_caps::has_set_level
setting_t has_set_level
Definition rig.h:1963
rig_caps::rig_model
rig_model_t rig_model
Definition rig.h:1936
rig_caps::morse_qsize
short morse_qsize
Definition rig.h:2236
rig_caps::rfpower_meter_cal
cal_table_float_t rfpower_meter_cal
Definition rig.h:2020
rig_caps::has_get_parm
setting_t has_get_parm
Definition rig.h:1964
rig_caps::chan_desc_sz
int chan_desc_sz
Definition rig.h:1995
rig_caps::serial_parity
enum serial_parity_e serial_parity
Definition rig.h:1952
rig_caps::rx_range_list1
freq_range_t rx_range_list1[HAMLIB_FRQRANGESIZ]
Definition rig.h:2003
rig_caps::spectrum_attenuator
int spectrum_attenuator[HAMLIB_MAXDBLSTSIZ]
Definition rig.h:2029
rig_caps::max_ifshift
shortfreq_t max_ifshift
Definition rig.h:1982
rig_caps::comp_meter_cal
cal_table_float_t comp_meter_cal
Definition rig.h:2021
rig_caps::port_type
rig_port_t port_type
Definition rig.h:1946
rig_caps::timeout_retry
short timeout_retry
Definition rig.h:2235
rig_caps::mfg_name
const char * mfg_name
Definition rig.h:1938
rig_caps::ctcss_list
tone_t * ctcss_list
Definition rig.h:1975
rig_caps::spectrum_scopes
struct rig_spectrum_scope spectrum_scopes[HAMLIB_MAX_SPECTRUM_SCOPES]
Definition rig.h:2025
rig_caps::rx_range_list4
freq_range_t rx_range_list4[HAMLIB_FRQRANGESIZ]
Definition rig.h:2009
rig_caps::scan_ops
scan_t scan_ops
Definition rig.h:1990
rig_caps::alc_cal
cal_table_float_t alc_cal
Definition rig.h:2019
rig_caps::rx_range_list2
freq_range_t rx_range_list2[HAMLIB_FRQRANGESIZ]
Definition rig.h:2005
rig_caps::has_set_parm
setting_t has_set_parm
Definition rig.h:1965
rig_caps::vfo_ops
vfo_op_t vfo_ops
Definition rig.h:1989
rig_caps::has_get_func
setting_t has_get_func
Definition rig.h:1960
rig_caps::announces
ann_t announces
Definition rig.h:1987
rig_caps::extparms
const struct confparams * extparms
Definition rig.h:1970
rig_caps::filters
struct filter_list filters[HAMLIB_FLTLSTSIZ]
Definition rig.h:2015
rig_caps::post_write_delay
int post_write_delay
Definition rig.h:1956
rig_caps::transceive
int transceive
Definition rig.h:1992
rig_caps::spectrum_modes
enum rig_spectrum_mode_e spectrum_modes[HAMLIB_MAX_SPECTRUM_MODES]
Definition rig.h:2026
rig_caps::timeout
int timeout
Definition rig.h:1957
rig_caps::spectrum_spans
freq_t spectrum_spans[HAMLIB_MAX_SPECTRUM_SPANS]
Definition rig.h:2027
rig_caps::tx_range_list1
freq_range_t tx_range_list1[HAMLIB_FRQRANGESIZ]
Definition rig.h:2004
rig_caps::str_cal
cal_table_t str_cal
Definition rig.h:2017
rig_caps::id_meter_cal
cal_table_float_t id_meter_cal
Definition rig.h:2023
rig_caps::bank_qty
int bank_qty
Definition rig.h:1994
rig_caps::rx_range_list3
freq_range_t rx_range_list3[HAMLIB_FRQRANGESIZ]
Definition rig.h:2007
rig_caps::rig_type
int rig_type
Definition rig.h:1943
rig_caps::has_get_level
setting_t has_get_level
Definition rig.h:1962
rig_caps::extfuncs
const struct confparams * extfuncs
Definition rig.h:1972
rig_caps::level_gran
gran_t level_gran[64]
Definition rig.h:1967
rig_caps::tx_range_list4
freq_range_t tx_range_list4[HAMLIB_FRQRANGESIZ]
Definition rig.h:2010
rig_caps::agc_level_count
int agc_level_count
Definition rig.h:1984
rig_caps::serial_rate_min
int serial_rate_min
Definition rig.h:1948
rig_caps::tx_range_list3
freq_range_t tx_range_list3[HAMLIB_FRQRANGESIZ]
Definition rig.h:2008
rig_caps::tx_range_list2
freq_range_t tx_range_list2[HAMLIB_FRQRANGESIZ]
Definition rig.h:2006
rig_spectrum_avg_mode
Spectrum scope averaging modes.
Definition rig.h:1852
rig_spectrum_line
Represents a single line of rig spectrum scope FFT data.
Definition rig.h:1869
rig_spectrum_line::spectrum_data_length
size_t spectrum_data_length
Definition rig.h:1885
rig_spectrum_line::low_edge_freq
freq_t low_edge_freq
Definition rig.h:1882
rig_spectrum_line::data_level_min
int data_level_min
Definition rig.h:1872
rig_spectrum_line::id
int id
Definition rig.h:1870
rig_spectrum_line::spectrum_mode
enum rig_spectrum_mode_e spectrum_mode
Definition rig.h:1877
rig_spectrum_line::signal_strength_max
double signal_strength_max
Definition rig.h:1875
rig_spectrum_line::center_freq
freq_t center_freq
Definition rig.h:1879
rig_spectrum_line::span_freq
freq_t span_freq
Definition rig.h:1880
rig_spectrum_line::signal_strength_min
double signal_strength_min
Definition rig.h:1874
rig_spectrum_line::spectrum_data
unsigned char * spectrum_data
Definition rig.h:1886
rig_spectrum_line::data_level_max
int data_level_max
Definition rig.h:1873
rig_spectrum_line::high_edge_freq
freq_t high_edge_freq
Definition rig.h:1883
rig_spectrum_scope
Spectrum scope.
Definition rig.h:1832
rig_state_deprecated
Deprecated Rig state containing live data and customized fields.
Definition rig_state.h:263
rig_state
Rig state containing live data and customized fields.
Definition rig_state.h:61
s_rig
The Rig structure.
Definition rig.h:2668
s_rig::callbacks
struct rig_callbacks callbacks
Definition rig.h:2672
s_rig::state_deprecated
struct rig_state_deprecated state_deprecated
Definition rig.h:2671
s_rig::state
struct rig_state state
Definition rig.h:2674
s_rig::caps
struct rig_caps * caps
Definition rig.h:2669
s_rig::cache_addr
struct rig_cache * cache_addr
Definition rig.h:2678
tuning_step_list
Tuning step definition.
Definition rig.h:1511
tuning_step_list::modes
rmode_t modes
Definition rig.h:1512
tuning_step_list::ts
shortfreq_t ts
Definition rig.h:1513
value_t
Universal approach for passing values.
Definition rig.h:1047
value_t::u
unsigned int u
Definition rig.h:1049
value_t::s
char * s
Definition rig.h:1051
value_t::f
float f
Definition rig.h:1050
value_t::cs
const char * cs
Definition rig.h:1052
value_t::i
signed int i
Definition rig.h:1048