[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:
@@ -15,6 +15,10 @@ pub struct RigState {
|
||||
pub initialized: bool,
|
||||
#[serde(skip_serializing, skip_deserializing)]
|
||||
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.
|
||||
@@ -56,6 +60,8 @@ impl RigState {
|
||||
band: self.band_name(),
|
||||
enabled: self.control.enabled,
|
||||
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 enabled: Option<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>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user