Commit graph

1145 commits

Author SHA1 Message Date
Dhiru Kholia
debe6fcaf9 Add support for rigs using the 'Simple CAT' protocol
See 'rigs/simplecat/SIMPLE_CAT_PROTOCOL.md' for the protocol spec.

Notes:

- Memory correctness checks were done using Valgrind.

- Tested with wsjtx-3.1.0_improved_PLUS_260228.tgz (with mods) and
  Bunzee Labs' DDX HF Digital Transceiver

  https://bunzee-labs.com/products/ddx

Tested on:

- Ubuntu Linux
- macOS Tahoe
- Windows 11
2026-03-25 17:42:32 +05:30
George Baltz N3GB
8a55457869 Cleanup - update NEWS and comments 2026-02-23 11:50:58 -05:00
George Baltz N3GB
97a005d52e The big cut - Remove all old embedded structures
Drop all fixed structures in RIG and state. Clean out old definitions,
  purge all references to same.

Undo the other conflicts in amp_state.h
2026-02-23 11:15:46 -05:00
George Baltz N3GB
be6b0086eb Mark more deprecated stuff for exclusion and removal
Also mark the bindings that will no longer need to be ignored.
2026-02-23 11:12:15 -05:00
George Baltz N3GB
8137485f91 Start adding needed(smaller) #includes
Compile with both NO_OLD_INCLUDES and NO_OLD_STRUCTS and
  repair the fallout. So far we're down to rigs/dummy/.

And fix formatting in rig_state.h
2026-02-23 11:12:14 -05:00
George Baltz N3GB
7a1a0d35ec And finally, the amplifiers
Resolve conflicts with new amp code/
Why move the ampport, rather than adding stuff after it???
2026-02-23 11:10:20 -05:00
George Baltz N3GB
2b3bb97dbf Convert rotators to heap storage
Just like the rigs
2026-02-23 11:02:34 -05:00
George Baltz N3GB
b01914aa3c Mark some data as private and not safe for applications
The pointers may move, or the method to get the address may change.
2026-02-23 11:02:34 -05:00
George Baltz N3GB
4b42f98078 Mark and #ifndef old structures that will disappear
Prepare for deprecation and removal of old embedded structures.

Note that the parameters NO_OLD_STRUCTS and NO_OLD_INCLUDES are
  temporary, and will be removed before 5.0 is released.  They are
  for test compiles to work through the codebase incrementally, so
  no compiler errors/warnings are generated by any committed/merged
  code during default builds.
2026-02-23 11:02:34 -05:00
George Baltz N3GB
02ea4af572 Move rig_state to heap storage.
Allocate and free it.
For access apps must
1) #include <hamlib/rig_state.h>  and
2) Use HAMLIB_STATE(rig) to get the address

Also fix a couple of misuses of STATE() macro.
2026-02-23 11:02:34 -05:00
George Baltz N3GB
a475d697aa Deprecate ports in rig_state struct
Mark all ports in struct rig_state as deprecated.
Remove them from the bindings.
2026-02-23 11:02:34 -05:00
George Baltz N3GB
0fc8954a09 Use heap storage for all rig ports
Allocates and frees buffers for CAT, PTT, and DCD.
Does *NOT* copy anything from STATE(rig)->rigport, so only works if
a) app uses rig_set_conf()   or
b) app uses HAMLIB_...() macros
2026-02-23 11:02:34 -05:00
Mikael Nousiainen
a526eb6bbc Extend amplifier API with funcs, levels, parms, ops, status and Expert backend.
Add new amp_caps fields (funcs, levels, parms, ops, status, freq ranges, input/ant)
with corresponding frontend API functions, ampctl commands, and dumpcaps
support. Implement Expert 13K-FA/15K-FA/2K-FA amplifier backend. Extend
dummy backend with full coverage of all new API features.
2026-02-17 15:54:00 +02:00
George Baltz N3GB
1c541ef5ae Update status of macro use for buffers
There's no going back now.
2026-02-01 21:15:54 -05:00
George Baltz N3GB
468a299924 Add Icom IC-7300MK2
Add baseline support for MK2 version, same as original
Differences:
  - Default CI-V address 0xB6
  - Status Beta
2025-12-31 05:34:32 -05:00
Martin
d997bbd7b1 add Icom ID-52A/E Plus 2025-12-08 21:38:49 +01:00
George Baltz N3GB
a5ecc6f0b1 Remove last traces of HAMLIB_PARAMS 2025-12-06 15:14:24 -05:00
George Baltz N3GB
b0f73d4ce7 And modernize rotator.h 2025-12-06 15:14:24 -05:00
George Baltz N3GB
f434746cea ANSIfy amplifier.h 2025-12-06 15:14:24 -05:00
George Baltz N3GB
845f60c82e Remove support for non-ANSI C compilers.
All functions in rig.h now always have full prototypes.

The gotcha in here was needing to move the prototype for rig_debug()
  to before the definition of the macro with the same name. Previously
  with the HAMLIB_PARAMS wrapper, the signatures didn't match; without
  it the compiler tried to expand the name in the prototype as the macro,
  causing syntax errors.
2025-12-06 15:14:24 -05:00
George Baltz N3GB
8bd19c4db8 Change pseudo-anonymous structure name to convention. 2025-09-27 15:56:31 -04:00
George Baltz N3GB
2283473707 Move FIFO_RIG from hamlib/rig.h to fifo.h where it belongs.
Add header to fifo.h
Update structure pointer in rig_state
2025-09-27 15:56:31 -04:00
Daniele Forsi IU5HKX
44eaded283 Fix Doxygen description 2025-09-25 00:13:08 +02:00
Daniele Forsi IU5HKX
50fc454a0b Remove duplicated define
Fixes:
../include/hamlib/rotlist.h:237: Warning 322: Redundant redeclaration of identifier 'ROT_MODEL_RT21' ignored,
2025-09-24 20:42:13 +02:00
George Baltz N3GB
11ca438222 Deprecate rig_get_trn() and rig_set_trn()
They have been marked as deprecated in doxygen for years.
They both do nothing but return -RIG_EDEPRECATED.

Remove them from the bindings.
AFAICT adding them to bindings/ignore.swg has no effect.
2025-09-13 21:37:25 -04:00
George Baltz N3GB
7e572fcdd0 Rename spaces() -> hl_stars()
Resolves conflict with function of same name in cqrlog.
Makes future conflicts less likely.
Add it to doxygen.
2025-09-13 21:37:25 -04:00
George Baltz N3GB
f7a127dbdc Doxygen updates. 2025-09-13 21:37:25 -04:00
Nate Bargmann
0f871a5a3e
Update Doxygen comments for rigerror() and rigerror2()
Add a new topic of "Hamlib internals" with the group of lib_internal.

Address GitHub issue #1881.
2025-09-06 18:13:12 -05:00
George Baltz N3GB
df65ceee67 Start removing conditional pthreads use.
We can treat HAVE_PTHREAD and HAVE_PTHREAD_H as equivalent. But using
_PTHREAD_H is a real kludge.
2025-08-24 19:53:44 -04:00
Daniele Forsi IU5HKX
897e59ef0e
Fix comment to be relevant to the parm 2025-08-18 08:03:44 -05:00
Daniele Forsi IU5HKX
3c391a696d Fix misleading order in comment and add UNKNOWN 2025-08-16 11:52:55 +02:00
Daniele Forsi IU5HKX
caf7346fc0 Fix typos 2025-08-16 11:52:55 +02:00
George Baltz N3GB
0e36d4faa4 Mangle names of structure members to avoid clash with perl keywords. 2025-08-13 09:30:59 -04:00
Daniele Forsi IU5HKX
8e4bcbcede Add another cross-reference in a Doxygen comment 2025-08-09 15:57:40 +02:00
Daniele Forsi IU5HKX
2462ab0a13 Improve Doxygen comments
Adds missing cross-references. Fix tagging of comment blocks in "aor"
even if the rigs aren't included in the generated documentation.
2025-08-08 10:38:55 +02:00
George Baltz N3GB
c26113c5cc Fix more cppcheck messages
Suppress non-errors in rx331.c and rx340.c
Mark runflag(s) as volatile
2025-08-04 18:43:39 -04:00
George Baltz N3GB
c1132a77b5 Mark cache structure in rig_state as deprecated.
It is no longer being initialized or updated, so anyone referencing it
is being misled.
2025-08-04 10:24:15 -04:00
Daniele Forsi IU5HKX
8d8d0328bf Fix typos 2025-08-03 10:49:23 +02:00
George Baltz N3GB
e172d34381 Deprecate amp_get_conf(), too 2025-07-28 11:32:34 -04:00
George Baltz N3GB
faad247f06 Deprecate rot_get_conf() 2025-07-28 10:43:10 -04:00
George Baltz N3GB
20eeb96787 Deprecate rig_get_conf()
Define macro to set attribute, if compiler is capable
Add macro to rig_get_conf(), Rig::getConf() declarations
Fix internal uses of rig_get_conf()
2025-07-27 11:31:18 -04:00
George Baltz N3GB
6c372f981f Distinguish wanted from unwanted fall through instances
Compile with -Wimplicit-fallthrough; analyze the results.
Define macro to mark valid fall through constructs. Mark all of the good
 ones, and fix the bad.

Not available with all compilers - for those without the feature this commit
 does nothing.
2025-07-27 10:03:38 -04:00
Nate Bargmann
7cceee9aba
Complete Doxygen comments for rotlist.h
Add new topic for rotator model list.
2025-07-26 18:34:31 -05:00
Nate Bargmann
4d6a3ed582
Fully document amplist.h
Create a new topic group of 'amplist' to separate the list of amplifier
models from the main Amplifier API group.
2025-07-26 18:34:30 -05:00
Nate Bargmann
f67a3cfe47
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.
2025-07-26 18:34:30 -05:00
Nate Bargmann
d6d50245c6
Update Doxygen comments in amplifier.h, rig.h and rotator.h 2025-07-25 06:41:14 -05:00
Nate Bargmann
15c5b4d771
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.
2025-07-25 06:17:48 -05:00
Nate Bargmann
04c00330a6
Clean upp Doxygen comments in rotator.h
When a comment block immediately preceeds the item, repeating the item
type such as \def or \typedef is not required.  They're only required
when the comment is not immediately preceeding or Doxygen doesn't get
the item correct.
2025-07-23 14:41:50 -05:00
Nate Bargmann
98cc0b688e
Update Doxygen comments for rot_state.h 2025-07-22 22:27:59 -05:00
Nate Bargmann
605e961dbf
Update Doxygen comments for rotlist.h 2025-07-22 22:27:59 -05:00