Skip to content

Commit

Permalink
Hamlib 4.6 beta
Browse files Browse the repository at this point in the history
  • Loading branch information
PianetaRadio authored Mar 17, 2024
1 parent 46cad6b commit 17a3cf6
Show file tree
Hide file tree
Showing 9 changed files with 703 additions and 150 deletions.
23 changes: 13 additions & 10 deletions hamlib/amplifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/* SPDX-License-Identifier: LGPL-2.1-or-later */

#ifndef _AMPLIFIER_H
#define _AMPLIFIER_H 1
Expand Down Expand Up @@ -232,9 +233,9 @@ struct amp_caps
int (*set_freq)(AMP *amp, freq_t val); /*!< Pointer to backend implementation of ::amp_set_freq(). */
int (*get_freq)(AMP *amp, freq_t *val); /*!< Pointer to backend implementation of ::amp_get_freq(). */

int (*set_conf)(AMP *amp, token_t token, const char *val); /*!< Pointer to backend implementation of ::amp_set_conf(). */
int (*get_conf2)(AMP *amp, token_t token, char *val, int val_len); /*!< Pointer to backend implementation of ::amp_get_conf(). */
int (*get_conf)(AMP *amp, 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.. :()
Expand All @@ -244,8 +245,8 @@ struct amp_caps
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, token_t level, value_t *val); /*!< Pointer to backend implementation of ::amp_get_ext_level(). */
int (*set_ext_level)(AMP *amp, token_t level, value_t val); /*!< Pointer to backend implementation of ::amp_set_ext_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(). */

Expand Down Expand Up @@ -335,11 +336,11 @@ amp_cleanup HAMLIB_PARAMS((AMP *amp));

extern HAMLIB_EXPORT(int)
amp_set_conf HAMLIB_PARAMS((AMP *amp,
token_t token,
hamlib_token_t token,
const char *val));
extern HAMLIB_EXPORT(int)
amp_get_conf HAMLIB_PARAMS((AMP *amp,
token_t token,
hamlib_token_t token,
char *val));
extern HAMLIB_EXPORT(int)
amp_set_powerstat HAMLIB_PARAMS((AMP *amp,
Expand Down Expand Up @@ -407,7 +408,7 @@ extern HAMLIB_EXPORT(const struct confparams *)
amp_confparam_lookup HAMLIB_PARAMS((AMP *amp,
const char *name));

extern HAMLIB_EXPORT(token_t)
extern HAMLIB_EXPORT(hamlib_token_t)
amp_token_lookup HAMLIB_PARAMS((AMP *amp,
const char *name));

Expand All @@ -428,12 +429,12 @@ amp_ext_lookup HAMLIB_PARAMS((AMP *amp,

extern HAMLIB_EXPORT(int)
amp_get_ext_level HAMLIB_PARAMS((AMP *amp,
token_t token,
hamlib_token_t token,
value_t *val));

extern HAMLIB_EXPORT(int)
amp_set_ext_level HAMLIB_PARAMS((AMP *amp,
token_t token,
hamlib_token_t token,
value_t val));

extern HAMLIB_EXPORT(const char *) amp_strlevel(setting_t);
Expand All @@ -445,6 +446,8 @@ rig_ext_lookup HAMLIB_PARAMS((RIG *rig,
extern HAMLIB_EXPORT(setting_t) amp_parse_level(const char *s);
extern HAMLIB_EXPORT(const char *) amp_strlevel(setting_t);

extern HAMLIB_EXPORT(void *) amp_data_pointer(AMP *amp, rig_ptrx_t idx);

//! @endcond


Expand Down
5 changes: 5 additions & 0 deletions hamlib/amplist.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,15 @@
//! @endcond
#define AMP_MODEL_ELECRAFT_KPA1500 AMP_MAKE_MODEL(AMP_ELECRAFT, 1)
//#define AMP_MODEL_ELECRAFT_KPA500 AMP_MAKE_MODEL(AMP_ELECRAFT, 2)

#define AMP_GEMINI 3
#define AMP_BACKEND_GEMINI "gemini"
#define AMP_MODEL_GEMINI_DX1200 AMP_MAKE_MODEL(AMP_GEMINI, 1)

#define AMP_EXPERT 4
#define AMP_BACKEND_EXPERT "expert"
#define AMP_MODEL_EXPERT_FA AMP_MAKE_MODEL(AMP_EXPERT, 1)


/**
* \brief Convenience type definition for an amplifier model.
Expand Down
15 changes: 12 additions & 3 deletions hamlib/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
/* Frontend ABI version */
#define ABI_VERSION 4

/* Frontend Major version */
#define ABI_VERSION_MAJOR 4

/* Frontend Minor version */
#define ABI_VERSION_MINOR 6

/* Frontend Patch version */
#define ABI_VERSION_PATCH 0

/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
Expand Down Expand Up @@ -367,7 +376,7 @@
#define PACKAGE_NAME "Hamlib"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "Hamlib 4.5.5"
#define PACKAGE_STRING "Hamlib 4.6~git"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "hamlib"
Expand All @@ -376,7 +385,7 @@
#define PACKAGE_URL "http://www.hamlib.org"

/* Define to the version of this package. */
#define PACKAGE_VERSION "4.5.5"
#define PACKAGE_VERSION "4.6~git"

/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
Expand Down Expand Up @@ -416,7 +425,7 @@


/* Version number of package */
#define VERSION "4.5.5"
#define VERSION "4.6~git"

/* Define to 1 if on MINIX. */
/* #undef _MINIX */
Expand Down
Binary file modified hamlib/libhamlib.dll.a
Binary file not shown.
45 changes: 45 additions & 0 deletions hamlib/multicast.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//include <stdio.h>
//#include <stdlib.h>
//#include <string.h>
//#include <errno.h>
//#include <unistd.h>
#include <hamlib/rig.h>
//#include <sys/socket.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#endif

#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif

#ifndef MULTICAST_H
#define MULTICAST_H

struct multicast_vfo
{
char *name;
double freq;
char *mode;
int width;
int widthLower;
int widthUpper;
unsigned char rx; // true if in rx mode
unsigned char tx; // true in in tx mode
};

struct multicast_broadcast
{
char *ID;
struct multicast_vfo **vfo;
};

// returns # of bytes sent
extern HAMLIB_EXPORT (int) multicast_init(RIG *rig, char *addr, int port);
extern HAMLIB_EXPORT (int) multicast_send(RIG *rig, const char *msg, int msglen);
extern HAMLIB_EXPORT (int) multicast_stop(RIG *rig);
#endif //MULTICAST_H
Loading

0 comments on commit 17a3cf6

Please sign in to comment.