initial state vector implementation
This commit is contained in:
@@ -3,6 +3,22 @@ use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub enum Telemetry {
|
||||
Timestamp(#[serde(with = "ts_nanoseconds")] DateTime<Utc>)
|
||||
pub struct Telemetry {
|
||||
#[serde(with = "ts_nanoseconds")]
|
||||
pub timestamp: DateTime<Utc>,
|
||||
pub message: TelemetryMessage,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize)]
|
||||
pub enum SwitchBank {
|
||||
A,
|
||||
B,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub enum TelemetryMessage {
|
||||
SwitchState {
|
||||
bank: SwitchBank,
|
||||
switches: [bool; 16],
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user