Finished values and telemetry

This commit is contained in:
2023-09-19 19:58:48 +00:00
parent cd0581973d
commit 3b8926fb61
5 changed files with 134 additions and 37 deletions

View File

@@ -7,7 +7,7 @@ pub struct TelemetryMessage {
pub voltage: Option<f64>,
pub temperature: Option<f64>,
pub software_version: i32,
pub timestamp: NaiveDateTime
pub timestamp: NaiveDateTime,
}
#[derive(Deserialize, Debug, Serialize)]
@@ -16,4 +16,18 @@ pub struct TelemetryMessageFromDevice {
pub voltage: Option<f64>,
pub temperature: Option<f64>,
pub software_version: i32,
}
}
#[derive(Deserialize, Debug, Serialize)]
pub struct ValueMessageFromDevice {
pub value: f64,
pub value_id: i32,
pub active_errors: i32,
}
#[derive(Deserialize, Debug, Serialize)]
pub struct ValueMessage {
pub value: f64,
pub value_id: i32,
pub timestamp: NaiveDateTime,
}