[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:
@@ -300,6 +300,7 @@ async fn handle_client(
|
||||
let req = RigRequest {
|
||||
cmd: rig_cmd,
|
||||
respond_to: resp_tx,
|
||||
rig_id_override: None,
|
||||
};
|
||||
|
||||
match time::timeout(IO_TIMEOUT, handle.rig_tx.send(req)).await {
|
||||
|
||||
@@ -316,7 +316,7 @@ pub async fn run_rig_task(
|
||||
}
|
||||
|
||||
// Process each request
|
||||
while let Some(RigRequest { cmd, respond_to }) = batch.pop() {
|
||||
while let Some(RigRequest { cmd, respond_to, .. }) = batch.pop() {
|
||||
let cmd_label = format!("{:?}", cmd);
|
||||
let log_command = !matches!(&cmd, RigCommand::GetSpectrum);
|
||||
let started = Instant::now();
|
||||
|
||||
Reference in New Issue
Block a user