[feat](trx-core): add server_callsign and server_version to RigState/RigSnapshot

Add optional server_callsign and server_version fields to both
RigState and RigSnapshot so that server identity information can
flow through the protocol to clients and frontends.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
2026-02-08 10:31:55 +01:00
parent 37c36d196e
commit e5428209d8
+10
View File
@@ -15,6 +15,10 @@ pub struct RigState {
pub initialized: bool, pub initialized: bool,
#[serde(skip_serializing, skip_deserializing)] #[serde(skip_serializing, skip_deserializing)]
pub control: RigControl, pub control: RigControl,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub server_callsign: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub server_version: Option<String>,
} }
/// Mode supported by the rig. /// Mode supported by the rig.
@@ -56,6 +60,8 @@ impl RigState {
band: self.band_name(), band: self.band_name(),
enabled: self.control.enabled, enabled: self.control.enabled,
initialized: self.initialized, initialized: self.initialized,
server_callsign: self.server_callsign.clone(),
server_version: self.server_version.clone(),
}) })
} }
@@ -90,4 +96,8 @@ pub struct RigSnapshot {
pub band: Option<String>, pub band: Option<String>,
pub enabled: Option<bool>, pub enabled: Option<bool>,
pub initialized: bool, pub initialized: bool,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub server_callsign: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub server_version: Option<String>,
} }