Add files via upload

1.0.0
PianetaRadio 2022-03-12 20:20:12 +01:00 zatwierdzone przez GitHub
rodzic 8007d06e6a
commit b4f196190c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
8 zmienionych plików z 5956 dodań i 0 usunięć

446
hamlib/amplifier.h 100644
Wyświetl plik

@ -0,0 +1,446 @@
/*
* Hamlib Interface - Amplifier API header
* Copyright (c) 2000-2005 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
*
*/
#ifndef _AMPLIFIER_H
#define _AMPLIFIER_H 1
#include <hamlib/rig.h>
#include <hamlib/amplist.h>
/**
* \addtogroup amplifier
* @{
*/
/**
* \brief Hamlib amplifier data structures.
*
* \file amplifier.h
*
* This file contains the data structures and declarations for the Hamlib
* amplifier Application Programming Interface (API).
*
* See the amplifier.c file for details on the amplifier API functions.
*/
__BEGIN_DECLS
/* Forward struct references */
struct amp;
struct amp_state;
/**
* \brief Main amplifier handle type definition.
*
* \typedef typedef struct amp AMP
*
* The #AMP handle is returned by amp_init() and is passed as a parameter to
* every amplifier specific API call.
*
* amp_cleanup() must be called when this handle is no longer needed.
*/
typedef struct amp AMP;
/**
* \brief Type definition for
* <a href="https://en.wikipedia.org/wiki/Standing_wave_ratio" >SWR (Standing Wave Ratio)</a>.
*
* \typedef typedef float swr_t
*
* The \a swr_t type is used as a parameter for the amp_get_swr() function.
*
* The unit of \a swr_t is 1.0 to the maximum value reported by the amplifier's
* internal antenna system tuner, i.e.
* <a href="http://www.arrl.org/transmatch-antenna-tuner" >transmatch</a>,
* representing the ratio of 1.0:1 to Maximum:1.
*/
typedef float swr_t;
/**
* \brief Type definition for the
* <a href="http://www.arrl.org/transmatch-antenna-tuner" >transmatch</a>
* tuning values of
* <a href="https://en.wikipedia.org/wiki/Capacitance" >capacitance</a>
* and
* <a href="https://en.wikipedia.org/wiki/Inductance" >inductance</a>.
*
* \typedef typedef float tune_value_t
*
* The \a tune_value_t type is used as a parameter for amp_get_level().
*
* The unit of \a tune_value_t is
* <a href="https://en.wikipedia.org/wiki/Farad" >picoFarads (pF)</a>
* or
* <a href="https://en.wikipedia.org/wiki/Henry_(unit)" >nanoHenrys (nH)</a>.
*/
typedef int tune_value_t;
/**
* \brief The token in the netampctl protocol for returning an error condition code.
*/
#define NETAMPCTL_RET "RPRT "
//! @cond Doxygen_Suppress
typedef enum
{
AMP_RESET_MEM, // erase tuner memory
AMP_RESET_FAULT, // reset any fault
AMP_RESET_AMP // for kpa1500
} amp_reset_t;
//! @endcond
/**
* \brief Amplifier type flags
*/
typedef enum
{
AMP_FLAG_1 = (1 << 1), /*!< TBD */
AMP_FLAG_2 = (1 << 2) /*!< TBD */
} amp_type_t;
//! @cond Doxygen_Suppress
// TBD AMP_TYPE
#define AMP_TYPE_MASK (AMP_FLAG_1|AMP_FLAG_2)
#define AMP_TYPE_OTHER 0
#define AMP_TYPE_1 AMP_FLAG_1
#define AMP_TYPE_2 AMP_FLAG_2
#define AMP_TYPE_ALL (AMP_FLAG_1|AMP_FLAG_2)
//! @endcond
//! @cond Doxygen_Suppress
enum amp_level_e
{
AMP_LEVEL_NONE = 0, /*!< '' -- No Level. */
AMP_LEVEL_SWR = (1 << 0), /*!< \c SWR 1.0 or greater. */
AMP_LEVEL_NH = (1 << 1), /*!< \c Tune setting in nanohenries. */
AMP_LEVEL_PF = (1 << 2), /*!< \c Tune setting in picofarads. */
AMP_LEVEL_PWR_INPUT = (1 << 3), /*!< \c Power reading from amplifier. */
AMP_LEVEL_PWR_FWD = (1 << 4), /*!< \c Power reading forward. */
AMP_LEVEL_PWR_REFLECTED = (1 << 5), /*!< \c Power reading reverse. */
AMP_LEVEL_PWR_PEAK = (1 << 6), /*!< \c Power reading peak. */
AMP_LEVEL_FAULT = (1 << 7) /*!< \c Fault code. */
};
//! @endcond
//! @cond Doxygen_Suppress
#define AMP_LEVEL_FLOAT_LIST (AMP_LEVEL_SWR)
#define AMP_LEVEL_STRING_LIST (AMP_LEVEL_FAULT)
#define AMP_LEVEL_IS_FLOAT(l) ((l)&AMP_LEVEL_FLOAT_LIST)
#define AMP_LEVEL_IS_STRING(l) ((l)&AMP_LEVEL_STRING_LIST)
//! @endcond
/* Basic amp type, can store some useful info about different amplifiers. Each
* lib must be able to populate this structure, so we can make useful
* enquiries about capabilities.
*/
//! @cond Doxygen_Suppress
#define AMP_MODEL(arg) .amp_model=arg,.macro_name=#arg
//! @endcond
/**
* \brief Amplifier capabilities.
*
* \struct amp_caps
*
* The main idea of this struct is that it will be defined by the backend
* amplifier driver and will remain read-only for the application. Fields
* that need to be modifiable by the application are copied into the
* amp_state structure, which is the private memory area of the #AMP instance.
*
* This way you can have several amplifiers running within the same
* application, sharing the amp_caps structure of the backend, while keeping
* their own customized data.
*
* \b Note: Don't move fields around and only add new fields at the end of the
* amp_caps structure. Shared libraries and DLLs depend on a constant
* structure to maintain compatibility.
*/
struct amp_caps
{
amp_model_t amp_model; /*!< Amplifier model as defined in amplist.h. */
const char *model_name; /*!< Model name, e.g. MM-5k. */
const char *mfg_name; /*!< Manufacturer, e.g. Moonbeam. */
const char *version; /*!< Driver version, typically in YYYYMMDD.x format. */
const char *copyright; /*!< Copyright info (should be LGPL). */
enum rig_status_e status; /*!< Driver status. */
int amp_type; /*!< Amplifier type. */
enum rig_port_e port_type; /*!< Type of communication port (serial, ethernet, etc.). */
int serial_rate_min; /*!< Minimal serial speed. */
int serial_rate_max; /*!< Maximal serial speed. */
int serial_data_bits; /*!< Number of data bits. */
int serial_stop_bits; /*!< Number of stop bits. */
enum serial_parity_e serial_parity; /*!< Parity. */
enum serial_handshake_e serial_handshake; /*!< Handshake. */
int write_delay; /*!< Write delay. */
int post_write_delay; /*!< Post-write delay. */
int timeout; /*!< Timeout. */
int retry; /*!< Number of retries if a command fails. */
const struct confparams *cfgparams; /*!< Configuration parameters. */
const rig_ptr_t priv; /*!< Private data. */
const char *amp_model_macro_name; /*!< Model macro name. */
setting_t has_get_level; /*!< List of get levels. */
setting_t has_set_level; /*!< List of set levels. */
gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */
gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */
/*
* Amp Admin API
*
*/
int (*amp_init)(AMP *amp); /*!< Pointer to backend implementation of ::amp_init(). */
int (*amp_cleanup)(AMP *amp); /*!< Pointer to backend implementation of ::amp_cleanup(). */
int (*amp_open)(AMP *amp); /*!< Pointer to backend implementation of ::amp_open(). */
int (*amp_close)(AMP *amp); /*!< Pointer to backend implementation of ::amp_close(). */
int (*set_freq)(AMP *amp, freq_t val); /*!< Pointer to backend implementation of ::amp_set_freq(). */
int (*get_freq)(AMP *amp, freq_t *val); /*!< Pointer to backend implementation of ::amp_get_freq(). */
int (*set_conf)(AMP *amp, token_t token, const char *val); /*!< Pointer to backend implementation of ::amp_set_conf(). */
int (*get_conf)(AMP *amp, token_t token, char *val); /*!< Pointer to backend implementation of ::amp_get_conf(). */
/*
* General API commands, from most primitive to least.. :()
* List Set/Get functions pairs
*/
int (*reset)(AMP *amp, amp_reset_t reset); /*!< Pointer to backend implementation of ::amp_reset(). */
int (*get_level)(AMP *amp, setting_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_level(). */
int (*get_ext_level)(AMP *amp, token_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_ext_level(). */
int (*set_powerstat)(AMP *amp, powerstat_t status); /*!< Pointer to backend implementation of ::amp_set_powerstat(). */
int (*get_powerstat)(AMP *amp, powerstat_t *status); /*!< Pointer to backend implementation of ::amp_get_powerstat(). */
/* get firmware info, etc. */
const char *(*get_info)(AMP *amp); /*!< Pointer to backend implementation of ::amp_get_info(). */
//! @cond Doxygen_Suppress
setting_t levels;
unsigned ext_levels;
//! @endcond
const struct confparams *extlevels; /*!< Extension levels list. \sa extamp.c */
const struct confparams *extparms; /*!< Extension parameters list. \sa extamp.c */
const char *macro_name; /*!< Amplifier model macro name. */
};
/**
* \brief Amplifier state structure.
*
* \struct amp_state
*
* This structure contains live data, as well as a copy of capability fields
* that may be updated, i.e. customized while the #AMP handle is instantiated.
*
* It is fine to move fields around, as this kind of struct should not be
* initialized like amp_caps are.
*/
struct amp_state
{
/*
* overridable fields
*/
/*
* non overridable fields, internal use
*/
hamlib_port_t ampport; /*!< Amplifier port (internal use). */
int comm_state; /*!< Comm port state, opened/closed. */
rig_ptr_t priv; /*!< Pointer to private amplifier state data. */
rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */
setting_t has_get_level; /*!< List of get levels. */
gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */
gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */
};
/**
* \brief Master amplifier structure.
*
* \struct amp
*
* Master amplifier data structure acting as the #AMP handle for the
* controlled amplifier. A pointer to this structure is returned by the
* amp_init() API function and is passed as a parameter to every amplifier
* specific API call.
*
* \sa amp_init(), amp_caps, amp_state
*/
struct amp
{
struct amp_caps *caps; /*!< Amplifier caps. */
struct amp_state state; /*!< Amplifier state. */
};
//! @cond Doxygen_Suppress
/* --------------- API function prototypes -----------------*/
extern HAMLIB_EXPORT(AMP *)
amp_init HAMLIB_PARAMS((amp_model_t amp_model));
extern HAMLIB_EXPORT(int)
amp_open HAMLIB_PARAMS((AMP *amp));
extern HAMLIB_EXPORT(int)
amp_close HAMLIB_PARAMS((AMP *amp));
extern HAMLIB_EXPORT(int)
amp_cleanup HAMLIB_PARAMS((AMP *amp));
extern HAMLIB_EXPORT(int)
amp_set_conf HAMLIB_PARAMS((AMP *amp,
token_t token,
const char *val));
extern HAMLIB_EXPORT(int)
amp_get_conf HAMLIB_PARAMS((AMP *amp,
token_t token,
char *val));
extern HAMLIB_EXPORT(int)
amp_set_powerstat HAMLIB_PARAMS((AMP *amp,
powerstat_t status));
extern HAMLIB_EXPORT(int)
amp_get_powerstat HAMLIB_PARAMS((AMP *amp,
powerstat_t *status));
/*
* General API commands, from most primitive to least.. )
* List Set/Get functions pairs
*/
extern HAMLIB_EXPORT(int)
amp_get_freq HAMLIB_PARAMS((AMP *amp,
freq_t *freq));
extern HAMLIB_EXPORT(int)
amp_set_freq HAMLIB_PARAMS((AMP *amp,
freq_t freq));
extern HAMLIB_EXPORT(int)
amp_reset HAMLIB_PARAMS((AMP *amp,
amp_reset_t reset));
extern HAMLIB_EXPORT(const char *)
amp_get_info HAMLIB_PARAMS((AMP *amp));
extern HAMLIB_EXPORT(int)
amp_get_level HAMLIB_PARAMS((AMP *amp, setting_t level, value_t *val));
extern HAMLIB_EXPORT(int)
amp_register HAMLIB_PARAMS((const struct amp_caps *caps));
extern HAMLIB_EXPORT(int)
amp_unregister HAMLIB_PARAMS((amp_model_t amp_model));
extern HAMLIB_EXPORT(int)
amp_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct amp_caps *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
amp_load_backend HAMLIB_PARAMS((const char *be_name));
extern HAMLIB_EXPORT(int)
amp_check_backend HAMLIB_PARAMS((amp_model_t amp_model));
extern HAMLIB_EXPORT(int)
amp_load_all_backends HAMLIB_PARAMS((void));
extern HAMLIB_EXPORT(amp_model_t)
amp_probe_all HAMLIB_PARAMS((hamlib_port_t *p));
extern HAMLIB_EXPORT(int)
amp_token_foreach HAMLIB_PARAMS((AMP *amp,
int (*cfunc)(const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(const struct confparams *)
amp_confparam_lookup HAMLIB_PARAMS((AMP *amp,
const char *name));
extern HAMLIB_EXPORT(token_t)
amp_token_lookup HAMLIB_PARAMS((AMP *amp,
const char *name));
extern HAMLIB_EXPORT(const struct amp_caps *)
amp_get_caps HAMLIB_PARAMS((amp_model_t amp_model));
extern HAMLIB_EXPORT(setting_t)
amp_has_get_level HAMLIB_PARAMS((AMP *amp,
setting_t level));
extern HAMLIB_EXPORT(const struct confparams *)
amp_ext_lookup HAMLIB_PARAMS((AMP *amp,
const char *name));
extern HAMLIB_EXPORT(int)
amp_get_ext_level HAMLIB_PARAMS((AMP *amp,
token_t token,
value_t *val));
extern HAMLIB_EXPORT(const char *) amp_strlevel(setting_t);
extern HAMLIB_EXPORT(const struct confparams *)
rig_ext_lookup HAMLIB_PARAMS((RIG *rig,
const char *name));
extern HAMLIB_EXPORT(setting_t) amp_parse_level(const char *s);
extern HAMLIB_EXPORT(const char *) amp_strlevel(setting_t);
//! @endcond
/**
* \brief Convenience macro for generating debugging messages.
*
* \def amp_debug
*
* This is an alias of the rig_debug() function call and is used in the same
* manner.
*/
#define amp_debug rig_debug
__END_DECLS
#endif /* _AMPLIFIER_H */
/** @} */

120
hamlib/amplist.h 100644
Wyświetl plik

@ -0,0 +1,120 @@
/*
* Hamlib Interface - list of known amplifiers
* Copyright (c) 2000-2011 by Stephane Fillod
* Copyright (c) 2000-2002 by Frank Singleton
* Copyright (C) 2019 by Michael Black W9MDB. Derived from rotlist.h
*
*
* 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
*
*/
#ifndef _AMPLIST_H
#define _AMPLIST_H 1
//! @cond Doxygen_Suppress
#define AMP_MAKE_MODEL(a,b) ((a)*100+(b))
#define AMP_BACKEND_NUM(a) ((a)/100)
//! @endcond
/**
* \addtogroup amplifier
* @{
*/
/**
* \brief Hamlib amplifier model definitions.
*
* \file amplist.h
*
* This file contains amplifier model definitions for the Hamlib amplifier
* Application Programming Interface (API). Each distinct amplifier type has
* a unique model number (ID) and is used by Hamlib to identify and
* distinguish between the different hardware drivers. The exact model
* numbers can be acquired using the macros in this file. To obtain a list of
* supported amplifier branches, one can use the statically defined
* AMP_BACKEND_LIST macro (defined in configure.ac). To obtain a full list of
* supported amplifiers (including each model in every branch), the
* foreach_opened_amp() API function can be used.
*
* The model number, or ID, is used to tell Hamlib which amplifier the client
* wishes to use which is done with the amp_init() API call.
*/
/**
* \brief A macro that returns the model number for an unknown model.
*
* \def AMP_MODEL_NONE
*
* The none backend, as the name suggests, does nothing. It is mainly for
* internal use.
*/
#define AMP_MODEL_NONE 0
/**
* \brief A macro that returns the model number for the DUMMY backend.
*
* \def AMP_MODEL_DUMMY
*
* The DUMMY backend, as the name suggests, is a backend which performs no
* hardware operations and always behaves as one would expect. It can be
* thought of as a hardware simulator and is very useful for testing client
* applications.
*/
/**
* \brief A macro that returns the model number for the NETAMPCTL backend.
*
* \def AMP_MODEL_NETAMPCTL
*
* The NETAMPCTL backend allows use of the `ampctld` daemon through the normal
* Hamlib API.
*/
//! @cond Doxygen_Suppress
#define AMP_DUMMY 0
#define AMP_BACKEND_DUMMY "dummy"
//! @endcond
#define AMP_MODEL_DUMMY AMP_MAKE_MODEL(AMP_DUMMY, 1)
#define AMP_MODEL_NETAMPCTL AMP_MAKE_MODEL(AMP_DUMMY, 2)
/**
* \brief A macro that returns the model number of the KPA1500 backend.
*
* \def AMP_MODEL_ELECRAFT_KPA1500
*
* The KPA1500 backend can be used with amplifiers that support the Elecraft
* KPA-1500 protocol.
*/
//! @cond Doxygen_Suppress
#define AMP_ELECRAFT 2
#define AMP_BACKEND_ELECRAFT "elecraft"
//! @endcond
#define AMP_MODEL_ELECRAFT_KPA1500 AMP_MAKE_MODEL(AMP_ELECRAFT, 1)
//#define AMP_MODEL_ELECRAFT_KPA500 AMP_MAKE_MODEL(AMP_ELECRAFT, 2)
/**
* \brief Convenience type definition for an amplifier model.
*
* \typedef typedef int amp_model_t
*/
typedef int amp_model_t;
#endif /* _AMPLIST_H */
/** @} */

Plik binarny nie jest wyświetlany.

3196
hamlib/rig.h 100644

Plik diff jest za duży Load Diff

90
hamlib/rig_dll.h 100644
Wyświetl plik

@ -0,0 +1,90 @@
/*
* Hamlib Win32 DLL build definitions
* Copyright (c) 2001-2009 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
*
*/
/*
* Provide definitions to compile in Windows
* using C-friendly options, e.g.
*
* HAMLIB_API -> __cdecl
* HAMLIB_EXPORT, HAMLIB_EXPORT_VAR -> __declspec(dllexport)
* BACKEND_EXPORT, BACKEND_EXPORT_VAR -> __declspec(dllexport)
*
* No effect in non-Windows environments.
*/
#if defined(_WIN32) && !defined(__CYGWIN__)
# undef HAMLIB_IMPEXP
# undef HAMLIB_CPP_IMPEXP
# undef HAMLIB_API
# undef HAMLIB_EXPORT
# undef HAMLIB_EXPORT_VAR
# undef BACKEND_EXPORT
# undef BACKEND_EXPORT_VAR
# undef HAMLIB_DLL_IMPORT
# undef HAMLIB_DLL_EXPORT
# if defined (__BORLANDC__)
# define HAMLIB_DLL_IMPORT __import
# define HAMLIB_DLL_EXPORT __export
# else
# define HAMLIB_DLL_IMPORT __declspec(dllimport)
# define HAMLIB_DLL_EXPORT __declspec(dllexport)
# endif
# ifdef DLL_EXPORT
/* HAMLIB_API may be set to __stdcall for VB, .. */
# define HAMLIB_API __cdecl
# ifdef IN_HAMLIB
# define HAMLIB_CPP_IMPEXP HAMLIB_DLL_EXPORT
# define HAMLIB_IMPEXP HAMLIB_DLL_EXPORT
# else
# define HAMLIB_CPP_IMPEXP HAMLIB_DLL_IMPORT
# define HAMLIB_IMPEXP HAMLIB_DLL_IMPORT
# endif
# else
/* static build, only export the backend entry points for lt_dlsym */
# define HAMLIB_CPP_IMPEXP HAMLIB_DLL_EXPORT
# endif
#endif
/* Take care of non-cygwin platforms */
#if !defined(HAMLIB_IMPEXP)
# define HAMLIB_IMPEXP
#endif
#if !defined(HAMLIB_CPP_IMPEXP)
# define HAMLIB_CPP_IMPEXP
#endif
#if !defined(HAMLIB_API)
# define HAMLIB_API
#endif
#if !defined(HAMLIB_EXPORT)
# define HAMLIB_EXPORT(type) HAMLIB_IMPEXP type HAMLIB_API
#endif
#if !defined(HAMLIB_EXPORT_VAR)
# define HAMLIB_EXPORT_VAR(type) HAMLIB_IMPEXP type
#endif
#if !defined(BACKEND_EXPORT)
# define BACKEND_EXPORT(type) HAMLIB_CPP_IMPEXP type HAMLIB_API
#endif
#if !defined(BACKEND_EXPORT_VAR)
# define BACKEND_EXPORT_VAR(type) HAMLIB_CPP_IMPEXP type
#endif

662
hamlib/riglist.h 100644
Wyświetl plik

@ -0,0 +1,662 @@
/*
* Hamlib Interface - list of known rigs
* Copyright (c) 2000-2003 by Frank Singleton
* Copyright (c) 2000-2015 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
*
*/
#ifndef _RIGLIST_H
#define _RIGLIST_H 1
//! @cond Doxygen_Suppress
// The rig model number is designed to fit in a 32-bit int
// As of 2020-02-18 we have 33 backends defined
// With a max of 1000 models per backend we get total a model number range of 1001-33001
// This MAX was 100 prior to 2020-02-18 and Icom was close to running out of the 100 range
#define MAX_MODELS_PER_BACKEND 1000
#define RIG_MAKE_MODEL(a,b) ((a)*MAX_MODELS_PER_BACKEND+(b))
#define RIG_BACKEND_NUM(a) ((a)/MAX_MODELS_PER_BACKEND)
/*! \file riglist.h
* \brief Hamlib rig(radio) model definitions.
*
* This file contains rig model definitions for the Hamlib rig API. Each
* distinct rig type has a unique model number (ID) and is used by hamlib to
* identify and distinguish between the different hardware drivers. The
* exact model numbers can be acquired using the macros in this file. To
* obtain a list of supported rig branches, one can use the statically
* defined RIG_BACKEND_LIST macro. To obtain a full list of supported rig
* (including each model in every branch), the foreach_opened_rig() API
* function can be used.
*
* The model number, or ID, is used to tell hamlib, which rig the client
* whishes to use. It is done with the rig_init() API call.
*/
#define RIG_MODEL_NONE 0
/*! \def RIG_MODEL_DUMMY
* \brief A macro that returns the model number for the dummy backend.
*
* The dummy backend, as the name suggests, is a backend which performs no
* hardware operations and always behaves as one would expect. It can be
* thought of as a hardware simulator and is very useful for testing client
* applications.
*
* It has also been expanded to provide support to "virtual" type of rigs
* such as the network rig control backend and W1HKJ's Flrig application.
*/
#define RIG_DUMMY 0
#define RIG_BACKEND_DUMMY "dummy"
#define RIG_MODEL_DUMMY RIG_MAKE_MODEL(RIG_DUMMY, 1)
#define RIG_MODEL_NETRIGCTL RIG_MAKE_MODEL(RIG_DUMMY, 2)
#define RIG_MODEL_ARMSTRONG RIG_MAKE_MODEL(RIG_DUMMY, 3)
#define RIG_MODEL_FLRIG RIG_MAKE_MODEL(RIG_DUMMY, 4)
#define RIG_MODEL_TRXMANAGER_RIG RIG_MAKE_MODEL(RIG_DUMMY, 5)
#define RIG_MODEL_DUMMY_NOVFO RIG_MAKE_MODEL(RIG_DUMMY, 6)
#define RIG_MODEL_TCI1X RIG_MAKE_MODEL(RIG_DUMMY, 7)
/*
* Yaesu
*/
#define RIG_YAESU 1
#define RIG_BACKEND_YAESU "yaesu"
#define RIG_MODEL_FT847 RIG_MAKE_MODEL(RIG_YAESU, 1)
#define RIG_MODEL_FT1000 RIG_MAKE_MODEL(RIG_YAESU, 2)
#define RIG_MODEL_FT1000D RIG_MAKE_MODEL(RIG_YAESU, 3)
#define RIG_MODEL_FT1000MPMKV RIG_MAKE_MODEL(RIG_YAESU, 4)
#define RIG_MODEL_FT747 RIG_MAKE_MODEL(RIG_YAESU, 5)
#define RIG_MODEL_FT757 RIG_MAKE_MODEL(RIG_YAESU, 6)
#define RIG_MODEL_FT757GXII RIG_MAKE_MODEL(RIG_YAESU, 7)
#define RIG_MODEL_FT575 RIG_MAKE_MODEL(RIG_YAESU, 8)
#define RIG_MODEL_FT767 RIG_MAKE_MODEL(RIG_YAESU, 9)
#define RIG_MODEL_FT736R RIG_MAKE_MODEL(RIG_YAESU, 10)
#define RIG_MODEL_FT840 RIG_MAKE_MODEL(RIG_YAESU, 11)
#define RIG_MODEL_FT820 RIG_MAKE_MODEL(RIG_YAESU, 12)
#define RIG_MODEL_FT900 RIG_MAKE_MODEL(RIG_YAESU, 13)
#define RIG_MODEL_FT920 RIG_MAKE_MODEL(RIG_YAESU, 14)
#define RIG_MODEL_FT890 RIG_MAKE_MODEL(RIG_YAESU, 15)
#define RIG_MODEL_FT990 RIG_MAKE_MODEL(RIG_YAESU, 16)
#define RIG_MODEL_FRG100 RIG_MAKE_MODEL(RIG_YAESU, 17)
#define RIG_MODEL_FRG9600 RIG_MAKE_MODEL(RIG_YAESU, 18)
#define RIG_MODEL_FRG8800 RIG_MAKE_MODEL(RIG_YAESU, 19)
#define RIG_MODEL_FT817 RIG_MAKE_MODEL(RIG_YAESU, 20)
#define RIG_MODEL_FT100 RIG_MAKE_MODEL(RIG_YAESU, 21)
#define RIG_MODEL_FT857 RIG_MAKE_MODEL(RIG_YAESU, 22)
#define RIG_MODEL_FT897 RIG_MAKE_MODEL(RIG_YAESU, 23)
#define RIG_MODEL_FT1000MP RIG_MAKE_MODEL(RIG_YAESU, 24)
#define RIG_MODEL_FT1000MPMKVFLD RIG_MAKE_MODEL(RIG_YAESU, 25)
#define RIG_MODEL_VR5000 RIG_MAKE_MODEL(RIG_YAESU, 26)
#define RIG_MODEL_FT450 RIG_MAKE_MODEL(RIG_YAESU, 27)
#define RIG_MODEL_FT950 RIG_MAKE_MODEL(RIG_YAESU, 28)
#define RIG_MODEL_FT2000 RIG_MAKE_MODEL(RIG_YAESU, 29)
#define RIG_MODEL_FT9000 RIG_MAKE_MODEL(RIG_YAESU, 30)
#define RIG_MODEL_FT980 RIG_MAKE_MODEL(RIG_YAESU, 31)
#define RIG_MODEL_FTDX5000 RIG_MAKE_MODEL(RIG_YAESU, 32)
#define RIG_MODEL_VX1700 RIG_MAKE_MODEL(RIG_YAESU, 33)
#define RIG_MODEL_FTDX1200 RIG_MAKE_MODEL(RIG_YAESU, 34)
#define RIG_MODEL_FT991 RIG_MAKE_MODEL(RIG_YAESU, 35)
#define RIG_MODEL_FT891 RIG_MAKE_MODEL(RIG_YAESU, 36)
#define RIG_MODEL_FTDX3000 RIG_MAKE_MODEL(RIG_YAESU, 37)
#define RIG_MODEL_FT847UNI RIG_MAKE_MODEL(RIG_YAESU, 38)
#define RIG_MODEL_FT600 RIG_MAKE_MODEL(RIG_YAESU, 39)
#define RIG_MODEL_FTDX101D RIG_MAKE_MODEL(RIG_YAESU, 40)
#define RIG_MODEL_FT818 RIG_MAKE_MODEL(RIG_YAESU, 41)
#define RIG_MODEL_FTDX10 RIG_MAKE_MODEL(RIG_YAESU, 42)
#define RIG_MODEL_FT897D RIG_MAKE_MODEL(RIG_YAESU, 43)
#define RIG_MODEL_FTDX101MP RIG_MAKE_MODEL(RIG_YAESU, 44)
#define RIG_MODEL_MCHFQRP RIG_MAKE_MODEL(RIG_YAESU, 45)
/*
* Kenwood
*/
#define RIG_KENWOOD 2
#define RIG_BACKEND_KENWOOD "kenwood"
#define RIG_MODEL_TS50 RIG_MAKE_MODEL(RIG_KENWOOD, 1)
#define RIG_MODEL_TS440 RIG_MAKE_MODEL(RIG_KENWOOD, 2)
#define RIG_MODEL_TS450S RIG_MAKE_MODEL(RIG_KENWOOD, 3)
#define RIG_MODEL_TS570D RIG_MAKE_MODEL(RIG_KENWOOD, 4)
#define RIG_MODEL_TS690S RIG_MAKE_MODEL(RIG_KENWOOD, 5)
#define RIG_MODEL_TS711 RIG_MAKE_MODEL(RIG_KENWOOD, 6)
#define RIG_MODEL_TS790 RIG_MAKE_MODEL(RIG_KENWOOD, 7)
#define RIG_MODEL_TS811 RIG_MAKE_MODEL(RIG_KENWOOD, 8)
#define RIG_MODEL_TS850 RIG_MAKE_MODEL(RIG_KENWOOD, 9)
#define RIG_MODEL_TS870S RIG_MAKE_MODEL(RIG_KENWOOD, 10)
#define RIG_MODEL_TS940 RIG_MAKE_MODEL(RIG_KENWOOD, 11)
#define RIG_MODEL_TS950S RIG_MAKE_MODEL(RIG_KENWOOD, 12)
#define RIG_MODEL_TS950SDX RIG_MAKE_MODEL(RIG_KENWOOD, 13)
#define RIG_MODEL_TS2000 RIG_MAKE_MODEL(RIG_KENWOOD, 14)
#define RIG_MODEL_R5000 RIG_MAKE_MODEL(RIG_KENWOOD, 15)
#define RIG_MODEL_TS570S RIG_MAKE_MODEL(RIG_KENWOOD, 16)
#define RIG_MODEL_THD7A RIG_MAKE_MODEL(RIG_KENWOOD, 17)
#define RIG_MODEL_THD7AG RIG_MAKE_MODEL(RIG_KENWOOD, 18)
#define RIG_MODEL_THF6A RIG_MAKE_MODEL(RIG_KENWOOD, 19)
#define RIG_MODEL_THF7E RIG_MAKE_MODEL(RIG_KENWOOD, 20)
#define RIG_MODEL_K2 RIG_MAKE_MODEL(RIG_KENWOOD, 21)
#define RIG_MODEL_TS930 RIG_MAKE_MODEL(RIG_KENWOOD, 22)
#define RIG_MODEL_THG71 RIG_MAKE_MODEL(RIG_KENWOOD, 23)
#define RIG_MODEL_TS680S RIG_MAKE_MODEL(RIG_KENWOOD, 24)
#define RIG_MODEL_TS140S RIG_MAKE_MODEL(RIG_KENWOOD, 25)
#define RIG_MODEL_TMD700 RIG_MAKE_MODEL(RIG_KENWOOD, 26)
#define RIG_MODEL_TMV7 RIG_MAKE_MODEL(RIG_KENWOOD, 27)
#define RIG_MODEL_TS480 RIG_MAKE_MODEL(RIG_KENWOOD, 28)
#define RIG_MODEL_K3 RIG_MAKE_MODEL(RIG_KENWOOD, 29)
#define RIG_MODEL_TRC80 RIG_MAKE_MODEL(RIG_KENWOOD, 30)
#define RIG_MODEL_TS590S RIG_MAKE_MODEL(RIG_KENWOOD, 31)
#define RIG_MODEL_TRANSFOX RIG_MAKE_MODEL(RIG_KENWOOD, 32) /* SigFox Transfox */
#define RIG_MODEL_THD72A RIG_MAKE_MODEL(RIG_KENWOOD, 33)
#define RIG_MODEL_TMD710 RIG_MAKE_MODEL(RIG_KENWOOD, 34)
#define RIG_MODEL_TMV71 RIG_MAKE_MODEL(RIG_KENWOOD, 35)
#define RIG_MODEL_F6K RIG_MAKE_MODEL(RIG_KENWOOD, 36) /* Flex 6000 Series */
#define RIG_MODEL_TS590SG RIG_MAKE_MODEL(RIG_KENWOOD, 37)
#define RIG_MODEL_XG3 RIG_MAKE_MODEL(RIG_KENWOOD, 38) /* Elecraft XG-3 signal generator */
#define RIG_MODEL_TS990S RIG_MAKE_MODEL(RIG_KENWOOD, 39)
#define RIG_MODEL_HPSDR RIG_MAKE_MODEL(RIG_KENWOOD, 40) /* OpenHPSDR, PiHPSDR */
#define RIG_MODEL_TS890S RIG_MAKE_MODEL(RIG_KENWOOD, 41)
#define RIG_MODEL_THD74 RIG_MAKE_MODEL(RIG_KENWOOD, 42)
#define RIG_MODEL_K3S RIG_MAKE_MODEL(RIG_KENWOOD, 43)
#define RIG_MODEL_KX2 RIG_MAKE_MODEL(RIG_KENWOOD, 44)
#define RIG_MODEL_KX3 RIG_MAKE_MODEL(RIG_KENWOOD, 45)
#define RIG_MODEL_PT8000A RIG_MAKE_MODEL(RIG_KENWOOD, 46)
#define RIG_MODEL_K4 RIG_MAKE_MODEL(RIG_KENWOOD, 47)
#define RIG_MODEL_POWERSDR RIG_MAKE_MODEL(RIG_KENWOOD, 48)
#define RIG_MODEL_MALACHITE RIG_MAKE_MODEL(RIG_KENWOOD, 49)
/*
* Icom
*/
#define RIG_ICOM 3
#define RIG_BACKEND_ICOM "icom"
#define RIG_MODEL_IC1271 RIG_MAKE_MODEL(RIG_ICOM, 1)
#define RIG_MODEL_IC1275 RIG_MAKE_MODEL(RIG_ICOM, 2)
#define RIG_MODEL_IC271 RIG_MAKE_MODEL(RIG_ICOM, 3)
#define RIG_MODEL_IC275 RIG_MAKE_MODEL(RIG_ICOM, 4)
#define RIG_MODEL_IC375 RIG_MAKE_MODEL(RIG_ICOM, 5)
#define RIG_MODEL_IC471 RIG_MAKE_MODEL(RIG_ICOM, 6)
#define RIG_MODEL_IC475 RIG_MAKE_MODEL(RIG_ICOM, 7)
#define RIG_MODEL_IC575 RIG_MAKE_MODEL(RIG_ICOM, 8)
#define RIG_MODEL_IC706 RIG_MAKE_MODEL(RIG_ICOM, 9)
#define RIG_MODEL_IC706MKII RIG_MAKE_MODEL(RIG_ICOM, 10)
#define RIG_MODEL_IC706MKIIG RIG_MAKE_MODEL(RIG_ICOM, 11)
#define RIG_MODEL_IC707 RIG_MAKE_MODEL(RIG_ICOM, 12)
#define RIG_MODEL_IC718 RIG_MAKE_MODEL(RIG_ICOM, 13)
#define RIG_MODEL_IC725 RIG_MAKE_MODEL(RIG_ICOM, 14)
#define RIG_MODEL_IC726 RIG_MAKE_MODEL(RIG_ICOM, 15)
#define RIG_MODEL_IC728 RIG_MAKE_MODEL(RIG_ICOM, 16)
#define RIG_MODEL_IC729 RIG_MAKE_MODEL(RIG_ICOM, 17)
#define RIG_MODEL_IC731 RIG_MAKE_MODEL(RIG_ICOM, 18)
#define RIG_MODEL_IC735 RIG_MAKE_MODEL(RIG_ICOM, 19)
#define RIG_MODEL_IC736 RIG_MAKE_MODEL(RIG_ICOM, 20)
#define RIG_MODEL_IC737 RIG_MAKE_MODEL(RIG_ICOM, 21)
#define RIG_MODEL_IC738 RIG_MAKE_MODEL(RIG_ICOM, 22)
#define RIG_MODEL_IC746 RIG_MAKE_MODEL(RIG_ICOM, 23)
#define RIG_MODEL_IC751 RIG_MAKE_MODEL(RIG_ICOM, 24)
#define RIG_MODEL_IC751A RIG_MAKE_MODEL(RIG_ICOM, 25)
#define RIG_MODEL_IC756 RIG_MAKE_MODEL(RIG_ICOM, 26)
#define RIG_MODEL_IC756PRO RIG_MAKE_MODEL(RIG_ICOM, 27)
#define RIG_MODEL_IC761 RIG_MAKE_MODEL(RIG_ICOM, 28)
#define RIG_MODEL_IC765 RIG_MAKE_MODEL(RIG_ICOM, 29)
#define RIG_MODEL_IC775 RIG_MAKE_MODEL(RIG_ICOM, 30)
#define RIG_MODEL_IC781 RIG_MAKE_MODEL(RIG_ICOM, 31)
#define RIG_MODEL_IC820 RIG_MAKE_MODEL(RIG_ICOM, 32)
//#define RIG_MODEL_IC821 RIG_MAKE_MODEL(RIG_ICOM, 33) // not implemented and can be reused
#define RIG_MODEL_IC821H RIG_MAKE_MODEL(RIG_ICOM, 34)
#define RIG_MODEL_IC970 RIG_MAKE_MODEL(RIG_ICOM, 35)
#define RIG_MODEL_ICR10 RIG_MAKE_MODEL(RIG_ICOM, 36)
#define RIG_MODEL_ICR71 RIG_MAKE_MODEL(RIG_ICOM, 37)
#define RIG_MODEL_ICR72 RIG_MAKE_MODEL(RIG_ICOM, 38)
#define RIG_MODEL_ICR75 RIG_MAKE_MODEL(RIG_ICOM, 39)
#define RIG_MODEL_ICR7000 RIG_MAKE_MODEL(RIG_ICOM, 40)
#define RIG_MODEL_ICR7100 RIG_MAKE_MODEL(RIG_ICOM, 41)
#define RIG_MODEL_ICR8500 RIG_MAKE_MODEL(RIG_ICOM, 42)
#define RIG_MODEL_ICR9000 RIG_MAKE_MODEL(RIG_ICOM, 43)
#define RIG_MODEL_IC910 RIG_MAKE_MODEL(RIG_ICOM, 44)
#define RIG_MODEL_IC78 RIG_MAKE_MODEL(RIG_ICOM, 45)
#define RIG_MODEL_IC746PRO RIG_MAKE_MODEL(RIG_ICOM, 46)
#define RIG_MODEL_IC756PROII RIG_MAKE_MODEL(RIG_ICOM, 47) /* 48-53 defined below */
#define RIG_MODEL_ICID1 RIG_MAKE_MODEL(RIG_ICOM, 54)
#define RIG_MODEL_IC703 RIG_MAKE_MODEL(RIG_ICOM, 55)
#define RIG_MODEL_IC7800 RIG_MAKE_MODEL(RIG_ICOM, 56)
#define RIG_MODEL_IC756PROIII RIG_MAKE_MODEL(RIG_ICOM, 57)
#define RIG_MODEL_ICR20 RIG_MAKE_MODEL(RIG_ICOM, 58) /* 59 defined below */
#define RIG_MODEL_IC7000 RIG_MAKE_MODEL(RIG_ICOM, 60)
#define RIG_MODEL_IC7200 RIG_MAKE_MODEL(RIG_ICOM, 61)
#define RIG_MODEL_IC7700 RIG_MAKE_MODEL(RIG_ICOM, 62)
#define RIG_MODEL_IC7600 RIG_MAKE_MODEL(RIG_ICOM, 63) /* 64 defined below */
#define RIG_MODEL_IC92D RIG_MAKE_MODEL(RIG_ICOM, 65)
#define RIG_MODEL_ICR9500 RIG_MAKE_MODEL(RIG_ICOM, 66)
#define RIG_MODEL_IC7410 RIG_MAKE_MODEL(RIG_ICOM, 67)
#define RIG_MODEL_IC9100 RIG_MAKE_MODEL(RIG_ICOM, 68)
#define RIG_MODEL_ICRX7 RIG_MAKE_MODEL(RIG_ICOM, 69)
#define RIG_MODEL_IC7100 RIG_MAKE_MODEL(RIG_ICOM, 70)
#define RIG_MODEL_ID5100 RIG_MAKE_MODEL(RIG_ICOM, 71)
#define RIG_MODEL_IC2730 RIG_MAKE_MODEL(RIG_ICOM, 72)
#define RIG_MODEL_IC7300 RIG_MAKE_MODEL(RIG_ICOM, 73)
#define RIG_MODEL_PERSEUS RIG_MAKE_MODEL(RIG_ICOM, 74)
#define RIG_MODEL_IC785x RIG_MAKE_MODEL(RIG_ICOM, 75)
#define RIG_MODEL_X108G RIG_MAKE_MODEL(RIG_ICOM, 76) /* Xiegu X108 */
#define RIG_MODEL_ICR6 RIG_MAKE_MODEL(RIG_ICOM, 77)
#define RIG_MODEL_IC7610 RIG_MAKE_MODEL(RIG_ICOM, 78)
#define RIG_MODEL_ICR8600 RIG_MAKE_MODEL(RIG_ICOM, 79)
#define RIG_MODEL_ICR30 RIG_MAKE_MODEL(RIG_ICOM, 80)
#define RIG_MODEL_IC9700 RIG_MAKE_MODEL(RIG_ICOM, 81)
#define RIG_MODEL_ID4100 RIG_MAKE_MODEL(RIG_ICOM, 82)
#define RIG_MODEL_ID31 RIG_MAKE_MODEL(RIG_ICOM, 83)
#define RIG_MODEL_ID51 RIG_MAKE_MODEL(RIG_ICOM, 84)
#define RIG_MODEL_IC705 RIG_MAKE_MODEL(RIG_ICOM, 85)
/* next one is 86 */
/*
* Optoelectronics (CI-V)
*/
#define RIG_MODEL_MINISCOUT RIG_MAKE_MODEL(RIG_ICOM, 48)
#define RIG_MODEL_XPLORER RIG_MAKE_MODEL(RIG_ICOM, 49)
#define RIG_MODEL_OS535 RIG_MAKE_MODEL(RIG_ICOM, 52)
#define RIG_MODEL_OS456 RIG_MAKE_MODEL(RIG_ICOM, 53)
/*
* TenTec (CI-V)
*/
#define RIG_MODEL_OMNIVI RIG_MAKE_MODEL(RIG_ICOM, 50)
#define RIG_MODEL_OMNIVIP RIG_MAKE_MODEL(RIG_ICOM, 51) /* OMNI-VI+ */
#define RIG_MODEL_PARAGON2 RIG_MAKE_MODEL(RIG_ICOM, 59)
#define RIG_MODEL_DELTAII RIG_MAKE_MODEL(RIG_ICOM, 64)
/*
* Icom PCR
*/
#define RIG_PCR 4
#define RIG_BACKEND_PCR "pcr"
#define RIG_MODEL_PCR1000 RIG_MAKE_MODEL(RIG_PCR, 1)
#define RIG_MODEL_PCR100 RIG_MAKE_MODEL(RIG_PCR, 2)
#define RIG_MODEL_PCR1500 RIG_MAKE_MODEL(RIG_PCR, 3)
#define RIG_MODEL_PCR2500 RIG_MAKE_MODEL(RIG_PCR, 4)
/*
* AOR
*/
#define RIG_AOR 5
#define RIG_BACKEND_AOR "aor"
#define RIG_MODEL_AR8200 RIG_MAKE_MODEL(RIG_AOR, 1)
#define RIG_MODEL_AR8000 RIG_MAKE_MODEL(RIG_AOR, 2)
#define RIG_MODEL_AR7030 RIG_MAKE_MODEL(RIG_AOR, 3)
#define RIG_MODEL_AR5000 RIG_MAKE_MODEL(RIG_AOR, 4)
#define RIG_MODEL_AR3030 RIG_MAKE_MODEL(RIG_AOR, 5)
#define RIG_MODEL_AR3000A RIG_MAKE_MODEL(RIG_AOR, 6)
#define RIG_MODEL_AR3000 RIG_MAKE_MODEL(RIG_AOR, 7)
#define RIG_MODEL_AR2700 RIG_MAKE_MODEL(RIG_AOR, 8)
#define RIG_MODEL_AR2500 RIG_MAKE_MODEL(RIG_AOR, 9)
#define RIG_MODEL_AR16 RIG_MAKE_MODEL(RIG_AOR, 10)
#define RIG_MODEL_SDU5500 RIG_MAKE_MODEL(RIG_AOR, 11)
#define RIG_MODEL_SDU5000 RIG_MAKE_MODEL(RIG_AOR, 12)
#define RIG_MODEL_AR8600 RIG_MAKE_MODEL(RIG_AOR, 13)
#define RIG_MODEL_AR5000A RIG_MAKE_MODEL(RIG_AOR, 14)
#define RIG_MODEL_AR7030P RIG_MAKE_MODEL(RIG_AOR, 15)
#define RIG_MODEL_SR2200 RIG_MAKE_MODEL(RIG_AOR, 16)
/*
* JRC
*/
#define RIG_JRC 6
#define RIG_BACKEND_JRC "jrc"
#define RIG_MODEL_JST145 RIG_MAKE_MODEL(RIG_JRC, 1)
#define RIG_MODEL_JST245 RIG_MAKE_MODEL(RIG_JRC, 2)
#define RIG_MODEL_CMH530 RIG_MAKE_MODEL(RIG_JRC, 3)
#define RIG_MODEL_NRD345 RIG_MAKE_MODEL(RIG_JRC, 4)
#define RIG_MODEL_NRD525 RIG_MAKE_MODEL(RIG_JRC, 5)
#define RIG_MODEL_NRD535 RIG_MAKE_MODEL(RIG_JRC, 6)
#define RIG_MODEL_NRD545 RIG_MAKE_MODEL(RIG_JRC, 7)
/*
* Radio Shack
* Actually, they might be either Icom or Uniden. TBC --SF
*/
#define RIG_RADIOSHACK 7
#define RIG_BACKEND_RADIOSHACK "radioshack"
#define RIG_MODEL_RS64 RIG_MAKE_MODEL(RIG_RADIOSHACK, 1) /* PRO-64 */
#define RIG_MODEL_RS2005 RIG_MAKE_MODEL(RIG_RADIOSHACK, 2) /* w/ OptoElectronics OS456 Board */
#define RIG_MODEL_RS2006 RIG_MAKE_MODEL(RIG_RADIOSHACK, 3) /* w/ OptoElectronics OS456 Board */
#define RIG_MODEL_RS2035 RIG_MAKE_MODEL(RIG_RADIOSHACK, 4) /* w/ OptoElectronics OS435 Board */
#define RIG_MODEL_RS2042 RIG_MAKE_MODEL(RIG_RADIOSHACK, 5) /* w/ OptoElectronics OS435 Board */
#define RIG_MODEL_RS2041 RIG_MAKE_MODEL(RIG_RADIOSHACK, 6) /* PRO-2041 */
/*
* Uniden
*/
#define RIG_UNIDEN 8
#define RIG_BACKEND_UNIDEN "uniden"
#define RIG_MODEL_BC780 RIG_MAKE_MODEL(RIG_UNIDEN, 1) /* Uniden BC780 - Trunk Tracker "Desktop Radio" */
#define RIG_MODEL_BC245 RIG_MAKE_MODEL(RIG_UNIDEN, 2)
#define RIG_MODEL_BC895 RIG_MAKE_MODEL(RIG_UNIDEN, 3)
#define RIG_MODEL_PRO2052 RIG_MAKE_MODEL(RIG_UNIDEN, 4) /* Radio Shack PRO-2052 */
#define RIG_MODEL_BC235 RIG_MAKE_MODEL(RIG_UNIDEN, 5)
#define RIG_MODEL_BC250 RIG_MAKE_MODEL(RIG_UNIDEN, 6)
#define RIG_MODEL_BC785 RIG_MAKE_MODEL(RIG_UNIDEN, 7)
#define RIG_MODEL_BC786 RIG_MAKE_MODEL(RIG_UNIDEN, 8)
#define RIG_MODEL_BCT8 RIG_MAKE_MODEL(RIG_UNIDEN, 9)
#define RIG_MODEL_BCD396T RIG_MAKE_MODEL(RIG_UNIDEN, 10)
#define RIG_MODEL_BCD996T RIG_MAKE_MODEL(RIG_UNIDEN, 11)
#define RIG_MODEL_BC898 RIG_MAKE_MODEL(RIG_UNIDEN, 12)
/*
* Drake
*/
#define RIG_DRAKE 9
#define RIG_BACKEND_DRAKE "drake"
#define RIG_MODEL_DKR8 RIG_MAKE_MODEL(RIG_DRAKE, 1)
#define RIG_MODEL_DKR8A RIG_MAKE_MODEL(RIG_DRAKE, 2)
#define RIG_MODEL_DKR8B RIG_MAKE_MODEL(RIG_DRAKE, 3)
/*
* Lowe
*/
#define RIG_LOWE 10
#define RIG_BACKEND_LOWE "lowe"
#define RIG_MODEL_HF150 RIG_MAKE_MODEL(RIG_LOWE, 1)
#define RIG_MODEL_HF225 RIG_MAKE_MODEL(RIG_LOWE, 2)
#define RIG_MODEL_HF250 RIG_MAKE_MODEL(RIG_LOWE, 3)
#define RIG_MODEL_HF235 RIG_MAKE_MODEL(RIG_LOWE, 4)
/*
* Racal
*/
#define RIG_RACAL 11
#define RIG_BACKEND_RACAL "racal"
#define RIG_MODEL_RA3790 RIG_MAKE_MODEL(RIG_RACAL, 1)
#define RIG_MODEL_RA3720 RIG_MAKE_MODEL(RIG_RACAL, 2)
#define RIG_MODEL_RA6790 RIG_MAKE_MODEL(RIG_RACAL, 3)
#define RIG_MODEL_RA3710 RIG_MAKE_MODEL(RIG_RACAL, 4)
#define RIG_MODEL_RA3702 RIG_MAKE_MODEL(RIG_RACAL, 5)
/*
* Watkins-Johnson
*/
#define RIG_WJ 12
#define RIG_BACKEND_WJ "wj"
#define RIG_MODEL_HF1000 RIG_MAKE_MODEL(RIG_WJ, 1)
#define RIG_MODEL_HF1000A RIG_MAKE_MODEL(RIG_WJ, 2)
#define RIG_MODEL_WJ8711 RIG_MAKE_MODEL(RIG_WJ, 3)
#define RIG_MODEL_WJ8888 RIG_MAKE_MODEL(RIG_WJ, 4)
/*
* Rohde & Schwarz--ek
*/
#define RIG_EK 13
#define RIG_BACKEND_EK "ek"
#define RIG_MODEL_ESM500 RIG_MAKE_MODEL(RIG_EK, 1)
#define RIG_MODEL_EK890 RIG_MAKE_MODEL(RIG_EK, 2)
#define RIG_MODEL_EK891 RIG_MAKE_MODEL(RIG_EK, 3)
#define RIG_MODEL_EK895 RIG_MAKE_MODEL(RIG_EK, 4)
#define RIG_MODEL_EK070 RIG_MAKE_MODEL(RIG_EK, 5)
/*
* Skanti
*/
#define RIG_SKANTI 14
#define RIG_BACKEND_SKANTI "skanti"
#define RIG_MODEL_TRP7000 RIG_MAKE_MODEL(RIG_SKANTI, 1)
#define RIG_MODEL_TRP8000 RIG_MAKE_MODEL(RIG_SKANTI, 2)
#define RIG_MODEL_TRP9000 RIG_MAKE_MODEL(RIG_SKANTI, 3)
#define RIG_MODEL_TRP8255 RIG_MAKE_MODEL(RIG_SKANTI, 4)
/*
* WiNRADiO/LinRADiO
*/
#define RIG_WINRADIO 15
#define RIG_BACKEND_WINRADIO "winradio"
#define RIG_MODEL_WR1000 RIG_MAKE_MODEL(RIG_WINRADIO, 1)
#define RIG_MODEL_WR1500 RIG_MAKE_MODEL(RIG_WINRADIO, 2)
#define RIG_MODEL_WR1550 RIG_MAKE_MODEL(RIG_WINRADIO, 3)
#define RIG_MODEL_WR3100 RIG_MAKE_MODEL(RIG_WINRADIO, 4)
#define RIG_MODEL_WR3150 RIG_MAKE_MODEL(RIG_WINRADIO, 5)
#define RIG_MODEL_WR3500 RIG_MAKE_MODEL(RIG_WINRADIO, 6)
#define RIG_MODEL_WR3700 RIG_MAKE_MODEL(RIG_WINRADIO, 7)
#define RIG_MODEL_G303 RIG_MAKE_MODEL(RIG_WINRADIO, 8)
#define RIG_MODEL_G313 RIG_MAKE_MODEL(RIG_WINRADIO, 9)
#define RIG_MODEL_G305 RIG_MAKE_MODEL(RIG_WINRADIO, 10)
#define RIG_MODEL_G315 RIG_MAKE_MODEL(RIG_WINRADIO, 11)
/*
* Ten Tec
*/
#define RIG_TENTEC 16
#define RIG_BACKEND_TENTEC "tentec"
#define RIG_MODEL_TT550 RIG_MAKE_MODEL(RIG_TENTEC, 1) /* Pegasus */
#define RIG_MODEL_TT538 RIG_MAKE_MODEL(RIG_TENTEC, 2) /* Jupiter */
#define RIG_MODEL_RX320 RIG_MAKE_MODEL(RIG_TENTEC, 3)
#define RIG_MODEL_RX340 RIG_MAKE_MODEL(RIG_TENTEC, 4)
#define RIG_MODEL_RX350 RIG_MAKE_MODEL(RIG_TENTEC, 5)
#define RIG_MODEL_TT526 RIG_MAKE_MODEL(RIG_TENTEC, 6) /* 6N2 */
#define RIG_MODEL_TT516 RIG_MAKE_MODEL(RIG_TENTEC, 7) /* Argonaut V */
#define RIG_MODEL_TT565 RIG_MAKE_MODEL(RIG_TENTEC, 8) /* Orion */
#define RIG_MODEL_TT585 RIG_MAKE_MODEL(RIG_TENTEC, 9) /* Paragon */
#define RIG_MODEL_TT588 RIG_MAKE_MODEL(RIG_TENTEC, 11) /* Omni-VII */
#define RIG_MODEL_RX331 RIG_MAKE_MODEL(RIG_TENTEC, 12)
#define RIG_MODEL_TT599 RIG_MAKE_MODEL(RIG_TENTEC, 13) /* Eagle */
/*
* Alinco
*/
#define RIG_ALINCO 17
#define RIG_BACKEND_ALINCO "alinco"
#define RIG_MODEL_DX77 RIG_MAKE_MODEL(RIG_ALINCO, 1)
#define RIG_MODEL_DXSR8 RIG_MAKE_MODEL(RIG_ALINCO, 2)
/*
* Kachina
*/
#define RIG_KACHINA 18
#define RIG_BACKEND_KACHINA "kachina"
#define RIG_MODEL_505DSP RIG_MAKE_MODEL(RIG_KACHINA, 1)
/*
* Gnuradio backend
*/
#define RIG_GNURADIO 20
#define RIG_BACKEND_GNURADIO "gnuradio"
#define RIG_MODEL_GNURADIO RIG_MAKE_MODEL(RIG_GNURADIO, 1) /* dev model, Chirp source */
#define RIG_MODEL_MC4020 RIG_MAKE_MODEL(RIG_GNURADIO, 2) /* MC4020 */
#define RIG_MODEL_GRAUDIO RIG_MAKE_MODEL(RIG_GNURADIO, 3) /* Sound card source */
#define RIG_MODEL_GRAUDIOIQ RIG_MAKE_MODEL(RIG_GNURADIO, 4) /* I&Q stereo sound card source */
#define RIG_MODEL_USRP_G RIG_MAKE_MODEL(RIG_GNURADIO, 5) /* Universal Software Radio Peripheral */
/*
* Microtune tuners
*/
#define RIG_MICROTUNE 21
#define RIG_BACKEND_MICROTUNE "microtune"
#define RIG_MODEL_MICROTUNE_4937 RIG_MAKE_MODEL(RIG_MICROTUNE, 1) /* eval board */
#define RIG_MODEL_MICROTUNE_4702 RIG_MAKE_MODEL(RIG_MICROTUNE, 2) /* Alan's */
#define RIG_MODEL_MICROTUNE_4707 RIG_MAKE_MODEL(RIG_MICROTUNE, 3)
/*
* TAPR
*/
#define RIG_TAPR 22
#define RIG_BACKEND_TAPR "tapr"
#define RIG_MODEL_DSP10 RIG_MAKE_MODEL(RIG_TAPR, 1)
/*
* Flex-radio
*/
#define RIG_FLEXRADIO 23
#define RIG_BACKEND_FLEXRADIO "flexradio"
#define RIG_MODEL_SDR1000 RIG_MAKE_MODEL(RIG_FLEXRADIO, 1)
#define RIG_MODEL_SDR1000RFE RIG_MAKE_MODEL(RIG_FLEXRADIO, 2)
#define RIG_MODEL_DTTSP RIG_MAKE_MODEL(RIG_FLEXRADIO, 3)
#define RIG_MODEL_DTTSP_UDP RIG_MAKE_MODEL(RIG_FLEXRADIO, 4)
/*
* VEB Funkwerk Köpenick RFT
*/
#define RIG_RFT 24
#define RIG_BACKEND_RFT "rft"
#define RIG_MODEL_EKD500 RIG_MAKE_MODEL(RIG_RFT, 1)
/*
* Various kits
*/
#define RIG_KIT 25
#define RIG_BACKEND_KIT "kit"
#define RIG_MODEL_ELEKTOR304 RIG_MAKE_MODEL(RIG_KIT, 1)
#define RIG_MODEL_DRT1 RIG_MAKE_MODEL(RIG_KIT, 2)
#define RIG_MODEL_DWT RIG_MAKE_MODEL(RIG_KIT, 3)
#define RIG_MODEL_USRP0 RIG_MAKE_MODEL(RIG_KIT, 4) /* prototype */
#define RIG_MODEL_USRP RIG_MAKE_MODEL(RIG_KIT, 5)
#define RIG_MODEL_DDS60 RIG_MAKE_MODEL(RIG_KIT, 6)
#define RIG_MODEL_ELEKTOR507 RIG_MAKE_MODEL(RIG_KIT, 7) /* Elektor SDR USB */
#define RIG_MODEL_MINIVNA RIG_MAKE_MODEL(RIG_KIT, 8)
#define RIG_MODEL_SI570AVRUSB RIG_MAKE_MODEL(RIG_KIT, 9) /* SoftRock Si570 AVR */
#define RIG_MODEL_PMSDR RIG_MAKE_MODEL(RIG_KIT, 10)
#define RIG_MODEL_SI570PICUSB RIG_MAKE_MODEL(RIG_KIT, 11) /* SoftRock Si570 PIC */
#define RIG_MODEL_FIFISDR RIG_MAKE_MODEL(RIG_KIT, 12) /* FiFi-SDR USB */
#define RIG_MODEL_FUNCUBEDONGLE RIG_MAKE_MODEL(RIG_KIT, 13) /* FunCUBE Dongle */
#define RIG_MODEL_HIQSDR RIG_MAKE_MODEL(RIG_KIT, 14) /* HiQSDR */
#define RIG_MODEL_FASDR RIG_MAKE_MODEL(RIG_KIT,15) /* Funkamateur Sdr */
#define RIG_MODEL_SI570PEABERRY1 RIG_MAKE_MODEL(RIG_KIT, 16) /* Peaberry V1 */
#define RIG_MODEL_SI570PEABERRY2 RIG_MAKE_MODEL(RIG_KIT, 17) /* Peaberry V2 */
#define RIG_MODEL_FUNCUBEDONGLEPLUS RIG_MAKE_MODEL(RIG_KIT, 18) /* FunCUBE Dongle Pro+ */
#define RIG_MODEL_RSHFIQ RIG_MAKE_MODEL(RIG_KIT, 19) /* RS-HFIQ */
/*
* SW/FM/TV tuner cards supported by Video4Linux,*BSD, ..
*/
#define RIG_TUNER 26
#define RIG_BACKEND_TUNER "tuner"
#define RIG_MODEL_V4L RIG_MAKE_MODEL(RIG_TUNER, 1)
#define RIG_MODEL_V4L2 RIG_MAKE_MODEL(RIG_TUNER, 2)
/*
* Rohde & Schwarz--rs
*/
#define RIG_RS 27
#define RIG_BACKEND_RS "rs"
#define RIG_MODEL_ESMC RIG_MAKE_MODEL(RIG_RS, 1)
#define RIG_MODEL_EB200 RIG_MAKE_MODEL(RIG_RS, 2)
#define RIG_MODEL_XK2100 RIG_MAKE_MODEL(RIG_RS, 3)
/*
* Phillips/Simoco PRM80
*/
#define RIG_PRM80 28
#define RIG_BACKEND_PRM80 "prm80"
#define RIG_MODEL_PRM8060 RIG_MAKE_MODEL(RIG_PRM80, 1)
#define RIG_MODEL_PRM8070 RIG_MAKE_MODEL(RIG_PRM80, 2)
/*
* ADAT by HB9CBU
*
* ADDED: frgo (DG1SBG), 2012-01-01
*/
#define RIG_ADAT 29
#define RIG_BACKEND_ADAT "adat"
#define RIG_MODEL_ADT_200A RIG_MAKE_MODEL(RIG_ADAT, 1)
/*
* ICOM Marine
*/
#define RIG_ICMARINE 30
#define RIG_BACKEND_ICMARINE "icmarine"
#define RIG_MODEL_IC_M700PRO RIG_MAKE_MODEL(RIG_ICMARINE, 1)
#define RIG_MODEL_IC_M802 RIG_MAKE_MODEL(RIG_ICMARINE, 2)
#define RIG_MODEL_IC_M710 RIG_MAKE_MODEL(RIG_ICMARINE, 3)
#define RIG_MODEL_IC_M803 RIG_MAKE_MODEL(RIG_ICMARINE, 4)
/*
* Dorji transceiver modules
*/
#define RIG_DORJI 31
#define RIG_BACKEND_DORJI "dorji"
#define RIG_MODEL_DORJI_DRA818V RIG_MAKE_MODEL(RIG_DORJI, 1)
#define RIG_MODEL_DORJI_DRA818U RIG_MAKE_MODEL(RIG_DORJI, 2)
/*
* Barrett
*/
#define RIG_BARRETT 32
#define RIG_BACKEND_BARRETT "barrett"
#define RIG_MODEL_BARRETT_2050 RIG_MAKE_MODEL(RIG_BARRETT, 1)
#define RIG_MODEL_BARRETT_950 RIG_MAKE_MODEL(RIG_BARRETT, 2)
/*
* Elad
*/
#define RIG_ELAD 33
#define RIG_BACKEND_ELAD "elad"
#define RIG_MODEL_ELAD_FDM_DUO RIG_MAKE_MODEL(RIG_ELAD, 1)
//! @endcond
/*
* TODO:
RIG_MODEL_KWZ30, KNEISNER +DOERING
RIG_MODEL_E1800, DASA-Telefunken
etc.
*/
/*! \typedef typedef int rig_model_t
\brief Convenience type definition for rig model.
*/
typedef uint32_t rig_model_t;
/*
* struct rig_backend_list {
* rig_model_t model;
* const char *backend;
* } rig_backend_list[] = RIG_LIST;
*
* TODO:
*
{ RIG_RADIOSHACK, RIG_BACKEND_RADIOSHACK }, \
*/
#endif /* _RIGLIST_H */

805
hamlib/rotator.h 100644
Wyświetl plik

@ -0,0 +1,805 @@
/*
* Hamlib Interface - Rotator API header
* Copyright (c) 2000-2005 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
*
*/
#ifndef _ROTATOR_H
#define _ROTATOR_H 1
#include <hamlib/rig.h>
#include <hamlib/rotlist.h>
/**
* \addtogroup rotator
* @{
*/
/**
* \file rotator.h
* \brief Hamlib rotator data structures.
*
* This file contains the data structures and declarations for the Hamlib
* rotator Application Programming Interface (API).
*
* See the rotator.c file for more details on the rotator API functions.
*/
__BEGIN_DECLS
/* Forward struct references */
struct rot;
struct rot_state;
/**
* \typedef typedef struct s_rot ROT
* \brief Main rotator handle type definition.
*
* The #ROT handle is returned by rot_init() and is passed as a parameter to
* every rotator specific API call.
*
* rot_cleanup() must be called when this handle is no longer needed.
*/
typedef struct s_rot ROT;
/**
* \typedef typedef float elevation_t
* \brief Type definition for elevation.
*
* The \a elevation_t type is used as parameter for the rot_set_position() and
* rot_get_position() functions.
*
* Unless specified otherwise, the unit of \a elevation_t is decimal degrees.
*/
typedef float elevation_t;
/**
* \typedef typedef float azimuth_t
* \brief Type definition for azimuth.
*
* The \a azimuth_t type is used as parameter for the rot_set_position() and
* rot_get_position() functions.
*
* Unless specified otherwise, the unit of \a azimuth_t is decimal degrees.
*/
typedef float azimuth_t;
/**
* \brief The token in the netrotctl protocol for returning an error condition code.
*/
#define NETROTCTL_RET "RPRT "
/**
* \def ROT_RESET_ALL
* \brief A macro that returns the flag for the \b reset operation.
*
* \sa rot_reset(), rot_reset_t
*/
#define ROT_RESET_ALL 1
/**
* \typedef typedef int rot_reset_t
* \brief Type definition for rotator reset.
*
* The \a rot_reset_t type is used as parameter for the rot_reset() API
* function.
*/
typedef int rot_reset_t;
/**
* \brief Rotator type flags for bitmasks.
*/
typedef enum {
ROT_FLAG_AZIMUTH = (1 << 1), /*!< Azimuth */
ROT_FLAG_ELEVATION = (1 << 2) /*!< Elevation */
} rot_type_t;
//! @cond Doxygen_Suppress
/* So far only used in ests/dumpcaps_rot.c. */
#define ROT_TYPE_MASK (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION)
//! @endcond
/**
* \def ROT_TYPE_OTHER
* \brief Other type of rotator.
* \def ROT_TYPE_AZIMUTH
* \brief Azimuth only rotator.
* \def ROT_TYPE_ELEVATION
* \brief Elevation only rotator.
* \def ROT_TYPE_AZEL
* \brief Combination azimuth/elevation rotator.
*/
#define ROT_TYPE_OTHER 0
#define ROT_TYPE_AZIMUTH ROT_FLAG_AZIMUTH
#define ROT_TYPE_ELEVATION ROT_FLAG_ELEVATION
#define ROT_TYPE_AZEL (ROT_FLAG_AZIMUTH|ROT_FLAG_ELEVATION)
/**
* \def ROT_MOVE_UP
* \brief A macro that returns the flag for the \b UP direction.
*
* This macro defines the value of the \b UP direction which can be
* used with the rot_move() function.
*
* \sa rot_move(), ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW,
* ROT_MOVE_RIGHT, ROT_MOVE_CW
*/
#define ROT_MOVE_UP (1<<1)
/**
* \def ROT_MOVE_DOWN
* \brief A macro that returns the flag for the \b DOWN direction.
*
* This macro defines the value of the \b DOWN direction which can be
* used with the rot_move() function.
*
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_LEFT, ROT_MOVE_CCW, ROT_MOVE_RIGHT,
* ROT_MOVE_CW
*/
#define ROT_MOVE_DOWN (1<<2)
/**
* \def ROT_MOVE_LEFT
* \brief A macro that returns the flag for the \b LEFT direction.
*
* This macro defines the value of the \b LEFT direction which can be
* used with the rot_move function.
*
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_CCW, ROT_MOVE_RIGHT,
* ROT_MOVE_CW
*/
#define ROT_MOVE_LEFT (1<<3)
/**
* \def ROT_MOVE_CCW
* \brief A macro that returns the flag for the \b counterclockwise direction.
*
* This macro defines the value of the \b counterclockwise direction which
* can be used with the rot_move() function. This value is equivalent to
* ROT_MOVE_LEFT.
*
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_RIGHT,
* ROT_MOVE_CW
*/
#define ROT_MOVE_CCW ROT_MOVE_LEFT
/**
* \def ROT_MOVE_RIGHT
* \brief A macro that returns the flag for the \b RIGHT direction.
*
* This macro defines the value of the \b RIGHT direction which can be used
* with the rot_move() function.
*
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW,
* ROT_MOVE_CW
*/
#define ROT_MOVE_RIGHT (1<<4)
/**
* \def ROT_MOVE_CW
* \brief A macro that returns the flag for the \b clockwise direction.
*
* This macro defines the value of the \b clockwise direction which can be
* used with the rot_move() function. This value is equivalent to
* ROT_MOVE_RIGHT.
*
* \sa rot_move(), ROT_MOVE_UP, ROT_MOVE_DOWN, ROT_MOVE_LEFT, ROT_MOVE_CCW,
* ROT_MOVE_RIGHT
*/
#define ROT_MOVE_CW ROT_MOVE_RIGHT
/**
* \brief Rotator status flags
*/
typedef enum {
ROT_STATUS_NONE = 0, /*!< '' -- No status. */
ROT_STATUS_BUSY = (1 << 0), /*!< Rotator is busy, not accepting commands. */
ROT_STATUS_MOVING = (1 << 1), /*!< Rotator is currently moving (direction type not specified). */
ROT_STATUS_MOVING_AZ = (1 << 2), /*!< Azimuth rotator is currently moving (direction not specified). */
ROT_STATUS_MOVING_LEFT = (1 << 3), /*!< Azimuth rotator is currently moving left. */
ROT_STATUS_MOVING_RIGHT = (1 << 4), /*!< Azimuth rotator is currently moving right. */
ROT_STATUS_MOVING_EL = (1 << 5), /*!< Elevation rotator is currently moving (direction not specified). */
ROT_STATUS_MOVING_UP = (1 << 6), /*!< Elevation rotator is currently moving up. */
ROT_STATUS_MOVING_DOWN = (1 << 7), /*!< Elevation rotator is currently moving down. */
ROT_STATUS_LIMIT_UP = (1 << 8), /*!< The elevation rotator has reached its limit to move up. */
ROT_STATUS_LIMIT_DOWN = (1 << 9), /*!< The elevation rotator has reached its limit to move down.*/
ROT_STATUS_LIMIT_LEFT = (1 << 10), /*!< The azimuth rotator has reached its limit to move left (CCW). */
ROT_STATUS_LIMIT_RIGHT = (1 << 11), /*!< The azimuth rotator has reached its limit to move right (CW). */
ROT_STATUS_OVERLAP_UP = (1 << 12), /*!< The elevation rotator has rotated up past 360 degrees. */
ROT_STATUS_OVERLAP_DOWN = (1 << 13), /*!< The elevation rotator has rotated down past 0 degrees. */
ROT_STATUS_OVERLAP_LEFT = (1 << 14), /*!< The azimuth rotator has rotated left (CCW) past 0 degrees. */
ROT_STATUS_OVERLAP_RIGHT = (1 << 16), /*!< The azimuth rotator has rotated right (CW) past 360 degrees. */
} rot_status_t;
//! @cond Doxygen_Suppress
/* So far only used in tests/sprintflst.c. */
#define ROT_STATUS_N(n) (1u<<(n))
//! @endcond
/**
* \brief Macro for not changing the rotator speed with move() function.
*/
#define ROT_SPEED_NOCHANGE (-1)
/**
* \brief Rotator Level Settings.
*
* Various operating levels supported by a rotator.
*
* \c STRING used in the \c rotctl and \c rotctld utilities.
*
* \sa rot_parse_level(), rot_strlevel()
*/
enum rot_level_e {
ROT_LEVEL_NONE = 0, /*!< '' -- No Level. */
ROT_LEVEL_SPEED = (1 << 0), /*!< \c SPEED -- Rotation speed, arg int (default range 1-100 if not specified). */
ROT_LEVEL_63 = CONSTANT_64BIT_FLAG(63), /*!< **Future use**, last level. */
};
//! @cond Doxygen_Suppress
#define ROT_LEVEL_FLOAT_LIST (0)
#define ROT_LEVEL_READONLY_LIST (0)
#define ROT_LEVEL_IS_FLOAT(l) ((l)&ROT_LEVEL_FLOAT_LIST)
#define ROT_LEVEL_SET(l) ((l)&~ROT_LEVEL_READONLY_LIST)
//! @endcond
/** @cond Doxygen_Suppress
* FIXME: The following needs more explanation about how STRING relates
* to this macro.
* @endcond
*/
/**
* \brief Rotator Parameters
*
* Parameters are settings that are not related to core rotator functionality,
* i.e. antenna rotation.
*
* \c STRING used in the \c rotctl and \c rotctld utilities.
*
* \sa rot_parse_parm(), rot_strparm()
*/
enum rot_parm_e {
ROT_PARM_NONE = 0, /*!< '' -- No Parm */
};
//! @cond Doxygen_Suppress
#define ROT_PARM_FLOAT_LIST (0)
#define ROT_PARM_READONLY_LIST (0)
#define ROT_PARM_IS_FLOAT(l) ((l)&ROT_PARM_FLOAT_LIST)
#define ROT_PARM_SET(l) ((l)&~ROT_PARM_READONLY_LIST)
//! @endcond
/** @cond Doxygen_Suppress
* FIXME: The following needs more explanation about how STRING relates
* to these macros.
* @endcond
*/
/**
* \brief Rotator Function Settings.
*
* Various operating functions supported by a rotator.
*
* \c STRING used in the \c rotctl and \c rotctld utilities.
*
* \sa rot_parse_func(), rot_strfunc()
*/
#define ROT_FUNC_NONE 0 /*!< '' -- No Function */
#ifndef SWIGLUAHIDE
/* Hide the top 32 bits from the old Lua binding as they can't be represented */
#define ROT_FUNC_BIT63 CONSTANT_64BIT_FLAG (63) /*!< **Future use**, ROT_FUNC items. */
/* 63 is this highest bit number that can be used */
#endif
/* Basic rot type, can store some useful info about different rotators. Each
* lib must be able to populate this structure, so we can make useful
* enquiries about capabilities.
*/
/**
* \struct rot_caps
* \brief Rotator capability data structure.
*
* The main idea of this structure is that it will be defined by the backend
* rotator driver, and will remain read-only for the application. Fields that
* need to be modifiable by the application are copied into the rot_state
* structure, which is the private memory area of the #ROT instance.
*
* This way, you can have several rotators running within the same
* application, sharing the rot_caps structure of the backend, while keeping
* their own customized data.
*
* \b Note: Don't move fields around and only add new fields at the end of the
* rot_caps structure. Shared libraries and DLLs depend on a constant
* structure to maintain compatibility.
*/
struct rot_caps {
rot_model_t rot_model; /*!< Rotator model as defined in rotlist.h. */
const char *model_name; /*!< Model name, e.g. TT-360. */
const char *mfg_name; /*!< Manufacturer, e.g. Tower Torquer. */
const char *version; /*!< Driver version, typically in YYYYMMDD.x format. */
const char *copyright; /*!< Copyright info (should be LGPL). */
enum rig_status_e status; /*!< Driver status. */
int rot_type; /*!< Rotator type. */
enum rig_port_e port_type; /*!< Type of communication port (serial, ethernet, etc.). */
int serial_rate_min; /*!< Minimal serial speed. */
int serial_rate_max; /*!< Maximal serial speed. */
int serial_data_bits; /*!< Number of data bits. */
int serial_stop_bits; /*!< Number of stop bits. */
enum serial_parity_e serial_parity; /*!< Parity. */
enum serial_handshake_e serial_handshake; /*!< Handshake. */
int write_delay; /*!< Write delay. */
int post_write_delay; /*!< Post-write delay. */
int timeout; /*!< Timeout. */
int retry; /*!< Number of retries if command fails. */
setting_t has_get_func; /*!< List of get functions. */
setting_t has_set_func; /*!< List of set functions. */
setting_t has_get_level; /*!< List of get levels. */
setting_t has_set_level; /*!< List of set levels. */
setting_t has_get_parm; /*!< List of get parameters. */
setting_t has_set_parm; /*!< List of set parameters. */
rot_status_t has_status; /*!< Supported status flags. */
gran_t level_gran[RIG_SETTING_MAX]; /*!< level granularity (i.e. steps). */
gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity (i.e. steps). */
const struct confparams *extparms; /*!< Extension parameters list, \sa rot_ext.c. */
const struct confparams *extlevels; /*!< Extension levels list, \sa rot_ext.c. */
const struct confparams *extfuncs; /*!< Extension functions list, \sa rot_ext.c. */
int *ext_tokens; /*!< Extension token list. */
/*
* Movement range, az is relative to North
* negative values allowed for overlap
*/
azimuth_t min_az; /*!< Lower limit for azimuth (relative to North). */
azimuth_t max_az; /*!< Upper limit for azimuth (relative to North). */
elevation_t
min_el; /*!< Lower limit for elevation. */
elevation_t
max_el; /*!< Upper limit for elevation. */
const struct confparams *cfgparams; /*!< Configuration parameters. */
const rig_ptr_t priv; /*!< Private data. */
/*
* Rot Admin API
*
*/
int (*rot_init)(ROT *rot); /*!< Pointer to backend implementation of ::rot_init(). */
int (*rot_cleanup)(ROT *rot); /*!< Pointer to backend implementation of ::rot_cleanup(). */
int (*rot_open)(ROT *rot); /*!< Pointer to backend implementation of ::rot_open(). */
int (*rot_close)(ROT *rot); /*!< Pointer to backend implementation of ::rot_close(). */
int (*set_conf)(ROT *rot, token_t token, const char *val); /*!< Pointer to backend implementation of ::rot_set_conf(). */
int (*get_conf)(ROT *rot, token_t token, char *val); /*!< Pointer to backend implementation of ::rot_get_conf(). */
/*
* General API commands, from most primitive to least.. :()
* List Set/Get functions pairs
*/
int (*set_position)(ROT *rot, azimuth_t azimuth, elevation_t elevation); /*!< Pointer to backend implementation of ::rot_set_position(). */
int (*get_position)(ROT *rot, azimuth_t *azimuth, elevation_t *elevation); /*!< Pointer to backend implementation of ::rot_get_position(). */
int (*stop)(ROT *rot); /*!< Pointer to backend implementation of ::rot_stop(). */
int (*park)(ROT *rot); /*!< Pointer to backend implementation of ::rot_park(). */
int (*reset)(ROT *rot, rot_reset_t reset); /*!< Pointer to backend implementation of ::rot_reset(). */
int (*move)(ROT *rot, int direction, int speed); /*!< Pointer to backend implementation of ::rot_move(). */
/* get firmware info, etc. */
const char * (*get_info)(ROT *rot); /*!< Pointer to backend implementation of ::rot_get_info(). */
int (*set_level)(ROT *rot, setting_t level, value_t val); /*!< Pointer to backend implementation of ::rot_set_level(). */
int (*get_level)(ROT *rot, setting_t level, value_t *val); /*!< Pointer to backend implementation of ::rot_get_level(). */
int (*set_func)(ROT *rot, setting_t func, int status); /*!< Pointer to backend implementation of ::rot_set_func(). */
int (*get_func)(ROT *rot, setting_t func, int *status); /*!< Pointer to backend implementation of ::rot_get_func(). */
int (*set_parm)(ROT *rot, setting_t parm, value_t val); /*!< Pointer to backend implementation of ::rot_set_parm(). */
int (*get_parm)(ROT *rot, setting_t parm, value_t *val); /*!< Pointer to backend implementation of ::rot_get_parm(). */
int (*set_ext_level)(ROT *rot, token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_level(). */
int (*get_ext_level)(ROT *rot, token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_level(). */
int (*set_ext_func)(ROT *rot, token_t token, int status); /*!< Pointer to backend implementation of ::rot_set_ext_func(). */
int (*get_ext_func)(ROT *rot, token_t token, int *status); /*!< Pointer to backend implementation of ::rot_get_ext_func(). */
int (*set_ext_parm)(ROT *rot, token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_parm(). */
int (*get_ext_parm)(ROT *rot, token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_parm(). */
int (*get_status)(ROT *rot, rot_status_t *status); /*!< Pointer to backend implementation of ::rot_get_status(). */
const char *macro_name; /*!< Rotator model macro name. */
};
//! @cond Doxygen_Suppress
#define ROT_MODEL(arg) .rot_model=arg,.macro_name=#arg
//! @endcond
/**
* \struct rot_state
* \brief Rotator state structure
*
* This structure contains live data, as well as a copy of capability fields
* that may be updated, i.e. customized while the #ROT handle is instantiated.
*
* It is fine to move fields around, as this kind of structure should not be
* initialized like rot_caps are.
*/
struct rot_state {
/*
* overridable fields
*/
azimuth_t min_az; /*!< Lower limit for azimuth (overridable). */
azimuth_t max_az; /*!< Upper limit for azimuth (overridable). */
elevation_t min_el; /*!< Lower limit for elevation (overridable). */
elevation_t max_el; /*!< Upper limit for elevation (overridable). */
int south_zero; /*!< South is zero degrees. */
azimuth_t az_offset; /*!< Offset to be applied to azimuth. */
elevation_t el_offset; /*!< Offset to be applied to elevation. */
setting_t has_get_func; /*!< List of get functions. */
setting_t has_set_func; /*!< List of set functions. */
setting_t has_get_level; /*!< List of get levels. */
setting_t has_set_level; /*!< List of set levels. */
setting_t has_get_parm; /*!< List of get parameters. */
setting_t has_set_parm; /*!< List of set parameters. */
rot_status_t has_status; /*!< Supported status flags. */
gran_t level_gran[RIG_SETTING_MAX]; /*!< Level granularity. */
gran_t parm_gran[RIG_SETTING_MAX]; /*!< Parameter granularity. */
/*
* non overridable fields, internal use
*/
hamlib_port_t rotport; /*!< Rotator port (internal use). */
hamlib_port_t rotport2; /*!< 2nd Rotator port (internal use). */
int comm_state; /*!< Comm port state, i.e. opened or closed. */
rig_ptr_t priv; /*!< Pointer to private rotator state data. */
rig_ptr_t obj; /*!< Internal use by hamlib++ for event handling. */
int current_speed; /*!< Current speed 1-100, to be used when no change to speed is requested. */
/* etc... */
};
/**
* \struct s_rot
* \brief Master rotator structure.
*
* This is the master data structure acting as the #ROT handle for the
* controlled rotator. A pointer to this structure is returned by the
* rot_init() API function and is passed as a parameter to every rotator
* specific API call.
*
* \sa rot_init(), rot_caps, rot_state
*/
struct s_rot {
struct rot_caps *caps; /*!< Rotator caps. */
struct rot_state state; /*!< Rotator state. */
};
//! @cond Doxygen_Suppress
/* --------------- API function prototypes -----------------*/
extern HAMLIB_EXPORT(ROT *)
rot_init HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int)
rot_open HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_close HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_cleanup HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_set_conf HAMLIB_PARAMS((ROT *rot,
token_t token,
const char *val));
extern HAMLIB_EXPORT(int)
rot_get_conf HAMLIB_PARAMS((ROT *rot,
token_t token,
char *val));
/*
* General API commands, from most primitive to least.. )
* List Set/Get functions pairs
*/
extern HAMLIB_EXPORT(int)
rot_set_position HAMLIB_PARAMS((ROT *rot,
azimuth_t azimuth,
elevation_t elevation));
extern HAMLIB_EXPORT(int)
rot_get_position HAMLIB_PARAMS((ROT *rot,
azimuth_t *azimuth,
elevation_t *elevation));
extern HAMLIB_EXPORT(int)
rot_stop HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_park HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_reset HAMLIB_PARAMS((ROT *rot,
rot_reset_t reset));
extern HAMLIB_EXPORT(int)
rot_move HAMLIB_PARAMS((ROT *rot,
int direction,
int speed));
extern HAMLIB_EXPORT(setting_t)
rot_has_get_level HAMLIB_PARAMS((ROT *rot,
setting_t level));
extern HAMLIB_EXPORT(setting_t)
rot_has_set_level HAMLIB_PARAMS((ROT *rot,
setting_t level));
extern HAMLIB_EXPORT(setting_t)
rot_has_get_parm HAMLIB_PARAMS((ROT *rot,
setting_t parm));
extern HAMLIB_EXPORT(setting_t)
rot_has_set_parm HAMLIB_PARAMS((ROT *rot,
setting_t parm));
extern HAMLIB_EXPORT(setting_t)
rot_has_get_func HAMLIB_PARAMS((ROT *rot,
setting_t func));
extern HAMLIB_EXPORT(setting_t)
rot_has_set_func HAMLIB_PARAMS((ROT *rot,
setting_t func));
extern HAMLIB_EXPORT(int)
rot_set_func HAMLIB_PARAMS((ROT *rot,
setting_t func,
int status));
extern HAMLIB_EXPORT(int)
rot_get_func HAMLIB_PARAMS((ROT *rot,
setting_t func,
int *status));
extern HAMLIB_EXPORT(int)
rot_set_level HAMLIB_PARAMS((ROT *rig,
setting_t level,
value_t val));
extern HAMLIB_EXPORT(int)
rot_get_level HAMLIB_PARAMS((ROT *rig,
setting_t level,
value_t *val));
extern HAMLIB_EXPORT(int)
rot_set_parm HAMLIB_PARAMS((ROT *rig,
setting_t parm,
value_t val));
extern HAMLIB_EXPORT(int)
rot_get_parm HAMLIB_PARAMS((ROT *rig,
setting_t parm,
value_t *val));
extern HAMLIB_EXPORT(int)
rot_set_ext_level HAMLIB_PARAMS((ROT *rig,
token_t token,
value_t val));
extern HAMLIB_EXPORT(int)
rot_get_ext_level HAMLIB_PARAMS((ROT *rig,
token_t token,
value_t *val));
extern HAMLIB_EXPORT(int)
rot_set_ext_func HAMLIB_PARAMS((ROT *rig,
token_t token,
int status));
extern HAMLIB_EXPORT(int)
rot_get_ext_func HAMLIB_PARAMS((ROT *rig,
token_t token,
int *status));
extern HAMLIB_EXPORT(int)
rot_set_ext_parm HAMLIB_PARAMS((ROT *rig,
token_t token,
value_t val));
extern HAMLIB_EXPORT(int)
rot_get_ext_parm HAMLIB_PARAMS((ROT *rig,
token_t token,
value_t *val));
extern HAMLIB_EXPORT(const char *)
rot_get_info HAMLIB_PARAMS((ROT *rot));
extern HAMLIB_EXPORT(int)
rot_get_status HAMLIB_PARAMS((ROT *rot,
rot_status_t *status));
extern HAMLIB_EXPORT(int)
rot_register HAMLIB_PARAMS((const struct rot_caps *caps));
extern HAMLIB_EXPORT(int)
rot_unregister HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int)
rot_list_foreach HAMLIB_PARAMS((int (*cfunc)(const struct rot_caps *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rot_load_backend HAMLIB_PARAMS((const char *be_name));
extern HAMLIB_EXPORT(int)
rot_check_backend HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int)
rot_load_all_backends HAMLIB_PARAMS((void));
extern HAMLIB_EXPORT(rot_model_t)
rot_probe_all HAMLIB_PARAMS((hamlib_port_t *p));
extern HAMLIB_EXPORT(int)
rot_token_foreach HAMLIB_PARAMS((ROT *rot,
int (*cfunc)(const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(const struct confparams *)
rot_confparam_lookup HAMLIB_PARAMS((ROT *rot,
const char *name));
extern HAMLIB_EXPORT(token_t)
rot_token_lookup HAMLIB_PARAMS((ROT *rot,
const char *name));
extern HAMLIB_EXPORT(int)
rot_ext_func_foreach HAMLIB_PARAMS((ROT *rot,
int (*cfunc)(ROT *,
const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rot_ext_level_foreach HAMLIB_PARAMS((ROT *rot,
int (*cfunc)(ROT *,
const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(int)
rot_ext_parm_foreach HAMLIB_PARAMS((ROT *rot,
int (*cfunc)(ROT *,
const struct confparams *,
rig_ptr_t),
rig_ptr_t data));
extern HAMLIB_EXPORT(const struct confparams *)
rot_ext_lookup HAMLIB_PARAMS((ROT *rot,
const char *name));
extern HAMLIB_EXPORT(const struct confparams *)
rot_ext_lookup_tok HAMLIB_PARAMS((ROT *rot,
token_t token));
extern HAMLIB_EXPORT(token_t)
rot_ext_token_lookup HAMLIB_PARAMS((ROT *rot,
const char *name));
extern HAMLIB_EXPORT(const struct rot_caps *)
rot_get_caps HAMLIB_PARAMS((rot_model_t rot_model));
extern HAMLIB_EXPORT(int)
qrb HAMLIB_PARAMS((double lon1,
double lat1,
double lon2,
double lat2,
double *distance,
double *azimuth));
extern HAMLIB_EXPORT(double)
distance_long_path HAMLIB_PARAMS((double distance));
extern HAMLIB_EXPORT(double)
azimuth_long_path HAMLIB_PARAMS((double azimuth));
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(double)
dms2dec HAMLIB_PARAMS((int degrees,
int minutes,
double seconds,
int sw));
extern HAMLIB_EXPORT(int)
dec2dms HAMLIB_PARAMS((double dec,
int *degrees,
int *minutes,
double *seconds,
int *sw));
extern HAMLIB_EXPORT(int)
dec2dmmm HAMLIB_PARAMS((double dec,
int *degrees,
double *minutes,
int *sw));
extern HAMLIB_EXPORT(double)
dmmm2dec HAMLIB_PARAMS((int degrees,
double minutes,
double seconds,
int sw));
extern HAMLIB_EXPORT(setting_t) rot_parse_func(const char *s);
extern HAMLIB_EXPORT(setting_t) rot_parse_level(const char *s);
extern HAMLIB_EXPORT(setting_t) rot_parse_parm(const char *s);
extern HAMLIB_EXPORT(const char *) rot_strfunc(setting_t);
extern HAMLIB_EXPORT(const char *) rot_strlevel(setting_t);
extern HAMLIB_EXPORT(const char *) rot_strparm(setting_t);
extern HAMLIB_EXPORT(const char *) rot_strstatus(rot_status_t);
//! @endcond
/**
* \def rot_debug
* \brief Convenience macro for generating debugging messages.
*
* This is an alias of the rig_debug() function call and is used in the same
* manner.
*/
#define rot_debug rig_debug
__END_DECLS
#endif /* _ROTATOR_H */
/** @} */

637
hamlib/rotlist.h 100644
Wyświetl plik

@ -0,0 +1,637 @@
/*
* Hamlib Interface - list of known rotators
* Copyright (c) 2000-2011 by Stephane Fillod
* Copyright (c) 2000-2002 by Frank Singleton
*
*
* 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
*
*/
#ifndef _ROTLIST_H
#define _ROTLIST_H 1
//! @cond Doxygen_Suppress
#define ROT_MAKE_MODEL(a,b) ((a)*100+(b))
#define ROT_BACKEND_NUM(a) ((a)/100)
//! @endcond
/**
* \addtogroup rotator
* @{
*/
/**
* \file rotlist.h
* \brief Hamlib rotator model definitions.
*
* This file contains rotator model definitions for the Hamlib rotator
* Application Programming Interface (API). Each distinct rotator type has a
* unique model number (ID) and is used by Hamlib to identify and distinguish
* between the different hardware drivers. The exact model numbers can be
* acquired using the macros in this file. To obtain a list of supported
* rotator branches, one can use the statically defined ROT_BACKEND_LIST macro
* (defined in configure.ac). To obtain a full list of supported rotators
* (including each model in every branch), the foreach_opened_rot() API
* function can be used.
*
* The model number, or ID, is used to tell Hamlib which rotator the client
* wishes to use which is done with the rot_init() API call.
*/
/**
* \def ROT_MODEL_NONE
* \brief A macro that returns the model number for an unknown model.
*
* The none backend, as the name suggests, does nothing. It is mainly for
* internal use.
*/
#define ROT_MODEL_NONE 0
/**
* \brief A macro that returns the model number for the DUMMY backend.
*
* \def ROT_MODEL_DUMMY
*
* The DUMMY backend, as the name suggests, is a backend which performs
* no hardware operations and always behaves as one would expect. It can
* be thought of as a hardware simulator and is very useful for testing
* client applications.
*/
/**
* \brief A macro that returns the model number for the NETROTCTL backend.
*
* \def ROT_MODEL_NETROTCTL
*
* The NETROTCTL backend allows use of the `rotctld` daemon through the normal
* Hamlib API.
*/
//! @cond Doxygen_Suppress
#define ROT_DUMMY 0
#define ROT_BACKEND_DUMMY "dummy"
//! @endcond
#define ROT_MODEL_DUMMY ROT_MAKE_MODEL(ROT_DUMMY, 1)
#define ROT_MODEL_NETROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 2)
/**
* \brief A macro that returns the model number of the EASYCOMM 1 backend.
*
* \def ROT_MODEL_EASYCOMM1
*
* The EASYCOMM1 backend can be used with rotators that support the EASYCOMM
* I Standard.
*/
/**
* \brief A macro that returns the model number of the EASYCOMM 2 backend.
*
* \def ROT_MODEL_EASYCOMM2
*
* The EASYCOMM2 backend can be used with rotators that support the EASYCOMM
* II Standard.
*/
/**
* \brief A macro that returns the model number of the EASYCOMM 3 backend.
*
* \def ROT_MODEL_EASYCOMM3
*
* The EASYCOMM3 backend can be used with rotators that support the EASYCOMM
* III Standard.
*/
//! @cond Doxygen_Suppress
#define ROT_EASYCOMM 2
#define ROT_BACKEND_EASYCOMM "easycomm"
//! @endcond
#define ROT_MODEL_EASYCOMM1 ROT_MAKE_MODEL(ROT_EASYCOMM, 1)
#define ROT_MODEL_EASYCOMM2 ROT_MAKE_MODEL(ROT_EASYCOMM, 2)
#define ROT_MODEL_EASYCOMM3 ROT_MAKE_MODEL(ROT_EASYCOMM, 4)
/**
* \brief A macro that returns the model number of the FODTRACK backend.
*
* \def ROT_MODEL_FODTRACK
*
* The FODTRACK backend can be used with rotators that support the FODTRACK
* Standard.
*/
//! @cond Doxygen_Suppress
#define ROT_FODTRACK 3
#define ROT_BACKEND_FODTRACK "fodtrack"
//! @endcond
#define ROT_MODEL_FODTRACK ROT_MAKE_MODEL(ROT_FODTRACK, 1)
/**
* \brief A macro that returns the model number of the ROTOREZ backend.
*
* \def ROT_MODEL_ROTOREZ
*
* The ROTOREZ backend can be used with Hy-Gain rotators that support the
* extended DCU command set by the Idiom Press Rotor-EZ board.
*/
/**
* \brief A macro that returns the model number of the ROTORCARD backend.
*
* \def ROT_MODEL_ROTORCARD
*
* The ROTORCARD backend can be used with Yaesu rotators that support the
* extended DCU command set by the Idiom Press Rotor Card board.
*/
/**
* \brief A macro that returns the model number of the DCU backend.
*
* \def ROT_MODEL_DCU
*
* The DCU backend can be used with rotators that support the DCU command set
* by Hy-Gain (currently the DCU-1).
*/
/**
* \brief A macro that returns the model number of the ERC backend.
*
* \def ROT_MODEL_ERC
*
* The ERC backend can be used with rotators that support the DCU command set
* by DF9GR (currently the ERC).
*/
/**
* \brief A macro that returns the model number of the RT21 backend.
*
* \def ROT_MODEL_RT21
*
* The RT21 backend can be used with rotators that support the DCU command set
* by Green Heron (currently the RT-21).
*/
//! @cond Doxygen_Suppress
#define ROT_ROTOREZ 4
#define ROT_BACKEND_ROTOREZ "rotorez"
//! @endcond
#define ROT_MODEL_ROTOREZ ROT_MAKE_MODEL(ROT_ROTOREZ, 1)
#define ROT_MODEL_ROTORCARD ROT_MAKE_MODEL(ROT_ROTOREZ, 2)
#define ROT_MODEL_DCU ROT_MAKE_MODEL(ROT_ROTOREZ, 3)
#define ROT_MODEL_ERC ROT_MAKE_MODEL(ROT_ROTOREZ, 4)
#define ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5)
/**
* \brief A macro that returns the model number of the SARTEK1 backend.
*
* \def ROT_MODEL_SARTEK1
*
* The SARTEK1 backend can be used with rotators that support the SARtek
* protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_SARTEK 5
#define ROT_BACKEND_SARTEK "sartek"
//! @endcond
#define ROT_MODEL_SARTEK1 ROT_MAKE_MODEL(ROT_SARTEK, 1)
/**
* \brief A macro that returns the model number of the GS232A backend.
*
* \def ROT_MODEL_GS232A
*
* The GS232A backend can be used with rotators that support the GS-232A
* protocol.
*/
/**
* \brief A macro that returns the model number of the GS232 backend.
*
* \def ROT_MODEL_GS232_GENERIC
*
* The GS232_GENERIC backend can be used with rotators that support the
* generic (even if not coded correctly) GS-232 protocol.
*/
/**
* \brief A macro that returns the model number of the GS232B backend.
*
* \def ROT_MODEL_GS232B
*
* The GS232B backend can be used with rotators that support the GS232B
* protocol.
*/
/**
* \brief A macro that returns the model number of the F1TETRACKER backend.
*
* \def ROT_MODEL_F1TETRACKER
*
* The F1TETRACKER backend can be used with rotators that support the F1TE
* Tracker protocol.
*/
/**
* \brief A macro that returns the model number of the GS23 backend.
*
* \def ROT_MODEL_GS23
*
* The GS23 backend can be used with rotators that support the GS-23 protocol.
*/
/**
* \brief A macro that returns the model number of the GS232 backend.
*
* \def ROT_MODEL_GS232
*
* The GS232 backend can be used with rotators that support the GS-232
* protocol.
*/
/**
* \brief A macro that returns the model number of the LVB backend.
*
* \def ROT_MODEL_LVB
*
* The LVB backend can be used with rotators that support the G6LVB AMSAT LVB
* Tracker GS-232 based protocol.
*/
/**
* \brief A macro that returns the model number of the ST2 backend.
*
* \def ROT_MODEL_ST2
*
* The ST2 backend can be used with rotators that support the Fox Delta ST2
* GS-232 based protocol.
*/
/**
* \brief A macro that returns the model number of the GS232A_AZ Azimuth backend.
*
* \def ROT_MODEL_GS232A_AZ
*
* The GS232A_AZ backend can be used with azimuth rotators that support the
* GS-232A protocol.
*/
/**
* \brief A macro that returns the model number of the GS232A_EL Elevation backend.
*
* \def ROT_MODEL_GS232A_EL
*
* The GS232A_EL backend can be used with elevation rotators that support the
* GS-232A protocol.
*/
/**
* \brief A macro that returns the model number of the GS232B_AZ Azimuth backend.
*
* \def ROT_MODEL_GS232B_AZ
*
* The GS232B_AZ backend can be used with azimuth rotators that support the
* GS-232B protocol.
*/
/**
* \brief A macro that returns the model number of the GS232B_EL Elevation backend.
*
* \def ROT_MODEL_GS232B_EL
*
* The GS232B_EL backend can be used with elevation rotators that support the
* GS-232B protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_GS232A 6
#define ROT_BACKEND_GS232A "gs232a"
//! @endcond
#define ROT_MODEL_GS232A ROT_MAKE_MODEL(ROT_GS232A, 1)
#define ROT_MODEL_GS232_GENERIC ROT_MAKE_MODEL(ROT_GS232A, 2) /* GENERIC */
#define ROT_MODEL_GS232B ROT_MAKE_MODEL(ROT_GS232A, 3)
#define ROT_MODEL_F1TETRACKER ROT_MAKE_MODEL(ROT_GS232A, 4)
#define ROT_MODEL_GS23 ROT_MAKE_MODEL(ROT_GS232A, 5)
#define ROT_MODEL_GS232 ROT_MAKE_MODEL(ROT_GS232A, 6) /* Not A or B */
#define ROT_MODEL_LVB ROT_MAKE_MODEL(ROT_GS232A, 7)
#define ROT_MODEL_ST2 ROT_MAKE_MODEL(ROT_GS232A, 8)
#define ROT_MODEL_GS232A_AZ ROT_MAKE_MODEL(ROT_GS232A, 9)
#define ROT_MODEL_GS232A_EL ROT_MAKE_MODEL(ROT_GS232A, 10)
#define ROT_MODEL_GS232B_AZ ROT_MAKE_MODEL(ROT_GS232A, 11)
#define ROT_MODEL_GS232B_EL ROT_MAKE_MODEL(ROT_GS232A, 12)
/**
* \brief A macro that returns the model number of the PCROTOR backend.
*
* \def ROT_MODEL_PCROTOR
*
* The PCROTOR backend is a member of the kit backend group that can be used
* with home brewed rotators.
*/
//! @cond Doxygen_Suppress
#define ROT_KIT 7
#define ROT_BACKEND_KIT "kit"
//! @endcond
#define ROT_MODEL_PCROTOR ROT_MAKE_MODEL(ROT_KIT, 1)
/**
* \brief A macro that returns the model number of the HD1780 backend.
*
* \def ROT_MODEL_HD1780
*
* The HD1780 backend can be used with rotators that support the Heathkit
* HD-1780 protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_HEATHKIT 8
#define ROT_BACKEND_HEATHKIT "heathkit"
//! @endcond
#define ROT_MODEL_HD1780 ROT_MAKE_MODEL(ROT_HEATHKIT, 1)
/**
* \brief A macro that returns the model number of the ROT2PROG backend.
*
* \def ROT_MODEL_SPID_ROT2PROG
*
* The SPID_ROT2PROG backend can be used with rotators that support the SPID
* azimuth and elevation protocol.
*/
/**
* \brief A macro that returns the model number of the ROT1PROG backend.
*
* \def ROT_MODEL_SPID_ROT1PROG
*
* The SPID_ROT1PROG backend can be used with rotators that support the SPID
* azimuth protocol.
*/
/**
* \brief A macro that returns the model number of the SPID_MD01_ROT2PROG backend.
*
* \def ROT_MODEL_SPID_MD01_ROT2PROG
*
* The SPID_MD01_ROT2PROG backend can be used with rotators that support the
* extended SPID ROT2PROG azimuth and elevation protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_SPID 9
#define ROT_BACKEND_SPID "spid"
//! @endcond
#define ROT_MODEL_SPID_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 1)
#define ROT_MODEL_SPID_ROT1PROG ROT_MAKE_MODEL(ROT_SPID, 2)
#define ROT_MODEL_SPID_MD01_ROT2PROG ROT_MAKE_MODEL(ROT_SPID, 3)
/**
* \brief A macro that returns the model number of the RC2800 backend.
*
* \def ROT_MODEL_RC2800
*
* The RC2800 backend can be used with rotators that support the M2 (M
* Squared) RC2800 protocol.
*/
/**
* \brief A macro that returns the model number of the RC2800_EARLY_AZ
* backend.
*
* \def ROT_MODEL_RC2800_EARLY_AZ
*
* The RC2800_EARLY_AZ backend can be used with rotators that support the M2
* (M Squared) RC2800 early azimuth protocol.
*/
/**
* \brief A macro that returns the model number of the RC2800_EARLY_AZEL
* backend.
*
* \def ROT_MODEL_RC2800_EARLY_AZEL
*
* The RC2800_EARLY_AZEL backend can be used with rotators that support the M2
* (M Squared) RC2800 early azimuth and elevation protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_M2 10
#define ROT_BACKEND_M2 "m2"
//! @endcond
#define ROT_MODEL_RC2800 ROT_MAKE_MODEL(ROT_M2, 1)
#define ROT_MODEL_RC2800_EARLY_AZ ROT_MAKE_MODEL(ROT_M2, 2)
#define ROT_MODEL_RC2800_EARLY_AZEL ROT_MAKE_MODEL(ROT_M2, 3)
/**
* \brief A macro that returns the model number of the RCI_AZEL backend.
*
* \def ROT_MODEL_RCI_AZEL
*
* The RCI_AZEL backend can be used with rotators that support the ARS azimuth
* and elevation protocol.
*/
/**
* \brief A macro that returns the model number of the RCI_AZ backend.
*
* \def ROT_MODEL_RCI_AZ
*
* The RCI_AZ backend can be used with rotators that support the ARS azimuth
* protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_ARS 11
#define ROT_BACKEND_ARS "ars"
//! @endcond
#define ROT_MODEL_RCI_AZEL ROT_MAKE_MODEL(ROT_ARS, 1)
#define ROT_MODEL_RCI_AZ ROT_MAKE_MODEL(ROT_ARS, 2)
/**
* \brief A macro that returns the model number of the IF100 backend.
*
* \def ROT_MODEL_IF100
*
* The IF100 backend can be used with rotators that support the AMSAT IF-100
* interface.
*/
//! @cond Doxygen_Suppress
#define ROT_AMSAT 12
#define ROT_BACKEND_AMSAT "amsat"
//! @endcond
#define ROT_MODEL_IF100 ROT_MAKE_MODEL(ROT_AMSAT, 1)
/**
* \brief A macro that returns the model number of the TS7400 backend.
*
* \def ROT_MODEL_TS7400
*
* The TS7400 backend supports an embedded ARM board using the TS-7400 Linux
* board. More information is at https://www.embeddedarm.com
*/
//! @cond Doxygen_Suppress
#define ROT_TS7400 13
#define ROT_BACKEND_TS7400 "ts7400"
//! @endcond
#define ROT_MODEL_TS7400 ROT_MAKE_MODEL(ROT_TS7400, 1)
/**
* \brief A macro that returns the model number of the NEXSTAR backend.
*
* \def ROT_MODEL_NEXSTAR
*
* The NEXSTAR backend can be used with rotators that support the Celestron
* NexStar protocol and alike.
*/
//! @cond Doxygen_Suppress
#define ROT_CELESTRON 14
#define ROT_BACKEND_CELESTRON "celestron"
//! @endcond
#define ROT_MODEL_NEXSTAR ROT_MAKE_MODEL(ROT_CELESTRON, 1)
/**
* \brief A macro that returns the model number of the ETHER6 backend.
*
* \def ROT_MODEL_ETHER6
*
* The ETHER6 backend can be used with rotators that support the Ether6
* protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_ETHER6 15
#define ROT_BACKEND_ETHER6 "ether6"
//! @endcond
#define ROT_MODEL_ETHER6 ROT_MAKE_MODEL(ROT_ETHER6, 1)
/**
* \brief A macro that returns the model number of the CNCTRK backend.
*
* \def ROT_MODEL_CNCTRK
*
* The CNCTRK backend can be used with rotators that support the LinuxCNC
* running Axis GUI interface.
*/
//! @cond Doxygen_Suppress
#define ROT_CNCTRK 16
#define ROT_BACKEND_CNCTRK "cnctrk"
//! @endcond
#define ROT_MODEL_CNCTRK ROT_MAKE_MODEL(ROT_CNCTRK, 1)
/**
* \brief A macro that returns the model number of the PROSISTEL_D_AZ backend.
*
* \def ROT_MODEL_PROSISTEL_D_AZ
*
* The PROSISTEL_D_AZ backend can be used with rotators that support the Prosistel
* azimuth protocol.
*/
/**
* \brief A macro that returns the model number of the PROSISTEL_D_EL backend.
*
* \def ROT_MODEL_PROSISTEL_D_EL
*
* The PROSISTEL_D_EL backend can be used with rotators that support the Prosistel
* elevation protocol.
*/
/**
* \brief A macro that returns the model number of the
* PROSISTEL_COMBI_TRACK_AZEL backend.
*
* \def ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL
*
* The PROSISTEL_AZEL_COMBI_TRACK_AZEL backend can be used with rotators that
* support the Prosistel combination azimuth and elevation protocol.
*/
//! @cond Doxygen_Suppress
#define ROT_PROSISTEL 17
#define ROT_BACKEND_PROSISTEL "prosistel"
//! @endcond
#define ROT_MODEL_PROSISTEL_D_AZ ROT_MAKE_MODEL(ROT_PROSISTEL, 1)
#define ROT_MODEL_PROSISTEL_D_EL ROT_MAKE_MODEL(ROT_PROSISTEL, 2)
#define ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL ROT_MAKE_MODEL(ROT_PROSISTEL, 3)
/**
* \brief A macro that returns the model number of the MEADE backend.
*
* \def ROT_MODEL_MEADE
*
* The MEADE backend can be used with Meade telescope rotators like the
* DS-2000.
*/
//! @cond Doxygen_Suppress
#define ROT_MEADE 18
#define ROT_BACKEND_MEADE "meade"
//! @endcond
#define ROT_MODEL_MEADE ROT_MAKE_MODEL(ROT_MEADE, 1)
/**
* \brief A macro that returns the model number of the IOPTRON backend.
*
* \def ROT_MODEL_IOPTRON
*
* The IOPTRON backend can be used with IOPTRON telescope mounts.
*/
//! @cond Doxygen_Suppress
#define ROT_IOPTRON 19
#define ROT_BACKEND_IOPTRON "ioptron"
//! @endcond
#define ROT_MODEL_IOPTRON ROT_MAKE_MODEL(ROT_IOPTRON, 1)
/**
* \brief A macro that returns the model number of the INDI backend.
*
* \def ROT_MODEL_INDI
*
* The INDI backend can be used with rotators that support the INDI interface.
*/
//! @cond Doxygen_Suppress
#define ROT_INDI 20
#define ROT_BACKEND_INDI "indi"
//! @endcond
#define ROT_MODEL_INDI ROT_MAKE_MODEL(ROT_INDI, 1)
/**
* \brief A macro that returns the model number of the SATEL backend.
*
* \def ROT_MODEL_SATEL
*
* The SATEL backend can be used with rotators that support the VE5FP
* interface.
*/
//! @cond Doxygen_Suppress
#define ROT_SATEL 21
#define ROT_BACKEND_SATEL "satel"
//! @endcond
#define ROT_MODEL_SATEL ROT_MAKE_MODEL(ROT_SATEL, 1)
/**
* \brief A macro that returns the model number of the RADANT backend.
*
* \def ROT_MODEL_RADANT
*
* The RADANT backend can be used with rotators that support the MS232
* interface.
*/
//! @cond Doxygen_Suppress
#define ROT_RADANT 22
#define ROT_BACKEND_RADANT "radant"
//! @endcond
#define ROT_MODEL_RADANT ROT_MAKE_MODEL(ROT_RADANT, 1)
#define ROT_ANDROIDSENSOR 23
#define ROT_BACKEND_ANDROIDSENSOR "androidsensor"
#define ROT_MODEL_ANDROIDSENSOR ROT_MAKE_MODEL(ROT_ANDROIDSENSOR, 1)
/**
* \brief Convenience type definition for a rotator model.
*
* \typedef typedef int rot_model_t
*/
typedef int rot_model_t;
#endif /* _ROTLIST_H */
/** @} */