Skip to content

hal: Rewrite most of halrmt to become functional and use the query API - #4352

Merged
grandixximo merged 1 commit into
LinuxCNC:masterfrom
BsAtHome:halgs_halrmt
Aug 8, 2026
Merged

hal: Rewrite most of halrmt to become functional and use the query API#4352
grandixximo merged 1 commit into
LinuxCNC:masterfrom
BsAtHome:halgs_halrmt

Conversation

@BsAtHome

@BsAtHome BsAtHome commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This PR is the rewrite of halrmt as required by the HAL updates. It is single-threaded now and supports multiple connections simultaneously. All direct access to HAL's inner workings have been removed and replaced with the HAL query API. The documentation has been updated.

There may still be some things that need be altered. The original code was mostly copied from halcmd and then forced into handling I/O via the network. Some operations do not necessarily benefit from that. As an example, the SET SAVE command may include a filename, but that filename is on the remote computer (where halrmt runs). The SET SAVE command can now run without the filename argument to output over the network connection, but the format is not suitable for putting it back into the network connection. The format does work with halcmd. It is necessary to rework the output so you can do full remote interaction without too many interpretation steps.

There may still be other things lingering. However, this new version is an improvement and at least working, whereas the old version was deemed non-functional.

Note: The halrmc.cc source file is now a C++ file. Recompiling locally after merging may require a make clean or at least the removal of the outdated dependency file(s) that still reference the old halrmc.c C-file. Otherwise a build error will note a missing file that should be missing but still gets referenced by a stale dependency.

@grandixximo grandixximo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified build (clean, no warnings) and live-tested over TCP: HELLO/ENABLE gating, GET PINS/COMPS/THREADS/LOCK, async LOADRT with delayed ACK, SETP/SETS/NET/NEWSIG/DELSIG, ADDF/DELF, SAVE to connection and file, multi-client concurrency, QUIT, SHUTDOWN exit. All match old protocol semantics. Five small findings inline; none blocking. This is a strict improvement over the old non-functional halrmt.

Comment thread src/hal/utils/halrmt.cc Outdated
Comment thread src/hal/utils/halrmt.cc Outdated
Comment thread src/hal/utils/halrmt.cc
Comment thread docs/src/man/man1/halrmt.1.adoc Outdated
Comment thread docs/src/man/man1/halrmt.1.adoc Outdated
@grandixximo
grandixximo merged commit 218e741 into LinuxCNC:master Aug 8, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants