From 15c5b4d7719ae9dcc6887a8aa788213c8ac97846 Mon Sep 17 00:00:00 2001 From: Nate Bargmann Date: Thu, 24 Jul 2025 14:01:06 -0500 Subject: [PATCH 01/14] Update Doxygen comments in rig_state.h Update Doxygen comments in amp_state.h and rot_state.h for HAMLIB_AMPSTATE and HAMLIB_ROTSTATE macros. --- include/hamlib/amp_state.h | 14 ++++- include/hamlib/rig.h | 12 ++-- include/hamlib/rig_state.h | 109 ++++++++++++++++++++++++------------- include/hamlib/rot_state.h | 14 ++++- 4 files changed, 104 insertions(+), 45 deletions(-) diff --git a/include/hamlib/amp_state.h b/include/hamlib/amp_state.h index d138ad141..55c080a4b 100644 --- a/include/hamlib/amp_state.h +++ b/include/hamlib/amp_state.h @@ -80,7 +80,19 @@ struct amp_state #define AMPSTATE(a) (&(a)->state) #endif -/** Macro for application access to amp_state data structure. */ +/** Macro for application access to amp_state data structure using the #AMP + * handle. + * + * Example code. + * ``` + * AMP *my_amp; + * + * //Instantiate an amp + * my_amp = amp_init(AMP_MODEL_DUMMY); // your amp (amplifier) model. + * + * const struct amp_state *my_as = HAMLIB_AMPSTATE(my_amp); + * ``` + */ #define HAMLIB_AMPSTATE(a) ((struct amp_state *)amp_data_pointer(a, RIG_PTRX_AMPSTATE)) __END_DECLS diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 416cb6210..5fc0c6206 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -739,10 +739,14 @@ typedef enum { RIG_RESET_MASTER = (1 << 3) /*!< Master reset */ } reset_t; -typedef enum { - RIG_CLIENT_UNKNOWN, - RIG_CLIENT_WSJTX, - RIG_CLIENT_GPREDICT + +/** + * The client application using Hamlib. + */ +typedef enum client_e { + RIG_CLIENT_UNKNOWN, /*!< Not known, could be any application. */ + RIG_CLIENT_WSJTX, /*!< Well known digital application that includes FT8 and FT4. */ + RIG_CLIENT_GPREDICT /*!< Satellite prediction and tracking application. */ } client_t; diff --git a/include/hamlib/rig_state.h b/include/hamlib/rig_state.h index 7a295b676..15d7cff05 100644 --- a/include/hamlib/rig_state.h +++ b/include/hamlib/rig_state.h @@ -25,6 +25,21 @@ #define _RIG_STATE_H 1 __BEGIN_DECLS + + +/** + * \addtogroup rig + * @{ + */ + +/** + * \brief Hamlib rig state data structure. + * + * \file rig_state.h + * + * This file contains the live data structure of the rig (radio). + */ + /** * \brief Rig state containing live data and customized fields. * @@ -44,13 +59,13 @@ struct rig_state { // this should allow changes to hamlib_port_t without breaking shared libraries // these will maintain a copy of the new port_t for backwards compatibility // to these offsets -- note these must stay until a major version update is done like 5.0 - hamlib_port_t_deprecated rigport_deprecated; /*!< Rig port (internal use). */ - hamlib_port_t_deprecated pttport_deprecated; /*!< PTT port (internal use). */ - hamlib_port_t_deprecated dcdport_deprecated; /*!< DCD port (internal use). */ + hamlib_port_t_deprecated rigport_deprecated; /*!< \deprecated Rig port (internal use). */ + hamlib_port_t_deprecated pttport_deprecated; /*!< \deprecated PTT port (internal use). */ + hamlib_port_t_deprecated dcdport_deprecated; /*!< \deprecated DCD port (internal use). */ double vfo_comp; /*!< VFO compensation in PPM, 0.0 to disable */ - int deprecated_itu_region; /*!< ITU region to select among freq_range_t */ + int deprecated_itu_region; /*!< \deprecated ITU region to select among freq_range_t */ freq_range_t rx_range_list[HAMLIB_FRQRANGESIZ]; /*!< Receive frequency range list */ freq_range_t tx_range_list[HAMLIB_FRQRANGESIZ]; /*!< Transmit frequency range list */ @@ -111,7 +126,7 @@ struct rig_state { int twiddle_timeout; /*!< timeout to resume from twiddling */ // uplink allows gpredict to behave better by no reading the uplink VFO int uplink; /*!< uplink=1 will not read Sub, uplink=2 will not read Main */ - struct rig_cache_deprecated cache; // Only here for backward compatibility + struct rig_cache_deprecated cache; /*!< \deprecated Only here for backward compatibility */ int vfo_opt; /*!< Is -o switch turned on? */ int auto_power_on; /*!< Allow Hamlib to power on rig automatically if supported */ @@ -129,15 +144,15 @@ struct rig_state { int twiddle_state; /*!< keeps track of twiddle status */ vfo_t rx_vfo; /*!< Rx VFO currently set */ - volatile unsigned int snapshot_packet_sequence_number; + volatile unsigned int snapshot_packet_sequence_number; /*!< Sequence number for JSON output. */ - volatile int multicast_publisher_run; - void *multicast_publisher_priv_data; - volatile int async_data_handler_thread_run; - void *async_data_handler_priv_data; - volatile int poll_routine_thread_run; - void *poll_routine_priv_data; - pthread_mutex_t mutex_set_transaction; + volatile int multicast_publisher_run; /*!< Multicast publisher run flag. */ + void *multicast_publisher_priv_data; /*!< Pointer to multicast_publisher_priv_data. */ + volatile int async_data_handler_thread_run; /*!< Async data handler thread run flag. */ + void *async_data_handler_priv_data; /*!< Pointer to async_data_handler_priv_data. */ + volatile int poll_routine_thread_run; /*!< Poll routine thread run flag. */ + void *poll_routine_priv_data; /*!< Pointer to rig_poll_routine_priv_data. */ + pthread_mutex_t mutex_set_transaction; /*!< Thread mutex flag. */ hamlib_port_t rigport; /*!< Rig port (internal use). */ hamlib_port_t pttport; /*!< PTT port (internal use). */ hamlib_port_t dcdport; /*!< DCD port (internal use). */ @@ -204,36 +219,37 @@ struct rig_state { freq_t spectrum_spans[HAMLIB_MAX_SPECTRUM_SPANS]; /*!< Supported spectrum scope frequency spans in Hz in center mode. Last entry must be 0. */ struct rig_spectrum_avg_mode spectrum_avg_modes[HAMLIB_MAX_SPECTRUM_AVG_MODES]; /*!< Supported spectrum scope averaging modes. Last entry must have NULL name. */ int spectrum_attenuator[HAMLIB_MAXDBLSTSIZ]; /*!< Spectrum attenuator list in dB, 0 terminated */ - volatile int morse_data_handler_thread_run; - void *morse_data_handler_priv_data; - FIFO_RIG *fifo_morse; + volatile int morse_data_handler_thread_run; /*!< Morse data handler thread flag. */ + void *morse_data_handler_priv_data; /*!< Morse data handler private structure. */ + FIFO_RIG *fifo_morse; /*!< FIFO queue for Morse Code transmission. */ int doppler; /*!< True if doppler changing detected */ char *multicast_data_addr; /*!< Multicast data UDP address for publishing rig data and state */ int multicast_data_port; /*!< Multicast data UDP port for publishing rig data and state */ char *multicast_cmd_addr; /*!< Multicast command server UDP address for sending commands to rig */ int multicast_cmd_port; /*!< Multicast command server UDP port for sending commands to rig */ - volatile int multicast_receiver_run; - void *multicast_receiver_priv_data; - rig_comm_status_t comm_status; /*!< Detailed rig control status */ - char device_id[HAMLIB_RIGNAMSIZ]; - int dual_watch; /*!< Boolean DUAL_WATCH status */ - int post_ptt_delay; /*!< delay after PTT to allow for relays and such */ - struct timespec freq_event_elapsed; + volatile int multicast_receiver_run; /*!< Multicast receiver run flag. */ + void *multicast_receiver_priv_data; /*!< Multicast receiver private data structure, */ + rig_comm_status_t comm_status; /*!< Detailed rig control status */ + char device_id[HAMLIB_RIGNAMSIZ]; /*!< Device name, */ + int dual_watch; /*!< Boolean DUAL_WATCH status */ + int post_ptt_delay; /*!< delay after PTT to allow for relays and such */ + struct timespec freq_event_elapsed; /*!< Time struct used by various caches. */ int freq_skip; /*!< allow frequency skip for gpredict RX/TX freq set */ - client_t client; - pthread_mutex_t api_mutex; // Lock for any API entry + client_t client; /*!< Client application of the library. */ + pthread_mutex_t api_mutex; /*!< Lock for any API entry. */ // New rig_state items go before this line ============================================ }; //---Start cut here--- /** * \brief Deprecated Rig state containing live data and customized fields. - * Due to DLL problems this remains in-place in the rig_caps structure but is no longer referred to - * A new rig_state has been added at the end of the structure instead of the middle * - * This struct contains no data and is just a place holder for DLL alignment - * - * It is NOT fine to touch this struct AT ALL!!! + * \deprecated + * Due to DLL problems this remains in-place in the rig_caps structure but is no + * longer referred to.\n\n A new rig_state has been added at the end of the + * structure instead of the middle.\n\n This struct contains no data and is just a + * place holder for DLL alignment.\n\n It is NOT fine to touch this struct AT + * ALL!!!\n\n Do not use in new code. */ struct rig_state_deprecated { /********* ENSURE YOU DO NOT EVER MODIFY THIS STRUCTURE *********/ @@ -312,7 +328,7 @@ struct rig_state_deprecated { int twiddle_timeout; /*!< timeout to resume from twiddling */ // uplink allows gpredict to behave better by no reading the uplink VFO int uplink; /*!< uplink=1 will not read Sub, uplink=2 will not read Main */ - struct rig_cache_deprecated cache; // Here for backward compatibility + struct rig_cache_deprecated cache; /*!< Here for backward compatibility. */ int vfo_opt; /*!< Is -o switch turned on? */ int auto_power_on; /*!< Allow Hamlib to power on rig automatically if supported */ @@ -330,15 +346,15 @@ struct rig_state_deprecated { int twiddle_state; /*!< keeps track of twiddle status */ vfo_t rx_vfo; /*!< Rx VFO currently set */ - volatile unsigned int snapshot_packet_sequence_number; + volatile unsigned int snapshot_packet_sequence_number; /*!< Sequence number for JSON output. */ - volatile int multicast_publisher_run; - void *multicast_publisher_priv_data; - volatile int async_data_handler_thread_run; - void *async_data_handler_priv_data; - volatile int poll_routine_thread_run; - void *poll_routine_priv_data; - pthread_mutex_t mutex_set_transaction; + volatile int multicast_publisher_run; /*!< Multicast publisher run flag. */ + void *multicast_publisher_priv_data; /*!< Pointer to multicast_publisher_priv_data. */ + volatile int async_data_handler_thread_run; /*!< Async data handler thread run flag. */ + void *async_data_handler_priv_data; /*!< Pointer to async_data_handler_priv_data. */ + volatile int poll_routine_thread_run; /*!< Poll routine thread run flag. */ + void *poll_routine_priv_data; /*!< Pointer to rig_poll_routine_priv_data. */ + pthread_mutex_t mutex_set_transaction; /*!< Thread mutex flag. */ hamlib_port_t rigport; /*!< Rig port (internal use). */ hamlib_port_t pttport; /*!< PTT port (internal use). */ hamlib_port_t dcdport; /*!< DCD port (internal use). */ @@ -362,8 +378,23 @@ struct rig_state_deprecated { #if defined(IN_HAMLIB) #define STATE(r) (&(r)->state) #endif +/** Macro for application access to rig_state data structure using the #RIG + * handle. + * + * Example code. + * ``` + * RIG *my_rig; + * + * //Instantiate a rig + * my_rig = rig_init(RIG_MODEL_DUMMY); // your rig (radio) model. + * + * const struct rig_state *my_rs = HAMLIB_STATE(my_rig); + * ``` + */ #define HAMLIB_STATE(r) ((struct rig_state *)rig_data_pointer(r, RIG_PTRX_STATE)) __END_DECLS #endif /* _RIG_STATE_H */ + +/** @} */ diff --git a/include/hamlib/rot_state.h b/include/hamlib/rot_state.h index 84fd60b84..1813842ae 100644 --- a/include/hamlib/rot_state.h +++ b/include/hamlib/rot_state.h @@ -97,7 +97,19 @@ __END_DECLS #if defined(IN_HAMLIB) #define ROTSTATE(r) (&(r)->state) #endif -/** Macro for application access to rot_state data structure. */ +/** Macro for application access to rot_state data structure using the #ROT + * handle + * + * Example code. + * ``` + * ROT *my_rot; + * + * //Instantiate a rotator + * my_rot = rot_init(ROT_MODEL_DUMMY); // your rot (rotator) model. + * + * const struct rot_state *my_rs = HAMLIB_ROTSTATE(my_rot); + * ``` + */ #define HAMLIB_ROTSTATE(r) ((struct rot_state *)rot_data_pointer(r, RIG_PTRX_ROTSTATE)) #endif /* _ROT_STATE_H */ From d6d50245c697cb806f1a46fabc41f329aa25a321 Mon Sep 17 00:00:00 2001 From: Nate Bargmann Date: Fri, 25 Jul 2025 06:41:14 -0500 Subject: [PATCH 02/14] Update Doxygen comments in amplifier.h, rig.h and rotator.h --- include/hamlib/amplifier.h | 88 +++++++++++++++++--------------------- include/hamlib/rig.h | 15 +++++-- include/hamlib/rotator.h | 62 ++++++++++++++------------- 3 files changed, 84 insertions(+), 81 deletions(-) diff --git a/include/hamlib/amplifier.h b/include/hamlib/amplifier.h index 847b2a53b..dd1ab62b4 100644 --- a/include/hamlib/amplifier.h +++ b/include/hamlib/amplifier.h @@ -69,9 +69,8 @@ typedef struct amp AMP; * \brief Type definition for * SWR (Standing Wave Ratio). * - * \typedef typedef float swr_t - * - * The \a swr_t type is used as a parameter for the amp_get_swr() function. + * \noop amp_get_swr() is not implemented. + * \noop 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. @@ -89,8 +88,6 @@ typedef float swr_t; * and * inductance. * - * \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 @@ -107,36 +104,35 @@ typedef int tune_value_t; #define NETAMPCTL_RET "RPRT " -//! @cond Doxygen_Suppress -typedef enum +/** \brief Amplifier reset tokens. */ +typedef enum amp_reset_e { - AMP_RESET_MEM, // erase tuner memory - AMP_RESET_FAULT, // reset any fault - AMP_RESET_AMP // for kpa1500 + AMP_RESET_MEM, /*!< Erase tuner memory. */ + AMP_RESET_FAULT, /*!< Reset any fault. */ + AMP_RESET_AMP /*!< For Elecraft KPA-1500. */ } amp_reset_t; -//! @endcond -/** - * \brief Amplifier type flags - */ -typedef enum +/** \brief Amplifier type flags. */ +typedef enum amp_type_e { AMP_FLAG_1 = (1 << 1), /*!< TBD */ AMP_FLAG_2 = (1 << 2) /*!< TBD */ } amp_type_t; -//! @cond Doxygen_Suppress // TBD AMP_TYPE +///@{ +/// Amplifier type bit masks. #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 +///@{ +/// Amplifier levels as bit masks. enum amp_level_e { AMP_LEVEL_NONE = 0, /*!< '' -- No Level. */ @@ -150,9 +146,10 @@ enum amp_level_e AMP_LEVEL_FAULT = (1 << 7), /*!< \c Fault code. */ AMP_LEVEL_PWR = (1 << 8), /*!< \c Power setting. */ }; -//! @endcond +///@} //! @cond Doxygen_Suppress +// Not used yet. #define AMP_LEVEL_FLOAT_LIST (AMP_LEVEL_SWR) #define AMP_LEVEL_STRING_LIST (AMP_LEVEL_FAULT) #define AMP_LEVEL_IS_FLOAT(l) ((l)&_LEVEL_FLOAT_LIST) @@ -164,15 +161,16 @@ enum amp_level_e * enquiries about capabilities. */ -//! @cond Doxygen_Suppress +/** + * Convenience macro to map the `amp_model` number and `macro_name` string from amplist.h. + * + * Used when populating a backend amp_caps structure. + */ #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 @@ -225,39 +223,37 @@ struct amp_caps * */ - 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 (*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_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, hamlib_token_t token, const char *val); /*!< Pointer to backend implementation of ::amp_set_conf(). */ - int (*get_conf2)(AMP *amp, hamlib_token_t token, char *val, int val_len); /*!< Pointer to backend implementation of ::amp_get_conf(). */ - int (*get_conf)(AMP *amp, hamlib_token_t token, char *val); /*!< Pointer to backend implementation of ::amp_get_conf(). */ + int (*set_conf)(AMP *amp, hamlib_token_t token, const char *val); /*!< Pointer to backend implementation of amp_set_conf(). */ + int (*get_conf2)(AMP *amp, hamlib_token_t token, char *val, int val_len); /*!< Pointer to backend implementation of amp_get_conf(). */ + int (*get_conf)(AMP *amp, hamlib_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 (*set_level)(AMP *amp, setting_t level, value_t val); /*!< Pointer to backend implementation of ::amp_get_level(). */ - int (*get_ext_level)(AMP *amp, hamlib_token_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_ext_level(). */ - int (*set_ext_level)(AMP *amp, hamlib_token_t level, value_t val); /*!< Pointer to backend implementation of ::amp_set_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(). */ + 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 (*set_level)(AMP *amp, setting_t level, value_t val); /*!< Pointer to backend implementation of amp_get_level(). */ + int (*get_ext_level)(AMP *amp, hamlib_token_t level, value_t *val); /*!< Pointer to backend implementation of amp_get_ext_level(). */ + int (*set_ext_level)(AMP *amp, hamlib_token_t level, value_t val); /*!< Pointer to backend implementation of amp_set_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(). */ + const char *(*get_info)(AMP *amp); /*!< Pointer to backend implementation of amp_get_info(). */ -//! @cond Doxygen_Suppress - setting_t levels; - unsigned ext_levels; -//! @endcond + setting_t levels; /*!< Levels bit mask */ + unsigned ext_levels; /*!< Extension levels value. */ const struct confparams *extlevels; /*!< Extension levels list. \sa extamp.c */ const struct confparams *extparms; /*!< Extension parameters list. \sa extamp.c */ @@ -281,8 +277,6 @@ __BEGIN_DECLS /** * \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 @@ -432,8 +426,6 @@ extern HAMLIB_EXPORT(void *) amp_data_pointer(AMP *amp, rig_ptrx_t idx); /** * \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. */ diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 5fc0c6206..c5df12297 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1210,7 +1210,7 @@ enum multicast_item_e { //! @endcond /** - * \brief Setting + * \brief Setting bit mask. * * This can be a func, a level or a parm. * Each bit designates one of them. @@ -1897,6 +1897,16 @@ struct deferred_config_header { }; typedef struct deferred_config_header deferred_config_header_t; + +/** + * Convenience macro to map the `rig_model` number and `macro_name` string from riglist.h. + * + * Used when populating a backend rig_caps structure. + */ +#define RIG_MODEL(arg) .rig_model=arg,.macro_name=#arg + +#define HAMLIB_CHECK_RIG_CAPS "HAMLIB_CHECK_RIG_CAPS" + /** * \brief Rig data structure. * @@ -1916,9 +1926,6 @@ typedef struct deferred_config_header deferred_config_header_t; * mdblack: Don't move or add fields around without bumping the version numbers * DLL or shared library replacement depends on order */ -//! @cond Doxygen_Suppress -#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; /*!< Rig model. */ const char *model_name; /*!< Model name. */ diff --git a/include/hamlib/rotator.h b/include/hamlib/rotator.h index 629e79022..a2f8283ee 100644 --- a/include/hamlib/rotator.h +++ b/include/hamlib/rotator.h @@ -510,56 +510,60 @@ struct rot_caps { * */ - 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 (*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, hamlib_token_t token, const char *val); /*!< Pointer to backend implementation of ::rot_set_conf(). */ - int (*get_conf)(ROT *rot, hamlib_token_t token, char *val); /*!< Pointer to backend implementation of ::rot_get_conf(). */ + int (*set_conf)(ROT *rot, hamlib_token_t token, const char *val); /*!< Pointer to backend implementation of rot_set_conf(). */ + int (*get_conf)(ROT *rot, hamlib_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 (*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(). */ + 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(). */ + 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_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_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_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, hamlib_token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_level(). */ - int (*get_ext_level)(ROT *rot, hamlib_token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_level(). */ + int (*set_ext_level)(ROT *rot, hamlib_token_t token, value_t val); /*!< Pointer to backend implementation of rot_set_ext_level(). */ + int (*get_ext_level)(ROT *rot, hamlib_token_t token, value_t *val); /*!< Pointer to backend implementation of rot_get_ext_level(). */ - int (*set_ext_func)(ROT *rot, hamlib_token_t token, int status); /*!< Pointer to backend implementation of ::rot_set_ext_func(). */ - int (*get_ext_func)(ROT *rot, hamlib_token_t token, int *status); /*!< Pointer to backend implementation of ::rot_get_ext_func(). */ + int (*set_ext_func)(ROT *rot, hamlib_token_t token, int status); /*!< Pointer to backend implementation of rot_set_ext_func(). */ + int (*get_ext_func)(ROT *rot, hamlib_token_t token, int *status); /*!< Pointer to backend implementation of rot_get_ext_func(). */ - int (*set_ext_parm)(ROT *rot, hamlib_token_t token, value_t val); /*!< Pointer to backend implementation of ::rot_set_ext_parm(). */ - int (*get_ext_parm)(ROT *rot, hamlib_token_t token, value_t *val); /*!< Pointer to backend implementation of ::rot_get_ext_parm(). */ + int (*set_ext_parm)(ROT *rot, hamlib_token_t token, value_t val); /*!< Pointer to backend implementation of rot_set_ext_parm(). */ + int (*get_ext_parm)(ROT *rot, hamlib_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(). */ + 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. */ - int (*get_conf2)(ROT *rot, hamlib_token_t token, char *val, int val_len); /*!< Pointer to backend implementation of ::rot_get_conf2(). */ + int (*get_conf2)(ROT *rot, hamlib_token_t token, char *val, int val_len); /*!< Pointer to backend implementation of rot_get_conf2(). */ }; -//! @cond Doxygen_Suppress + +/** + * Convenience macro to map the `rot_model` number and `macro_name` string from rotlist.h. + * + * Used when populating a backend rot_caps structure. + */ #define ROT_MODEL(arg) .rot_model=arg,.macro_name=#arg -//! @endcond //---Start cut here--- // Rotator state definition moved to include/hamlib/rot_state.h From f0efc558f6354a64fb22255a1979e58a68ff1e0f Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Sun, 29 Jun 2025 18:15:00 +0200 Subject: [PATCH 03/14] Make Dummy Rig handle also RIG_ANT_5 --- rigs/dummy/dummy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index a7006792f..fc9f10571 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -1823,6 +1823,7 @@ static int dummy_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option) case RIG_ANT_2: case RIG_ANT_3: case RIG_ANT_4: + case RIG_ANT_5: curr->ant = ant; break; @@ -1860,6 +1861,7 @@ static int dummy_get_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t *option, case RIG_ANT_2: case RIG_ANT_3: case RIG_ANT_4: + case RIG_ANT_5: *ant_curr = ant; break; @@ -2463,14 +2465,14 @@ struct rig_caps dummy_caps = .agc_levels = { RIG_AGC_OFF, RIG_AGC_SUPERFAST, RIG_AGC_FAST, RIG_AGC_MEDIUM, RIG_AGC_SLOW, RIG_AGC_AUTO, RIG_AGC_USER }, .rx_range_list1 = { { .startf = kHz(150), .endf = MHz(1500), .modes = DUMMY_MODES, - .low_power = -1, .high_power = -1, DUMMY_VFOS, RIG_ANT_1 | RIG_ANT_2 | RIG_ANT_3 | RIG_ANT_4, + .low_power = -1, .high_power = -1, DUMMY_VFOS, RIG_ANT_1 | RIG_ANT_2 | RIG_ANT_3 | RIG_ANT_4 | RIG_ANT_5, .label = "Dummy#1" }, RIG_FRNG_END, }, .tx_range_list1 = { { .startf = kHz(150), .endf = MHz(1500), .modes = DUMMY_MODES, - .low_power = W(5), .high_power = W(100), DUMMY_VFOS, RIG_ANT_1 | RIG_ANT_2 | RIG_ANT_3 | RIG_ANT_4, + .low_power = W(5), .high_power = W(100), DUMMY_VFOS, RIG_ANT_1 | RIG_ANT_2 | RIG_ANT_3 | RIG_ANT_4 | RIG_ANT_5, .label = "Dummy#1" }, RIG_FRNG_END, From df6ddedf63a65529b214e609510e055da127a949 Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Fri, 25 Jul 2025 23:52:02 +0200 Subject: [PATCH 04/14] Use a define instead of a magic number --- rigs/dummy/dummy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index fc9f10571..de1dae493 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -197,7 +197,7 @@ static void init_chan(RIG *rig, vfo_t vfo, channel_t *chan) chan->rit = 0; chan->xit = 0; chan->tuning_step = 0; - chan->ant = 0; + chan->ant = RIG_ANT_NONE; chan->funcs = (setting_t)0; memset(chan->levels, 0, RIG_SETTING_MAX * sizeof(value_t)); From bc25855f48edf631d7653345f0bb763759094ba5 Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Sat, 26 Jul 2025 00:15:09 +0200 Subject: [PATCH 05/14] Check split argument in dummy_get_split_mode() and fix the test --- bindings/python/test_rig.py | 14 +++++++------- rigs/dummy/dummy.c | 16 +++++++++++++++- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 1c3927cb0..0ccc01097 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -51,13 +51,13 @@ class TestClass: info = rig.get_info() assert isinstance(info, str) - assert rig.set_split_vfo(-600000, Hamlib.RIG_VFO_A) is None - assert rig.get_split_vfo(Hamlib.RIG_VFO_TX) == [-600000, 1] - assert rig.set_split_vfo(5000000, Hamlib.RIG_VFO_B) is None - assert rig.get_split_vfo(Hamlib.RIG_VFO_TX) == [5000000, 2] - assert rig.set_split_vfo(5000000, Hamlib.RIG_VFO_CURR) is None - assert rig.get_split_vfo() == [5000000, 1] - assert rig.get_split_vfo(Hamlib.RIG_VFO_CURR) == [5000000, 1] + assert rig.set_split_vfo(Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_A) is None + assert rig.get_split_vfo(Hamlib.RIG_VFO_TX) == [Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_A] + assert rig.set_split_vfo(Hamlib.RIG_SPLIT_ON, Hamlib.RIG_VFO_B) is None + assert rig.get_split_vfo(Hamlib.RIG_VFO_TX) == [Hamlib.RIG_SPLIT_ON, Hamlib.RIG_VFO_B] + assert rig.set_split_vfo(Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_CURR) is None + assert rig.get_split_vfo() == [Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_B] + assert rig.get_split_vfo(Hamlib.RIG_VFO_CURR) == [Hamlib.RIG_SPLIT_OFF, Hamlib.RIG_VFO_B] # FIXME should use a RIG_ANT_* constant but it isn't available in the bindings RIG_ANT_UNKNOWN = 1<<30 diff --git a/rigs/dummy/dummy.c b/rigs/dummy/dummy.c index de1dae493..e25d0bbf3 100644 --- a/rigs/dummy/dummy.c +++ b/rigs/dummy/dummy.c @@ -1114,11 +1114,25 @@ static int dummy_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) rig_debug(RIG_DEBUG_VERBOSE, "%s: split=%d, vfo=%s, tx_vfo=%s\n", __func__, split, rig_strvfo(vfo), rig_strvfo(tx_vfo)); + switch (split) + { + case RIG_SPLIT_OFF: + priv->split = RIG_SPLIT_OFF; + break; + + case RIG_SPLIT_ON: + priv->split = RIG_SPLIT_ON; + break; + + default: + rig_debug(RIG_DEBUG_ERR, "%s: unsupported split %d", __func__, split); + RETURNFUNC(-RIG_EINVAL); + } + if (tx_vfo == RIG_VFO_NONE || tx_vfo == RIG_VFO_CURR) { tx_vfo = priv->curr_vfo; } if (tx_vfo == RIG_VFO_CURR || tx_vfo == RIG_VFO_TX) { tx_vfo = vfo_fixup(rig, vfo, CACHE(rig)->split); } - priv->split = split; priv->tx_vfo = tx_vfo; RETURNFUNC(RIG_OK); From d2025477be1e5181980fddf9a05bf5ca86d5d4bd Mon Sep 17 00:00:00 2001 From: Nate Bargmann Date: Fri, 25 Jul 2025 09:52:22 -0500 Subject: [PATCH 06/14] Add some tips on formatting with Doxygen --- doc/README.Doxygen | 97 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 doc/README.Doxygen diff --git a/doc/README.Doxygen b/doc/README.Doxygen new file mode 100644 index 000000000..e9e167824 --- /dev/null +++ b/doc/README.Doxygen @@ -0,0 +1,97 @@ +Some tips on writing comments for the Doxygen documentation generator. + +Doxygen is a flexible and powerful tool that not only reads and processes +specially formatted comments but also the actual code such as functions, +structures, enumerations, and defines. Sometimes it needs a few hints to +generate output in a consistent manner. As usual, there are multiple ways to +do one thing and it's likely that nearly all of them are present in the Hamlib +code base. + + +Markdown + +Doxygen has supported the use of Markdown formatting elements in running text +for some time. Markdown has become rather universal over the past several +years for simple markup of text. It is widely supported by GitHub, Reddit, and +other Web sites. Those familiar with Markdown can use it the running Doxygen +comment text and it will be formatted as such in the output. + +Common formatting is to emphasize text as italic, bold, or constant width font. +A string will be output in italics when it is has a single asterisk or +underscore preceding and succeeding the string, e.g. *italic*. Likewise the +string will be emboldened with two asterisks or underscores, e.g. **bold**. As +most text output will be in proportional text, a string surrounded by backticks +will be output in a constant width font, e.b. `constant width`. + + +Special commands + +Doxygen will associate a comment block that immediately precedes the item. For +example, a comment block immediately precedes a structure declaration. It is +not necessary to include a line such as `\struct foo` in the comment block. +This is only necessary if the comment block must be separated from the item. +One example of the latter is a group of #define macros where the comment block +is placed above the group rather than interspersed. In this case, each #define +will need to be called out in the comment block with the \def command. The +choice is yours. Sometimes the source file will look more clean with a +separate comment block and at others interspersed comments will seem more +appropriate. + +Notable exceptions are in the rotlist.h and amplist.h files where the #define +statements for the individual models have beem grouped together and the +comments grouped preceding them. This is true even in the case of a backend +with a single model as others may be added in the future. Including the \def +command in each comment block is appropriate. + +Related to the previous section, sometimes a single comment will be appropriate +for a group of elements, particularly macros. An anonymous group will apply +the comment to all elements. The anonymous group uses the ///@{ and ///@} +constructs. + + +Reference links + +Elements can be explicitly referenced with the # character. This is done in +running text to force Doxygen to create a link to the documentation for the RIG +handle, for example. Otherwise, it is rarely needed. Check the output as the +comment is being written and use the # character if needed. + +Functions have two methods of forcing a reference. The first is to precede the +function name with a pair of colons, e.g. ::rig_init. This acts much like # +where it is sort of a hard instruction to Doxygen and a warning will be printed +if the function is not found in the list of files passed to Doxygen or it has +no associated comment. The second is to place a pair of parentheses +immediately after the function, e.g. rig_init(). This second construct is +preferred as Doxygen will not print a warning if the function is not found or +commented. + +Links to external Web sites can be done in the Markdown syntax. + + +Code blocks in comments + +Code blocks can be delimited with use of the \code and \endcode special +commands or with a Markdown "fence" which consists of three backticks on a line +preceding and succeeding the code block. Backticks are shorter to type. + + +Check the output + +Always check the output to be sure it is what you want! I edit in one terminal +window, switch to another to run `make doc` from within the 'doc' directory and +reload the local page in the browser. This will show if a reference command is +required. + +Be aware the members of an enumeration or structure cannot be linked to even +though they are documented. In that case, surround the member name with +backticks to render it in a constant width font. + + +What to document + +For now the frontend part of the library is being documented. This includes +most files in `include/hamlib` and `src`. No decision has been made on +expanding this to the individual backends. That would be a Herculean task! + + +73, Nate, N0NB From f67a3cfe4722728335fb11a5939b6233a8cbec44 Mon Sep 17 00:00:00 2001 From: Nate Bargmann Date: Sat, 26 Jul 2025 08:53:15 -0500 Subject: [PATCH 07/14] Update Doxygen comments in riglist.h Create a new topic group of 'riglist' to separate the long list of radio models from the main Rig API group. --- doc/index.doxygen | 1 + include/hamlib/riglist.h | 500 +++++++++++++++++++++++++++++++++++---- 2 files changed, 456 insertions(+), 45 deletions(-) diff --git a/doc/index.doxygen b/doc/index.doxygen index dfa428b1f..73ba6e361 100644 --- a/doc/index.doxygen +++ b/doc/index.doxygen @@ -190,6 +190,7 @@ GNU/Linux. /*! Define groups for Doxygen * \defgroup rig Rig (transceiver) API + * \defgroup riglist Rig (radio) Model List * \defgroup rig_internal Rig (transceiver) Internal API * \defgroup rotator Rotator API * \defgroup rot_internal Rotator Internal API diff --git a/include/hamlib/riglist.h b/include/hamlib/riglist.h index 1bbc6a1e3..3c59390e4 100644 --- a/include/hamlib/riglist.h +++ b/include/hamlib/riglist.h @@ -19,42 +19,52 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #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 2024-07-14 we have 39 backends defined -- need to be careful about generating new ones -// Perhaps combine them under a MISC entry should work -// 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) (MAX_MODELS_PER_BACKEND*(a)+(b)) -#define RIG_BACKEND_NUM(a) ((a)/MAX_MODELS_PER_BACKEND) - -//! @endcond - -/*! \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. +/** + * \addtogroup riglist + * @{ */ /** - * \def RIG_MODEL_NONE + * \brief Hamlib rig (radio) model definitions. + * + * \file riglist.h + * + * This file contains rig (radio) 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 + * wishes to use. It is done with the rig_init() API call. + */ + +/** Number of models per backend family. */ +#define MAX_MODELS_PER_BACKEND 1000 + +/** + * \brief The rig model number is held in an unsigned 32-bit integer. + * + * Model numbers are a simple decimal value that increments by a value of + * 1000 for each backend, e.g. the `DUMMY` backend has model numbers 1 + * to 1000, the `YAESU` backend has model numbers 1001 to 1100 and so on. + * + * \sa rig_model_t + */ +#define RIG_MAKE_MODEL(a,b) (MAX_MODELS_PER_BACKEND*(a)+(b)) + +/** Convenience macro to derive the backend family number from the model number. */ +#define RIG_BACKEND_NUM(a) ((a)/MAX_MODELS_PER_BACKEND) + +/** * \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 @@ -62,23 +72,32 @@ */ #define RIG_MODEL_NONE 0 -/*! \def RIG_MODEL_DUMMY - * \brief A macro that returns the model number for the dummy backend. +/** + * \brief The `DUMMY` family. * - * The dummy backend, as the name suggests, is a backend which performs no + * 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 and many + * more, especially SDR (Software Defined Radio) applications. + */ +#define RIG_DUMMY 0 +/** Used in register.c for the `be_name`. */ +#define RIG_BACKEND_DUMMY "dummy" +/** + * \brief A macro that returns the model number for `DUMMY`. + * + * The `DUMMY model, as the name suggests, is a model 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. */ -//! @cond Doxygen_Suppress -#define RIG_DUMMY 0 -#define RIG_BACKEND_DUMMY "dummy" -//! @endcond #define RIG_MODEL_DUMMY RIG_MAKE_MODEL(RIG_DUMMY, 1) -//! @cond Doxygen_Suppress + +/** + * \name NETWORK + * Network models. + */ +///@{ +/// Model of the `RIG_DUMMY` backend family. #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) @@ -89,12 +108,22 @@ #define RIG_MODEL_SDRSHARP RIG_MAKE_MODEL(RIG_DUMMY, 9) #define RIG_MODEL_QUISK RIG_MAKE_MODEL(RIG_DUMMY, 10) #define RIG_MODEL_GQRX RIG_MAKE_MODEL(RIG_DUMMY, 11) +///@} /* * Yaesu */ +/** The `YAESU` family. */ #define RIG_YAESU 1 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_YAESU "yaesu" + +/** + * \name YAESU + * Yaesu models. + */ +///@{ +/// Model of the `RIG_YAESU` backend family. #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) @@ -146,12 +175,22 @@ #define RIG_MODEL_FT710 RIG_MAKE_MODEL(RIG_YAESU, 49) #define RIG_MODEL_FT9000OLD RIG_MAKE_MODEL(RIG_YAESU, 50) #define RIG_MODEL_FTX1 RIG_MAKE_MODEL(RIG_YAESU, 51) +///@} /* * Kenwood */ +/** The `KENWOOD` family. */ #define RIG_KENWOOD 2 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_KENWOOD "kenwood" + +/** + * \name KENWOOD + * Kenwood models. + */ +///@{ +/// Model of the `RIG_KENWOOD` backend family. #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) @@ -209,12 +248,22 @@ #define RIG_MODEL_TRUSDX RIG_MAKE_MODEL(RIG_KENWOOD, 55) #define RIG_MODEL_SDRCONSOLE RIG_MAKE_MODEL(RIG_KENWOOD, 56) #define RIG_MODEL_QRPLABS_QMX RIG_MAKE_MODEL(RIG_KENWOOD,57) +///@} /* * Icom */ +/** The `ICOM` family. */ #define RIG_ICOM 3 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_ICOM "icom" + +/** + * \name ICOM + * Icom models. + */ +///@{ +/// Model of the `RIG_ICOM` backend family. #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) @@ -315,22 +364,42 @@ #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 */ +/** The `PCR` family. */ #define RIG_PCR 4 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_PCR "pcr" + +/** + * \name PCR + * PCR models. + */ +///@{ +/// Model of the `RIG_PCR` backend family. #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 */ +/** The `AOR` family. */ #define RIG_AOR 5 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_AOR "aor" + +/** + * \name AOR + * AOR models. + */ +///@{ +/// Model of the `RIG_AOR` backend family. #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) @@ -347,12 +416,22 @@ #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 */ +/** The `JRC` family. */ #define RIG_JRC 6 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_JRC "jrc" + +/** + * \name JRC + * JRC models. + */ +///@{ +/// Model of the `RIG_JRC` backend family. #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) @@ -360,25 +439,45 @@ #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 */ +/** The `RADIOSHACK` family. */ #define RIG_RADIOSHACK 7 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_RADIOSHACK "radioshack" + +/** + * \name RADIOSHACK + * RadioShack models. + */ +///@{ +/// Model of the `RIG_RADIOSHACK` backend family. #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 */ +/** The `UNIDEN` family. */ #define RIG_UNIDEN 8 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_UNIDEN "uniden" + +/** + * \name UNIDEN + * Uniden models. + */ +///@{ +/// Model of the `RIG_UNIDEN` backend family. #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) @@ -391,73 +490,143 @@ #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 */ +/** The `DRAKE` family. */ #define RIG_DRAKE 9 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_DRAKE "drake" + +/** + * \name DRAKE + * Drake models. + */ +///@{ +/// Model of the `RIG_DRAKE` backend family. #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 */ +/** The `LOWE` family. */ #define RIG_LOWE 10 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_LOWE "lowe" + +/** + * \name LOWE + * Lowe models. + */ +///@{ +/// Model of the `RIG_LOWE` backend family. #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 */ +/** The `RACAL` family. */ #define RIG_RACAL 11 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_RACAL "racal" + +/** + * \name RACAL + * Racal models. + */ +///@{ +/// Model of the `RIG_RACAL` backend family. #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 */ +/** The `WJ` family. */ #define RIG_WJ 12 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_WJ "wj" + +/** + * \name WJ + * Watkins-Johnson models. + */ +///@{ +/// Model of the `RIG_WJ` backend family. #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 */ +/** The `EK` family. */ #define RIG_EK 13 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_EK "ek" + +/** + * \name EK + * Rohde & Schwarz EK models. + */ +///@{ +/// Model of the `RIG_EK` backend family. #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 */ +/** The `SKANTI` family. */ #define RIG_SKANTI 14 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_SKANTI "skanti" + +/** + * \name SKANTI + * Skanti models. + */ +///@{ +/// Model of the `RIG_SKANTI` backend family. #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 */ +/** The `WINRADIO` family. */ #define RIG_WINRADIO 15 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_WINRADIO "winradio" + +/** + * \name WINRADIO + * WiNRADiO/LinRADiO models. + */ +///@{ +/// Model of the `RIG_WINRADIO` backend family. #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) @@ -469,12 +638,22 @@ #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 */ +/** The `TENTEC` family. */ #define RIG_TENTEC 16 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_TENTEC "tentec" + +/** + * \name TENTEC + * Ten Tec models. + */ +///@{ +/// Model of the `RIG_TENTEC` backend family. #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) @@ -487,54 +666,114 @@ #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 */ +/** The `ALINCO` family. */ #define RIG_ALINCO 17 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_ALINCO "alinco" + +/** + * \name ALINCO + * Alinco models. + */ +///@{ +/// Model of the `RIG_ALINCO` backend family. #define RIG_MODEL_DX77 RIG_MAKE_MODEL(RIG_ALINCO, 1) #define RIG_MODEL_DXSR8 RIG_MAKE_MODEL(RIG_ALINCO, 2) +///@} /* * Kachina */ +/** The `KACHINA` family. */ #define RIG_KACHINA 18 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_KACHINA "kachina" + +/** + * \name KACHINA + * Kachina model. + */ +///@{ +/// Model of the `RIG_KACHINA` backend family. #define RIG_MODEL_505DSP RIG_MAKE_MODEL(RIG_KACHINA, 1) +///@} /* * Gnuradio backend */ +/** The `GNURADIO` family. */ #define RIG_GNURADIO 20 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_GNURADIO "gnuradio" + +/** + * \name GNURADIO + * GNU Radio models. + */ +///@{ +/// Model of the `RIG_GNURADIO` backend family. #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 */ +/** The `MICROTUNE` family. */ #define RIG_MICROTUNE 21 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_MICROTUNE "microtune" + +/** + * \name MICROTUNE + * Microtune models. + */ +///@{ +/// Model of the `RIG_MICROTUNE` backend family. #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 */ +/** The `TAPR` family. */ #define RIG_TAPR 22 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_TAPR "tapr" + +/** + * \name TAPR + * TAPR model. + */ +///@{ +/// Model of the `RIG_TAPR` backend family. #define RIG_MODEL_DSP10 RIG_MAKE_MODEL(RIG_TAPR, 1) +///@} /* * Flex-radio */ +/** The `FLEXRADIO` family. */ #define RIG_FLEXRADIO 23 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_FLEXRADIO "flexradio" + +/** + * \name FLEXRADIO + * FlexRadio models. + */ +///@{ +/// Model of the `RIG_FLEXRADIO` backend family. #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) @@ -547,19 +786,39 @@ #define RIG_MODEL_SMARTSDR_F RIG_MAKE_MODEL(RIG_FLEXRADIO, 10) #define RIG_MODEL_SMARTSDR_G RIG_MAKE_MODEL(RIG_FLEXRADIO, 11) #define RIG_MODEL_SMARTSDR_H RIG_MAKE_MODEL(RIG_FLEXRADIO, 12) +///@} /* * VEB Funkwerk Köpenick RFT */ +/** The `RFT` family. */ #define RIG_RFT 24 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_RFT "rft" + +/** + * \name RFT + * VEB Funkwerk Köpenick RFT model. + */ +///@{ +/// Model of the `RIG_RFT` backend family. #define RIG_MODEL_EKD500 RIG_MAKE_MODEL(RIG_RFT, 1) +///@} /* * Various kits */ +/** The `KIT` family. */ #define RIG_KIT 25 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_KIT "kit" + +/** + * \name KIT + * Various kit models. + */ +///@{ +/// Model of the `RIG_KIT` backend family. #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) @@ -579,100 +838,213 @@ #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, .. */ +/** The `TUNER` family. */ #define RIG_TUNER 26 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_TUNER "tuner" + +/** + * \name TUNER + * Tuner models. + */ +///@{ +/// Model of the `RIG_TUNER` backend family. #define RIG_MODEL_V4L RIG_MAKE_MODEL(RIG_TUNER, 1) #define RIG_MODEL_V4L2 RIG_MAKE_MODEL(RIG_TUNER, 2) +///@} /* * Rohde & Schwarz--rs */ +/** The `RS` family. */ #define RIG_RS 27 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_RS "rs" + +/** + * \name RS + * Rohde & Schwarz RS models. + */ +///@{ +/// Model of the `RIG_RS` backend family. #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) #define RIG_MODEL_EK89X RIG_MAKE_MODEL(RIG_RS, 4) #define RIG_MODEL_XK852 RIG_MAKE_MODEL(RIG_RS, 5) +///@} + /* * Phillips/Simoco PRM80 */ +/** The `PRM80` family. */ #define RIG_PRM80 28 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_PRM80 "prm80" + +/** + * \name PRM80 + * Phillips/Simoco PRM80 models. + */ +///@{ +/// Model of the `RIG_PRM80` backend family. #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 */ +/** The `ADAT` family. */ #define RIG_ADAT 29 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_ADAT "adat" + +/** + * \name ADAT + * ADAT by HB9CBU model. + */ +///@{ +/// Model of the `RIG_ADAT` backend family. #define RIG_MODEL_ADT_200A RIG_MAKE_MODEL(RIG_ADAT, 1) +///@} /* * ICOM Marine */ +/** The `ICMARINE` family. */ #define RIG_ICMARINE 30 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_ICMARINE "icmarine" + +/** + * \name ICMARINE + * Icom Marine models. + */ +///@{ +/// Model of the `RIG_ICMARINE` backend family. #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 */ +/** The `DORJI` family. */ #define RIG_DORJI 31 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_DORJI "dorji" + +/** + * \name DORJI + * Dorji models. + */ +///@{ +/// Model of the `RIG_DORJI` backend family. #define RIG_MODEL_DORJI_DRA818V RIG_MAKE_MODEL(RIG_DORJI, 1) #define RIG_MODEL_DORJI_DRA818U RIG_MAKE_MODEL(RIG_DORJI, 2) +///@} /* * Barrett */ +/** The `BARRET` family. */ #define RIG_BARRETT 32 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_BARRETT "barrett" + +/** + * \name BARRET + * Barret models. + */ +///@{ +/// Model of the `RIG_BARRETT` backend family. #define RIG_MODEL_BARRETT_2050 RIG_MAKE_MODEL(RIG_BARRETT, 1) #define RIG_MODEL_BARRETT_950 RIG_MAKE_MODEL(RIG_BARRETT, 2) #define RIG_MODEL_BARRETT_4050 RIG_MAKE_MODEL(RIG_BARRETT, 3) #define RIG_MODEL_BARRETT_4100 RIG_MAKE_MODEL(RIG_BARRETT, 4) +///@} /* * Elad */ +/** The `ELAD` family. */ #define RIG_ELAD 33 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_ELAD "elad" + +/** + * \name ELAD + * Elad model. + */ +///@{ +/// Model of the `RIG_ELAD` backend family. #define RIG_MODEL_ELAD_FDM_DUO RIG_MAKE_MODEL(RIG_ELAD, 1) +///@} /* * CODAN */ +/** The `CODAN` family. */ #define RIG_CODAN 34 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_CODAN "codan" + +/** + * \name CODAN + * Codan models. + */ +///@{ +/// Model of the `RIG_CODAN` backend family. #define RIG_MODEL_CODAN_ENVOY RIG_MAKE_MODEL(RIG_CODAN, 1) #define RIG_MODEL_CODAN_NGT RIG_MAKE_MODEL(RIG_CODAN, 2) #define RIG_MODEL_CODAN_2110 RIG_MAKE_MODEL(RIG_CODAN, 3) +///@} /* * Gomspace */ +/** The `GOMSPACE` family. */ #define RIG_GOMSPACE 35 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_GOMSPACE "gomspace" + +/** + * \name GOMSPACE + * GomSpace model. + */ +///@{ +/// Model of the `RIG_GOMSPACE` backend family. #define RIG_MODEL_GS100 RIG_MAKE_MODEL(RIG_GOMSPACE, 1) +///@} /* * MDS Microwave Data Systems https://en.wikipedia.org/wiki/Microwave_Data_Systems */ +/** The `MDS` family. */ #define RIG_MDS 36 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_MDS "MDS" + +/** + * \name MDS + * Microwave Data Systems models. + */ +///@{ +/// Model of the `RIG_MDS` backend family. #define RIG_MODEL_MDS4710 RIG_MAKE_MODEL(RIG_MDS, 1) #define RIG_MODEL_MDS9710 RIG_MAKE_MODEL(RIG_MDS, 2) +///@} + /* * TODO: RIG_MODEL_KWZ30, KNEISNER +DOERING @@ -683,37 +1055,73 @@ /* * AnyTone rigs */ +/** The `ANYTONE` family. */ #define RIG_ANYTONE 37 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_ANYTONE "AnyTone" + +/** + * \name ANYTONE + * AnyTone model. + */ +///@{ +/// Model of the `RIG_ANYTONE` backend family. #define RIG_MODEL_ATD578UVIII RIG_MAKE_MODEL(RIG_ANYTONE, 1) +///@} /* * Motorola rigs */ +/** The `MOTOROLA` family. */ #define RIG_MOTOROLA 38 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_MOTOROLA "Motorola" + +/** + * \name MOTOROLA + * Motorola model. + */ +///@{ +/// Model of the `RIG_MOTOROLA` backend family. #define RIG_MODEL_MICOM2 RIG_MAKE_MODEL(RIG_MOTOROLA, 1) +///@} /* * Commradio / AeroStream Communications */ +/** The `COMMRADIO` family. */ #define RIG_COMMRADIO 39 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_COMMRADIO "commradio" + +/** + * \name COMMRADIO + * Commradio / AeroStream Communications model. + */ +///@{ +/// Model of the `RIG_COMMRADIO` backend family. #define RIG_MODEL_CTX10 RIG_MAKE_MODEL(RIG_COMMRADIO, 1) +///@} /* * GUOHETEC */ +/** The `GUOHETEC` family. */ #define RIG_GUOHETEC 40 +/** Used in register.c for the `be_name`. */ #define RIG_BACKEND_GUOHETEC "guohetec" + +/** + * \name GUOHETEC + * GUOHETEC models. + */ +///@{ +/// Model of the `RIG_GUOHETEC` backend family. #define RIG_MODEL_PMR171 RIG_MAKE_MODEL(RIG_GUOHETEC, 1) #define RIG_MODEL_Q900 RIG_MAKE_MODEL(RIG_GUOHETEC, 2) +///@} -//! @endcond - -/*! \typedef typedef int rig_model_t - \brief Convenience type definition for rig model. -*/ +/** Convenience type definition for rig model. */ typedef uint32_t rig_model_t; @@ -729,3 +1137,5 @@ typedef uint32_t rig_model_t; */ #endif /* _RIGLIST_H */ + +/** @} */ From 4d6a3ed582b89c3968a9892c607f54da41b97604 Mon Sep 17 00:00:00 2001 From: Nate Bargmann Date: Sat, 26 Jul 2025 10:08:19 -0500 Subject: [PATCH 08/14] Fully document amplist.h Create a new topic group of 'amplist' to separate the list of amplifier models from the main Amplifier API group. --- doc/index.doxygen | 1 + include/hamlib/amplist.h | 98 ++++++++++++++++++++++------------------ 2 files changed, 54 insertions(+), 45 deletions(-) diff --git a/doc/index.doxygen b/doc/index.doxygen index 73ba6e361..46f7f73ba 100644 --- a/doc/index.doxygen +++ b/doc/index.doxygen @@ -195,6 +195,7 @@ GNU/Linux. * \defgroup rotator Rotator API * \defgroup rot_internal Rotator Internal API * \defgroup amplifier Amplifier API + * \defgroup amplist Amplifier model list * \defgroup amp_internal Amplifier Internal API * \defgroup port Port data structure for accessing devices * \defgroup utilities Utility Routines API diff --git a/include/hamlib/amplist.h b/include/hamlib/amplist.h index 4539b6d2b..a123f8841 100644 --- a/include/hamlib/amplist.h +++ b/include/hamlib/amplist.h @@ -25,17 +25,12 @@ #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 + * \addtogroup amplist * @{ */ + /** * \brief Hamlib amplifier model definitions. * @@ -55,6 +50,27 @@ * wishes to use which is passed to the amp_init() API call. */ +/** + * \brief The amp model number is held in a signed integer. + * + * Model numbers are a simple decimal value that increments by a value of + * 100 for each backend, e.g. the `DUMMY` backend has model numbers 1 + * to 100, the `ELECRAFT` backend has model numbers 201 to 300 and so on + * (101 to 200 is currently unassigned). + * + * \note A limitation is that with ::amp_model_t being a signed integer that on + * some systems such a value may be 16 bits. This limits the number of backends + * to 326 of 100 models each (32768 / 100 thus leaving only 68 models for + * backend number 327 so round down to 326). So far this doesn't seem like an + * extreme limitation. + * + * \sa amp_model_t + */ +#define AMP_MAKE_MODEL(a,b) ((a)*100+(b)) + +/** Convenience macro to derive the backend family number from the model number. */ +#define AMP_BACKEND_NUM(a) ((a)/100) + /** * \brief A macro that returns the model number for an unknown model. @@ -67,71 +83,63 @@ #define AMP_MODEL_NONE 0 +/** The `DUMMY` family. Also contains network models. */ +#define AMP_DUMMY 0 +/** Used in amp_reg.c for the `be_name`. */ +#define AMP_BACKEND_DUMMY "dummy" /** - * \brief A macro that returns the model number for the DUMMY backend. + * \brief A macro that returns the model number for `DUMMY`. * - * \def AMP_MODEL_DUMMY - * - * The DUMMY backend, as the name suggests, is a backend which performs no + * The `DUMMY` model, as the name suggests, is a model 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) +/** + * \brief A macro that returns the model number for `NETAMPCTL`. + * + * The `NETAMPCTL` model allows use of the `ampctld` daemon through the normal + * Hamlib C API. + */ #define AMP_MODEL_NETAMPCTL AMP_MAKE_MODEL(AMP_DUMMY, 2) +/** The `ELECRAFT` family. */ +#define AMP_ELECRAFT 2 +/** Used in amp_reg.c for the `be_name`. */ +#define AMP_BACKEND_ELECRAFT "elecraft" /** - * \brief A macro that returns the model number of the KPA1500 backend. + * \brief A macro that returns the model number of `KPA1500`. * - * \def AMP_MODEL_ELECRAFT_KPA1500 - * - * The KPA1500 backend can be used with amplifiers that support the Elecraft + * The `KPA1500` model 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) + +/** The `GEMINI` family. */ +#define AMP_GEMINI 3 +/** Used in amp_reg.c for the `be_name`. */ +#define AMP_BACKEND_GEMINI "gemini" /** - * \brief A macro that returns the model number of the DX1200 backend. - * - * \def AMP_MODEL_GEMINI_DX1200 + * \brief A macro that returns the model number of `DX1200`. * * The Gemini DX1200 covers 160 trhough 4 meters. */ -//! @cond Doxygen_Suppress -#define AMP_GEMINI 3 -#define AMP_BACKEND_GEMINI "gemini" -//! @endcond #define AMP_MODEL_GEMINI_DX1200 AMP_MAKE_MODEL(AMP_GEMINI, 1) + +/** The `EXPERT` family. */ +#define AMP_EXPERT 4 +/** Used in amp_reg.c for the `be_name`. */ +#define AMP_BACKEND_EXPERT "expert" /** - * \brief A macro that returns the model number of the FA backend. - * - * \def AMP_MODEL_EXPERT_FA + * \brief A macro that returns the model number of `FA`. * * The Expert FA series of amplifiers is supported by this backend. */ -//! @cond Doxygen_Suppress -#define AMP_EXPERT 4 -#define AMP_BACKEND_EXPERT "expert" -//! @endcond #define AMP_MODEL_EXPERT_FA AMP_MAKE_MODEL(AMP_EXPERT, 1) From 7cceee9abad13888f5705feef5330904eb06bf31 Mon Sep 17 00:00:00 2001 From: Nate Bargmann Date: Sat, 26 Jul 2025 18:32:34 -0500 Subject: [PATCH 09/14] Complete Doxygen comments for rotlist.h Add new topic for rotator model list. --- doc/index.doxygen | 3 +- include/hamlib/rotlist.h | 548 +++++++++++++++++++++------------------ 2 files changed, 302 insertions(+), 249 deletions(-) diff --git a/doc/index.doxygen b/doc/index.doxygen index 46f7f73ba..7fb7a9ebb 100644 --- a/doc/index.doxygen +++ b/doc/index.doxygen @@ -193,9 +193,10 @@ GNU/Linux. * \defgroup riglist Rig (radio) Model List * \defgroup rig_internal Rig (transceiver) Internal API * \defgroup rotator Rotator API + * \defgroup rotlist Rotator Model List * \defgroup rot_internal Rotator Internal API * \defgroup amplifier Amplifier API - * \defgroup amplist Amplifier model list + * \defgroup amplist Amplifier Model list * \defgroup amp_internal Amplifier Internal API * \defgroup port Port data structure for accessing devices * \defgroup utilities Utility Routines API diff --git a/include/hamlib/rotlist.h b/include/hamlib/rotlist.h index 567aa59e6..e50fdc46d 100644 --- a/include/hamlib/rotlist.h +++ b/include/hamlib/rotlist.h @@ -24,17 +24,12 @@ #ifndef _ROTLIST_H #define _ROTLIST_H 1 -//! @cond Doxygen_Suppress -#define ROT_MAKE_MODEL(a,b) (100*(a)+(b)) -#define ROT_BACKEND_NUM(a) ((a)/100) -//! @endcond - - /** - * \addtogroup rotator + * \addtogroup rotlist * @{ */ + /** * \brief Hamlib rotator model definitions. * @@ -54,6 +49,27 @@ * wishes to use which is passed to the rot_init() API call. */ +/** + * \brief The rotator model number is held in a signed integer. + * + * Model numbers are a simple decimal value that increments by a value of + * 100 for each backend, e.g. the `DUMMY` backend has model numbers 1 + * to 100, the `EASYCOMM` backend has model numbers 201 to 300 and so on + * (101 to 200 is currently unassigned). + * + * \note A limitation is that with ::rot_model_t being a signed integer that on + * some systems such a value may be 16 bits. This limits the number of backends + * to 326 of 100 models each (32768 / 100 thus leaving only 68 models for + * backend number 327 so round down to 326). So far this doesn't seem like an + * extreme limitation. + * + * \sa rot_model_t + */ +#define ROT_MAKE_MODEL(a,b) (100*(a)+(b)) + +/** Convenience macro to derive the backend family number from the model number. */ +#define ROT_BACKEND_NUM(a) ((a)/100) + /** * \brief A macro that returns the model number for an unknown model. * @@ -65,56 +81,62 @@ #define ROT_MODEL_NONE 0 +/** The `DUMMY` family. Also contains network models. */ +#define ROT_DUMMY 0 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_DUMMY "dummy" + /** - * \brief A macro that returns the model number for the DUMMY backend. + * \brief A macro that returns the model number for `DUMMY`. * * \def ROT_MODEL_DUMMY * - * The DUMMY backend, as the name suggests, is a backend which performs + * The `DUMMY` model, 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. + * \brief A macro that returns the model number for `NETROTCTL`. * * \def ROT_MODEL_NETROTCTL * - * The NETROTCTL backend allows use of the `rotctld` daemon through the normal + * The `NETROTCTL` model allows use of the `rotctld` daemon through the normal * Hamlib API. */ /** - * \brief A macro that returns the model number for the PSTROTATOR backend. + * \brief A macro that returns the model number for `PSTROTATOR`. * * \def ROT_MODEL_PSTROTATOR * - * The PSTROTATOR backend allows Hamlib clients to access the rotators controlled + * The `PSTROTATOR` model allows Hamlib clients to access the rotators controlled * by the PstRotator software by YO3DMU: https://www.qsl.net/yo3dmu/index_Page346.htm */ /** - * \brief A macro that returns the model number for the SATROTCTL backend. + * \brief A macro that returns the model number for `SATROTCTL`. * * \def ROT_MODEL_SATROTCTL * - * The SATROTCTL allows Hamlib clients to access the rotators controlled by + * The `SATROTCTL` model allows Hamlib clients to access the rotators controlled by * the S.A.T hardware by CSN Tecnologies: http://csntechnologies.net/ */ -//! @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) #define ROT_MODEL_PSTROTATOR ROT_MAKE_MODEL(ROT_DUMMY, 3) #define ROT_MODEL_SATROTCTL ROT_MAKE_MODEL(ROT_DUMMY, 4) +/** The `EASYCOMM` family. */ +#define ROT_EASYCOMM 2 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_EASYCOMM "easycomm" + /** - * \brief A macro that returns the model number of the EASYCOMM 1 backend. + * \brief A macro that returns the model number of `EASYCOMM1`. * * \def ROT_MODEL_EASYCOMM1 * - * The EASYCOMM1 backend can be used with rotators that support the EASYCOMM + * The `EASYCOMM1` model can be used with rotators that support the EASYCOMM * I Standard. */ /** @@ -122,7 +144,7 @@ * * \def ROT_MODEL_EASYCOMM2 * - * The EASYCOMM2 backend can be used with rotators that support the EASYCOMM + * The EASYCOMM2 model can be used with rotators that support the EASYCOMM * II Standard. */ /** @@ -130,84 +152,82 @@ * * \def ROT_MODEL_EASYCOMM3 * - * The EASYCOMM3 backend can be used with rotators that support the EASYCOMM + * The EASYCOMM3 model 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) +/** The `FODTRACK` family. */ +#define ROT_FODTRACK 3 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_FODTRACK "fodtrack" + /** - * \brief A macro that returns the model number of the FODTRACK backend. + * \brief A macro that returns the model number of `FODTRACK`. * * \def ROT_MODEL_FODTRACK * - * The FODTRACK backend can be used with rotators that support the FODTRACK + * The `FODTRACK model` 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) +/** The `ROTOREZ` family. */ +#define ROT_ROTOREZ 4 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_ROTOREZ "rotorez" + /** - * \brief A macro that returns the model number of the ROTOREZ backend. + * \brief A macro that returns the model number of `ROTOREZ`. * * \def ROT_MODEL_ROTOREZ * - * The ROTOREZ backend can be used with Hy-Gain rotators that support the + * The `ROTOREZ` model 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. + * \brief A macro that returns the model number of `ROTORCARD`. * * \def ROT_MODEL_ROTORCARD * - * The ROTORCARD backend can be used with Yaesu rotators that support the + * The `ROTORCARD` model 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. + * \brief A macro that returns the model number of `DCU`. * * \def ROT_MODEL_DCU * - * The DCU backend can be used with rotators that support the DCU command set + * The `DCU` model 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. + * \brief A macro that returns the model number of `ERC`. * * \def ROT_MODEL_ERC * - * The ERC backend can be used with rotators that support the DCU command set + * The `ERC` model 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. + * \brief A macro that returns the model number of `RT21`. * * \def ROT_MODEL_RT21 * - * The RT21 backend can be used with rotators that support the DCU command set + * The `RT21` model can be used with rotators that support the DCU command set * by Green Heron (currently the RT-21). */ /** - * \brief A macro that returns the model number of the YRC-1 backend. + * \brief A macro that returns the model number of `YRC-1`. * * \def ROT_MODEL_YRC1 * - * The YRC1 backend can be used with rotators that support the DCU 2/3 command set + * The `YRC1` model can be used with rotators that support the DCU 2/3 command set */ -//! @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) @@ -217,135 +237,139 @@ #define ROT_MODEL_RT21 ROT_MAKE_MODEL(ROT_ROTOREZ, 5) +/** The `SARTEK` family. */ +#define ROT_SARTEK 5 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_SARTEK "sartek" + /** - * \brief A macro that returns the model number of the SARTEK1 backend. + * \brief A macro that returns the model number of `SARTEK1`. * * \def ROT_MODEL_SARTEK1 * - * The SARTEK1 backend can be used with rotators that support the SARtek + * The `SARTEK1` model 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) +/** The `GS232A` family. */ +#define ROT_GS232A 6 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_GS232A "gs232a" + /** - * \brief A macro that returns the model number of the GS232A backend. + * \brief A macro that returns the model number of `GS232A`. * * \def ROT_MODEL_GS232A * - * The GS232A backend can be used with rotators that support the GS-232A + * The `GS232A` model can be used with rotators that support the GS-232A * protocol. */ /** - * \brief A macro that returns the model number of the GS232 backend. + * \brief A macro that returns the model number of `GS232_GENERIC`. * * \def ROT_MODEL_GS232_GENERIC * - * The GS232_GENERIC backend can be used with rotators that support the + * The` GS232_GENERIC` model 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 GS232 backend. - * - * \def ROT_MODEL_AF6SA_WRC - * - * 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. + * \brief A macro that returns the model number of `GS232B`. * * \def ROT_MODEL_GS232B * - * The GS232B backend can be used with rotators that support the GS232B + * The `GS232B` model can be used with rotators that support the GS232B * protocol. */ /** - * \brief A macro that returns the model number of the F1TETRACKER backend. + * \brief A macro that returns the model number of `F1TETRACKER`. * * \def ROT_MODEL_F1TETRACKER * - * The F1TETRACKER backend can be used with rotators that support the F1TE + * The `F1TETRACKER` model can be used with rotators that support the F1TE * Tracker protocol. */ /** - * \brief A macro that returns the model number of the GS23 backend. + * \brief A macro that returns the model number of `GS23`. * * \def ROT_MODEL_GS23 * - * The GS23 backend can be used with rotators that support the GS-23 protocol. + * The `GS23` model can be used with rotators that support the GS-23 protocol. */ /** - * \brief A macro that returns the model number of the GS232 backend. + * \brief A macro that returns the model number of `GS232`. * * \def ROT_MODEL_GS232 * - * The GS232 backend can be used with rotators that support the GS-232 + * The `GS232` model can be used with rotators that support the GS-232 * protocol. */ /** - * \brief A macro that returns the model number of the LVB backend. + * \brief A macro that returns the model number of `LVB`. * * \def ROT_MODEL_LVB * - * The LVB backend can be used with rotators that support the G6LVB AMSAT LVB + * The `LVB` model 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. + * \brief A macro that returns the model number of `ST2`. * * \def ROT_MODEL_ST2 * - * The ST2 backend can be used with rotators that support the Fox Delta ST2 + * The `ST2` model 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. + * \brief A macro that returns the model number of `GS232A_AZ` Azimuth. * * \def ROT_MODEL_GS232A_AZ * - * The GS232A_AZ backend can be used with azimuth rotators that support the + * The `GS232A_AZ` model 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. + * \brief A macro that returns the model number of `GS232A_EL` Elevation. * * \def ROT_MODEL_GS232A_EL * - * The GS232A_EL backend can be used with elevation rotators that support the + * The `GS232A_EL` model 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. + * \brief A macro that returns the model number of ` GS232B_AZ` Azimuth. * * \def ROT_MODEL_GS232B_AZ * - * The GS232B_AZ backend can be used with azimuth rotators that support the + * The `GS232B_AZ` model 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. + * \brief A macro that returns the model number of `GS232B_EL` Elevation. * * \def ROT_MODEL_GS232B_EL * - * The GS232B_EL backend can be used with elevation rotators that support the + * The `GS232B_EL` model can be used with elevation rotators that support the * GS-232B protocol. */ /** - * \brief A macro that returns the model number of the GS23_AZ azimuth backend. + * \brief A macro that returns the model number of `GS23_AZ` azimuth. * * \def ROT_MODEL_GS23_AZ * - * The GS23_AZ backend can be used with azimuth rotators that support a + * The `GS23_AZ` model can be used with azimuth rotators that support a * generic version of the GS-232A protocol. */ +/** + * \brief A macro that returns the model number of `AF6SA_WRC`. + * + * \def ROT_MODEL_AF6SA_WRC + * + * The `AF6SA_WRC` model can be used with the AF6SA controller. + * http://af6sa.com/projects/wrc.html + */ //! @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 */ @@ -362,327 +386,348 @@ #define ROT_MODEL_GS23_AZ ROT_MAKE_MODEL(ROT_GS232A, 13) #define ROT_MODEL_AF6SA_WRC ROT_MAKE_MODEL(ROT_GS232A, 14) -// Add documentation when this model is implemented. //! @cond Doxygen_Suppress -#define ROT_ARRAYSOLUTIONS 7 +/** The `ARRAYSOLUTIONS` family. */ +#define ROT_ARRAYSOLUTIONS 327 // Adjust value when implemented. +/** Used in register.c for the `be_name`. */ #define ROT_BACKEND ARRAYSOLUTIONS "arraysolutions" +// Add documentation when this model is implemented. #define ROT_MODEL_ARRAYSOLUTIONS_SAL_12_20_30 ROT_MAKE_MODEL(ROT_ARRAYSOLUTIONS, 1) //! @endcond +/** The `KIT` family. */ +#define ROT_KIT 7 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_KIT "kit" + /** - * \brief A macro that returns the model number of the PCROTOR backend. + * \brief A macro that returns the model number of `PCROTOR`. * * \def ROT_MODEL_PCROTOR * - * The PCROTOR backend is a member of the kit backend group that can be used + * The `PCROTOR` model 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) +/** The `HEATHKIT` family. */ +#define ROT_HEATHKIT 8 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_HEATHKIT "heathkit" + /** - * \brief A macro that returns the model number of the HD1780 backend. + * \brief A macro that returns the model number of `HD1780`. * * \def ROT_MODEL_HD1780 * - * The HD1780 backend can be used with rotators that support the Heathkit + * The `HD1780` model 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) +/** The `SPID` family. */ +#define ROT_SPID 9 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_SPID "spid" + /** - * \brief A macro that returns the model number of the ROT2PROG backend. + * \brief A macro that returns the model number of `ROT2PROG`. * * \def ROT_MODEL_SPID_ROT2PROG * - * The SPID_ROT2PROG backend can be used with rotators that support the SPID + * The `SPID_ROT2PROG` model 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. + * \brief A macro that returns the model number of `ROT1PROG`. * * \def ROT_MODEL_SPID_ROT1PROG * - * The SPID_ROT1PROG backend can be used with rotators that support the SPID + * The `SPID_ROT1PROG` model 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. + * \brief A macro that returns the model number of `SPID_MD01_ROT2PROG`. * * \def ROT_MODEL_SPID_MD01_ROT2PROG * - * The SPID_MD01_ROT2PROG backend can be used with rotators that support the + * The `SPID_MD01_ROT2PROG` model 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) +/** The `M2` family. */ +#define ROT_M2 10 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_M2 "m2" + /** - * \brief A macro that returns the model number of the RC2800 backend. + * \brief A macro that returns the model number of `RC2800`. * * \def ROT_MODEL_RC2800 * - * The RC2800 backend can be used with rotators that support the M2 (M + * The `RC2800` model 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. + * \brief A macro that returns the model number of `RC2800_EARLY_AZ`. * * \def ROT_MODEL_RC2800_EARLY_AZ * - * The RC2800_EARLY_AZ backend can be used with rotators that support the M2 + * The `RC2800_EARLY_AZ` model 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. + * \brief A macro that returns the model number of `RC2800_EARLY_AZEL`. * * \def ROT_MODEL_RC2800_EARLY_AZEL * - * The RC2800_EARLY_AZEL backend can be used with rotators that support the M2 + * The `RC2800_EARLY_AZEL` model 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) +/** The `ARS` family. */ +#define ROT_ARS 11 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_ARS "ars" + /** - * \brief A macro that returns the model number of the RCI_AZEL backend. + * \brief A macro that returns the model number of `RCI_AZEL`. * * \def ROT_MODEL_RCI_AZEL * - * The RCI_AZEL backend can be used with rotators that support the ARS azimuth + * The `RCI_AZEL` model 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. + * \brief A macro that returns the model number of `RCI_AZ`. * * \def ROT_MODEL_RCI_AZ * - * The RCI_AZ backend can be used with rotators that support the ARS azimuth + * The `RCI_AZ` model 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) +/** The `AMSAT` family. */ +#define ROT_AMSAT 12 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_AMSAT "amsat" + /** - * \brief A macro that returns the model number of the IF100 backend. + * \brief A macro that returns the model number of `IF100`. * * \def ROT_MODEL_IF100 * - * The IF100 backend can be used with rotators that support the AMSAT IF-100 + * The `IF100` model 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) +/** The `TS7400` family. */ +#define ROT_TS7400 13 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_TS7400 "ts7400" + /** - * \brief A macro that returns the model number of the TS7400 backend. + * \brief A macro that returns the model number of `TS7400`. * * \def ROT_MODEL_TS7400 * - * The TS7400 backend supports an embedded ARM board using the TS-7400 Linux + * The `TS7400` model 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) +/** The `CELESTRON` family. */ +#define ROT_CELESTRON 14 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_CELESTRON "celestron" + /** - * \brief A macro that returns the model number of the NEXSTAR backend. + * \brief A macro that returns the model number of `NEXSTAR`. * * \def ROT_MODEL_NEXSTAR * - * The NEXSTAR backend can be used with rotators that support the Celestron + * The `NEXSTAR` model 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) +/** The `ETHER6` family. */ +#define ROT_ETHER6 15 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_ETHER6 "ether6" + /** - * \brief A macro that returns the model number of the ETHER6 backend. + * \brief A macro that returns the model number of `ETHER6`. * * \def ROT_MODEL_ETHER6 * - * The ETHER6 backend can be used with rotators that support the Ether6 + * The `ETHER6` model 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) +/** The `CNCTRK` family. */ +#define ROT_CNCTRK 16 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_CNCTRK "cnctrk" + /** - * \brief A macro that returns the model number of the CNCTRK backend. + * \brief A macro that returns the model number of `CNCTRK`. * * \def ROT_MODEL_CNCTRK * - * The CNCTRK backend can be used with rotators that support the LinuxCNC + * The `CNCTRK` model 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) +/** The `PROSISTEL` family. */ +#define ROT_PROSISTEL 17 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_PROSISTEL "prosistel" + /** - * \brief A macro that returns the model number of the PROSISTEL_D_AZ backend. + * \brief A macro that returns the model number of `PROSISTEL_D_AZ`. * * \def ROT_MODEL_PROSISTEL_D_AZ * - * The PROSISTEL_D_AZ backend can be used with rotators that support the Prosistel + * The `PROSISTEL_D_AZ` model 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. + * \brief A macro that returns the model number of `PROSISTEL_D_EL`. * * \def ROT_MODEL_PROSISTEL_D_EL * - * The PROSISTEL_D_EL backend can be used with rotators that support the Prosistel + * The `PROSISTEL_D_EL` model 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. + * \brief A macro that returns the model number of `PROSISTEL_COMBI_TRACK_AZEL`. * * \def ROT_MODEL_PROSISTEL_COMBI_TRACK_AZEL * - * The PROSISTEL_AZEL_COMBI_TRACK_AZEL backend can be used with rotators that + * The `PROSISTEL_AZEL_COMBI_TRACK_AZEL` model can be used with rotators that * support the Prosistel combination azimuth and elevation protocol. */ /** - * \brief A macro that returns the model number of the PROSISTEL_D_EL_CBOXAZ - * backend. + * \brief A macro that returns the model number of `PROSISTEL_D_EL_CBOXAZ`. * * \def ROT_MODEL_PROSISTEL_D_EL_CBOXAZ * - * The PROSISTEL_D_EL_CBOXAZ backend can be used with the elevation rotator + * The `PROSISTEL_D_EL_CBOXAZ` model can be used with the elevation rotator * with Control Box D using azimuth logic. */ -//! @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) #define ROT_MODEL_PROSISTEL_D_EL_CBOXAZ ROT_MAKE_MODEL(ROT_PROSISTEL, 4) +/** The `MEADE` family. */ +#define ROT_MEADE 18 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_MEADE "meade" + /** - * \brief A macro that returns the model number of the MEADE backend. + * \brief A macro that returns the model number of `MEADE`. * * \def ROT_MODEL_MEADE * - * The MEADE backend can be used with Meade telescope rotators like the + * The `MEADE` model 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) + +/** The `IOPTRON` family. */ +#define ROT_IOPTRON 19 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_IOPTRON "ioptron" + /** - * \brief A macro that returns the model number of the IOPTRON backend. + * \brief A macro that returns the model number of `IOPTRON`. * * \def ROT_MODEL_IOPTRON * - * The IOPTRON backend can be used with IOPTRON telescope mounts. + * The `IOPTRON` model 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) +/** The `INDI` family. */ +#define ROT_INDI 20 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_INDI "indi" + /** - * \brief A macro that returns the model number of the INDI backend. + * \brief A macro that returns the model number of `INDI`. * * \def ROT_MODEL_INDI * - * The INDI backend can be used with rotators that support the INDI interface. + * The `INDI` model 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) +/** The `SATEL` family. */ +#define ROT_SATEL 21 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_SATEL "satel" + /** - * \brief A macro that returns the model number of the SATEL backend. + * \brief A macro that returns the model number of `SATEL`. * * \def ROT_MODEL_SATEL * - * The SATEL backend can be used with rotators that support the VE5FP + * The `SATEL` model 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) +/** The `RADANT` family. */ +#define ROT_RADANT 22 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_RADANT "radant" + /** - * \brief A macro that returns the model number of the RADANT backend. + * \brief A macro that returns the model number of `RADANT`. * * \def ROT_MODEL_RADANT * - * The RADANT backend can be used with rotators that support the MS232 + * The `RADANT` model 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) + +/** The `ANDROIDSENSOR` family. */ +#define ROT_ANDROIDSENSOR 23 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_ANDROIDSENSOR "androidsensor" + /** - * \brief A macro that returns the model number of the ANDROIDSENSOR backend. + * \brief A macro that returns the model number of `ANDROIDSENSOR`. * * \def ROT_MODEL_ANDROIDSENSOR * @@ -691,89 +736,96 @@ * attitude determination for your antenna and the phone tied to it. Now you * can wave your antenna to find radio signals. */ -//! @cond Doxygen_Suppress -#define ROT_ANDROIDSENSOR 23 -#define ROT_BACKEND_ANDROIDSENSOR "androidsensor" -//! @endcond #define ROT_MODEL_ANDROIDSENSOR ROT_MAKE_MODEL(ROT_ANDROIDSENSOR, 1) + +/** The `GRBLTRK` family. */ +#define ROT_GRBLTRK 24 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_GRBLTRK "grbltrk" + /** - * \brief A macro that returns the model number of the ROT_MODEL_GRBLTRK_SER backend. + * \brief A macro that returns the model number of `ROT_MODEL_GRBLTRK_SER`. * * \def ROT_MODEL_GRBLTRK_SER * - * The GRBLTRK backend can be used with rotators that support the GRBL - * protocol. + * The `GRBLTRK_SER` model can be used with rotators that support the GRBL + * serial protocol. */ /** - * \brief A macro that returns the model number of the ROT_MODEL_GRBLTRK_NET backend. + * \brief A macro that returns the model number of `ROT_MODEL_GRBLTRK_NET`. * * \def ROT_MODEL_GRBLTRK_NET * - * The GRBLTRK backend can be used with rotators that support the GRBL - * protocol. + * The `GRBLTRK_NET` model can be used with rotators that support the GRBL + * network protocol. */ -//! @cond Doxygen_Suppress -#define ROT_GRBLTRK 24 -#define ROT_BACKEND_GRBLTRK "grbltrk" -//! @endcond #define ROT_MODEL_GRBLTRK_SER ROT_MAKE_MODEL(ROT_GRBLTRK, 1) #define ROT_MODEL_GRBLTRK_NET ROT_MAKE_MODEL(ROT_GRBLTRK, 2) + +/** The `FLIR` family. */ +#define ROT_FLIR 25 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_FLIR "flir" + /** - * \brief A macro that returns the model number of the FLIR backend. + * \brief A macro that returns the model number of `FLIR`. * * \def ROT_MODEL_FLIR * - * The FLIR backend can be used with FLIR and DirectedPercepition + * The `FLIR` model can be used with FLIR and DirectedPercepition * rotators using the PTU protocol (e.g. PTU-D48). Currently only * the serial interface is supported and no ethernet. */ -//! @cond Doxygen_Suppress -#define ROT_FLIR 25 -#define ROT_BACKEND_FLIR "flir" -//! @endcond #define ROT_MODEL_FLIR ROT_MAKE_MODEL(ROT_FLIR, 1) + +/** The `APEX` family. */ +#define ROT_APEX 26 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_APEX "apex" + /** - * \brief A macro that returns the model number of the APEX backend. + * \brief A macro that returns the model number of `APEX`. * * \def ROT_MODEL_APEX_SHARED_LOOP * - * The APEX backend can be used with APEX * rotators. + * The `APEX` model can be used with APEX * rotators. */ -//! @cond Doxygen_Suppress -#define ROT_APEX 26 -#define ROT_BACKEND_APEX "apex" -//! @endcond #define ROT_MODEL_APEX_SHARED_LOOP ROT_MAKE_MODEL(ROT_APEX, 1) + +/** The `SAEBRTRACK` family. */ +#define ROT_SAEBRTRACK 27 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_SAEBRTRACK "SAEBRTrack" + /** - * \brief A macro that returns the model number of the SAEBRTRACK backend. + * \brief A macro that returns the model number of `SAEBRTRACK`. * * \def ROT_MODEL_SAEBRTRACK * - * The SAEBRTRACK backend can be used with SAEBRTRACK * rotators. + * The `SAEBRTRACK` model can be used with SAEBRTRACK * rotators. */ -//! @cond Doxygen_Suppress -#define ROT_SAEBRTRACK 27 -#define ROT_BACKEND_SAEBRTRACK "SAEBRTrack" -//! @endcond #define ROT_MODEL_SAEBRTRACK ROT_MAKE_MODEL(ROT_SAEBRTRACK, 1) + +/** The `SKYWATCHER` family. */ +#define ROT_SKYWATCHER 28 +/** Used in register.c for the `be_name`. */ +#define ROT_BACKEND_SKYWATCHER "SkyWatcher" + /** - * \brief A macro that returns the model number of the SKYWATCHER backend. + * \brief A macro that returns the model number of `SKYWATCHER`. * * \def ROT_MODEL_SKYWATCHER * - * The SKYWATCHER backend can be used with SKYWATCHER * rotators. + * The `SKYWATCHER` model can be used with SKYWATCHER * rotators. */ -//! @cond Doxygen_Suppress -#define ROT_SKYWATCHER 28 -#define ROT_BACKEND_SKYWATCHER "SkyWatcher" -//! @endcond #define ROT_MODEL_SKYWATCHER ROT_MAKE_MODEL(ROT_SKYWATCHER, 1) + /** * \brief Convenience type definition for a rotator model. * From c3ec11e5f7636ebe0912b43f59804aae326ee917 Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Sun, 29 Jun 2025 19:18:48 +0200 Subject: [PATCH 10/14] Allow to execute some tests with a simulator or with a real rig To execute the tests with the installed Hamlib use the same long arguments as rigctl, eg: bindings/python/test_rig.py --model {MODEL_NUMBER} --rig-file /dev/ttyUSB0 --serial-speed {BAUD} To execute the tests from the build tree, add the path to the libraries that you built, eg. from the root of the build tree: PYTHONPATH=bindings/:bindings/.libs/ ...your command... --- bindings/python/conftest.py | 30 ++++++++++++++++++++++++++++++ bindings/python/test_rig.py | 29 +++++++++++++++++------------ 2 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 bindings/python/conftest.py diff --git a/bindings/python/conftest.py b/bindings/python/conftest.py new file mode 100644 index 000000000..d3d435e98 --- /dev/null +++ b/bindings/python/conftest.py @@ -0,0 +1,30 @@ +"""Tests of the Python bindings for Hamlib +""" +import pytest + +def pytest_addoption(parser): + # using long options only because short options conflict with pytest's + parser.addoption('--model', type=int, default=1, + metavar='ID', help='select radio model number') + parser.addoption('--rig-file', default=None, + metavar='DEVICE', help='set device of the radio to operate on') + parser.addoption('--serial-speed', type=int, default=0, + metavar='BAUD', help='set serial speed of the serial port') + parser.addoption('--hamlib-verbose', action='count', default=0, + help='set verbose mode, cumulative') + +@pytest.fixture +def model(request): + return request.config.getoption("--model") + +@pytest.fixture +def rig_file(request): + return request.config.getoption("--rig-file") + +@pytest.fixture +def serial_speed(request): + return request.config.getoption("--serial-speed") + +@pytest.fixture +def hamlib_verbose(request): + return request.config.getoption("--hamlib-verbose") diff --git a/bindings/python/test_rig.py b/bindings/python/test_rig.py index 1c3927cb0..2de41ec71 100755 --- a/bindings/python/test_rig.py +++ b/bindings/python/test_rig.py @@ -5,20 +5,18 @@ Running this script directly will use the installed bindings. For an in-tree run use "make check", or set PYTHONPATH to point to the directories containing Hamlib.py and _Hamlib.so. """ -from pytest import raises +import pytest import Hamlib Hamlib.rig_set_debug(Hamlib.RIG_DEBUG_NONE) -RIG_MODEL = Hamlib.RIG_MODEL_DUMMY - class TestClass: """Container class for tests""" - def test_without_open(self): + def test_without_open(self, model): """Call all the methods that do not depend on open()""" - rig = Hamlib.Rig(RIG_MODEL) + rig = Hamlib.Rig(model) assert rig is not None assert rig.do_exception == 0 assert rig.error_status == Hamlib.RIG_OK @@ -35,17 +33,22 @@ class TestClass: assert isinstance(conf, str) assert rig.set_conf("mcfg", "foo") is None conf = rig.get_conf("mcfg") - assert conf == "foo" + if model == Hamlib.RIG_MODEL_DUMMY: + assert conf == "foo" + else: + assert conf == "" assert rig.token_lookup("") is None - def test_with_open(self): + def test_with_open(self, model, rig_file, serial_speed): """Call all the methods that depend on open()""" - rig = Hamlib.Rig(RIG_MODEL) + rig = Hamlib.Rig(model) assert rig is not None assert rig.state.comm_state == 0 + assert rig.set_conf("rig_pathname", rig_file) is None + assert rig.set_conf("serial_speed", str(serial_speed)) is None assert rig.open() is None assert rig.state.comm_state == 1 info = rig.get_info() @@ -70,9 +73,10 @@ class TestClass: assert info is None - def test_misc(self): + @pytest.mark.skipif('config.getoption("model") != Hamlib.RIG_MODEL_DUMMY') + def test_misc(self, model): """Just call all the methods""" - rig = Hamlib.Rig(RIG_MODEL) + rig = Hamlib.Rig(model) assert rig is not None assert rig.close() is None @@ -213,9 +217,10 @@ class TestClass: assert rig.vfo_op(0, 0) is None - def test_object_creation(self): + @pytest.mark.skipif('config.getoption("model") != Hamlib.RIG_MODEL_DUMMY') + def test_object_creation(self, model): """Create all objects available""" - rig = Hamlib.Rig(RIG_MODEL) + rig = Hamlib.Rig(model) assert rig is not None assert isinstance(rig.caps, Hamlib.rig_caps) From ede84bfce41bf8da3dafea7c585666259a5e4b71 Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Sun, 27 Jul 2025 08:39:02 +0200 Subject: [PATCH 11/14] Also check the "val" parameter in rig_set_conf() Avoids a segfault in lower level functions that can more easily happen when using the bindings. Simmetric with rig_get_conf() via rig_get_conf2(). --- src/conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf.c b/src/conf.c index 41349ec1e..ef845dcde 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1477,7 +1477,7 @@ int HAMLIB_API rig_set_conf(RIG *rig, hamlib_token_t token, const char *val) { rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); - if (!rig || !rig->caps) + if (!rig || !rig->caps || !val) { return -RIG_EINVAL; } From eefdda51e5451c9b470d84e4fdfc834e254f5d3a Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Sun, 27 Jul 2025 11:04:52 +0200 Subject: [PATCH 12/14] Update documentation for Python tests --- README.developer | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.developer b/README.developer index bdca0f715..177717f09 100644 --- a/README.developer +++ b/README.developer @@ -481,6 +481,21 @@ autogenerated tests must be updated: and the handwritten tests should be updated to reflect the change. +The Python tests can also be run against a simulator or an actual rig, but +they aren't guaranteed to succeed because the CI only tests the dummy rig. +To execute the tests from the build tree, add the path to the libraries +that you built, using the PYTHONPATH environment variable, eg: + PYTHONPATH=bindings/:bindings/.libs/ bindings/python/test_rig.py \ + --model 1035 --rig-file /dev/ttyUSB0 --serial-speed 4800 + +Only the following long arguments are supported: + --model ID + --rig-file DEVICE + --serial-speed BAUD + --hamlib-verbose +The argument --hamlib-verbose can be repeated as many times as the --verbose +argument accepted by rigctl. + 1.4. Feedback From 6088445635876162b47a9d59d4ce70a7d1fef128 Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Sun, 27 Jul 2025 12:53:23 +0200 Subject: [PATCH 13/14] Allow to execute some tests with a simulator or with a real rotator To execute the tests with the installed Hamlib use the same long arguments as rotctl, eg: bindings/python/test_rot.py --model {MODEL_NUMBER} --rot-file /dev/ttyUSB0 --serial-speed {BAUD} To execute the tests from the build tree, add the path to the libraries that you built, eg. from the root of the build tree: PYTHONPATH=bindings/:bindings/.libs/ ...your command... --- bindings/python/conftest.py | 15 +++++++++++---- bindings/python/test_rot.py | 19 ++++++++++--------- 2 files changed, 21 insertions(+), 13 deletions(-) mode change 100644 => 100755 bindings/python/test_rot.py diff --git a/bindings/python/conftest.py b/bindings/python/conftest.py index d3d435e98..89ba590d9 100644 --- a/bindings/python/conftest.py +++ b/bindings/python/conftest.py @@ -1,13 +1,20 @@ """Tests of the Python bindings for Hamlib """ import pytest +import sys def pytest_addoption(parser): # using long options only because short options conflict with pytest's - parser.addoption('--model', type=int, default=1, - metavar='ID', help='select radio model number') - parser.addoption('--rig-file', default=None, - metavar='DEVICE', help='set device of the radio to operate on') + if sys.argv[1].endswith("rig.py"): + parser.addoption('--model', type=int, default=1, + metavar='ID', help='select radio model number') + parser.addoption('--rig-file', default=None, + metavar='DEVICE', help='set device of the radio to operate on') + elif sys.argv[1].endswith("rot.py"): + parser.addoption('--model', type=int, default=1, + metavar='ID', help='select rotator model number') + parser.addoption('--rot-file', default=None, + metavar='DEVICE', help='set device of the rotator to operate on') parser.addoption('--serial-speed', type=int, default=0, metavar='BAUD', help='set serial speed of the serial port') parser.addoption('--hamlib-verbose', action='count', default=0, diff --git a/bindings/python/test_rot.py b/bindings/python/test_rot.py old mode 100644 new mode 100755 index f51ea46ce..c87835534 --- a/bindings/python/test_rot.py +++ b/bindings/python/test_rot.py @@ -11,8 +11,6 @@ import Hamlib Hamlib.rig_set_debug(Hamlib.RIG_DEBUG_NONE) -ROT_MODEL = Hamlib.ROT_MODEL_DUMMY - class TestClass: """Container class for tests""" @@ -23,9 +21,9 @@ class TestClass: # TOK_EL_ROT_MAGICCOMBO = 5 # handled by get_ext_level/set_ext_level TOK_EL_ROT_MAGICEXTFUNC = 6 - def test_without_open(self): + def test_without_open(self, model): """Call all the methods that do not depend on open()""" - rot = Hamlib.Rot(ROT_MODEL) + rot = Hamlib.Rot(model) assert rot is not None assert rot.do_exception == 0 assert rot.error_status == Hamlib.RIG_OK @@ -42,14 +40,17 @@ class TestClass: assert isinstance(conf, str) assert rot.set_conf("mcfg", "foo") is None conf = rot.get_conf("mcfg") - assert conf == "foo" + if model == Hamlib.ROT_MODEL_DUMMY: + assert conf == "foo" + else: + assert conf == "" assert rot.token_lookup("") is None - def test_with_open(self): + def test_with_open(self, model): """Call all the methods that depend on open()""" - rot = Hamlib.Rot(ROT_MODEL) + rot = Hamlib.Rot(model) assert rot is not None assert rot.state.comm_state == 0 @@ -106,9 +107,9 @@ class TestClass: assert info is None - def test_object_creation(self): + def test_object_creation(self, model): """Create all objects available""" - rot = Hamlib.Rig(ROT_MODEL) + rot = Hamlib.Rig(model) assert rot is not None assert isinstance(rot.caps, Hamlib.rig_caps) From 0df9d1767eb7550e1f1668f62e6612e4fd2c442b Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Sun, 27 Jul 2025 12:57:35 +0200 Subject: [PATCH 14/14] Allow to execute some tests with a simulator or with a real amplifier To execute the tests with the installed Hamlib use the same long arguments as ampctl, eg: bindings/python/test_amp.py --model {MODEL_NUMBER} --amp-file /dev/ttyUSB0 --serial-speed {BAUD} To execute the tests from the build tree, add the path to the libraries that you built, eg. from the root of the build tree: PYTHONPATH=bindings/:bindings/.libs/ ...your command... --- bindings/python/conftest.py | 5 +++++ bindings/python/test_amp.py | 14 ++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/bindings/python/conftest.py b/bindings/python/conftest.py index 89ba590d9..4f5510778 100644 --- a/bindings/python/conftest.py +++ b/bindings/python/conftest.py @@ -5,6 +5,11 @@ import sys def pytest_addoption(parser): # using long options only because short options conflict with pytest's + if sys.argv[1].endswith("amp.py"): + parser.addoption('--model', type=int, default=1, + metavar='ID', help='select amplifier model number') + parser.addoption('--amp-file', default=None, + metavar='DEVICE', help='set device of the amplifier to operate on') if sys.argv[1].endswith("rig.py"): parser.addoption('--model', type=int, default=1, metavar='ID', help='select radio model number') diff --git a/bindings/python/test_amp.py b/bindings/python/test_amp.py index 9d6a1d738..1a0b5eac3 100755 --- a/bindings/python/test_amp.py +++ b/bindings/python/test_amp.py @@ -9,14 +9,12 @@ import Hamlib Hamlib.rig_set_debug(Hamlib.RIG_DEBUG_NONE) -AMP_MODEL = Hamlib.AMP_MODEL_DUMMY - class TestClass: """Container class for tests""" - def test_without_open(self): + def test_without_open(self, model): """Call all the methods that do not depend on open()""" - amp = Hamlib.Amp(AMP_MODEL) + amp = Hamlib.Amp(model) assert amp is not None assert amp.do_exception == 0 assert amp.error_status == Hamlib.RIG_OK @@ -38,9 +36,9 @@ class TestClass: assert amp.token_lookup("") is None - def test_with_open(self): + def test_with_open(self, model): """Call all the methods that depend on open()""" - amp = Hamlib.Amp(AMP_MODEL) + amp = Hamlib.Amp(model) assert amp is not None assert amp.state.comm_state == 0 @@ -70,9 +68,9 @@ class TestClass: assert info is None - def test_object_creation(self): + def test_object_creation(self, model): """Create all objects available""" - amp = Hamlib.Rig(AMP_MODEL) + amp = Hamlib.Rig(model) assert amp is not None assert isinstance(amp.caps, Hamlib.rig_caps)