[feat](trx-frontend-rigctl): per-rig rigctl listeners for multi-rig setups

Add rig_ports map to RigctlFrontendConfig. When non-empty, one rigctl
TCP listener is spawned per entry instead of the single shared listener,
each routing commands to its assigned rig via rig_id_override on RigRequest.

Add rig_id_override: Option<String> to RigRequest so the remote client
can route individual requests to a specific rig without changing the
globally selected rig. build_envelope prefers the override when set.

Example config:
  [frontends.rigctl]
  enabled = true
  listen = "127.0.0.1"
  port = 4532
  rig_ports.ft817 = 4532
  rig_ports.airspyhf = 4533

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-02-28 08:41:39 +01:00
parent 2c2a0951a5
commit b5a1b4af33
10 changed files with 74 additions and 19 deletions
+3
View File
@@ -11,4 +11,7 @@ use crate::{RigCommand, RigResult, RigSnapshot};
pub struct RigRequest {
pub cmd: RigCommand,
pub respond_to: oneshot::Sender<RigResult<RigSnapshot>>,
/// When set, the remote client routes this request to the specified rig
/// instead of the globally selected rig. Used for per-rig rigctl listeners.
pub rig_id_override: Option<String>,
}