Can set device desired version

This commit is contained in:
2024-10-05 16:26:07 +02:00
parent 2f971c0055
commit 2feb3f6490
9 changed files with 107 additions and 3 deletions

View File

@ -9,7 +9,7 @@ use std::collections::{HashMap, HashSet};
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct DeviceInfo {
/// Device reference
reference: String,
pub reference: String,
/// Device firmware / software version
version: semver::Version,
/// Maximum number of relay that the device can support
@ -62,6 +62,9 @@ pub struct Device {
///
/// There cannot be more than [info.max_relays] relays
pub relays: Vec<DeviceRelay>,
/// Desired version, ie. the version of the software we would to seen run on the device
#[serde(skip_serializing_if = "Option::is_none")]
pub desired_version: Option<semver::Version>,
}
/// Structure that contains information about the minimal expected execution