open_protocol/messages/
multi_spindle_status.rs1use chrono::{DateTime, Local};
2use open_protocol_codec_proc_macro::{OpenProtocolDecode, OpenProtocolEncode, OpenProtocolMessage};
3
4#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
7#[open_protocol_message(MID = 90, revision = 1)]
8pub struct MID0090rev1 {
9 }
11
12#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
15#[open_protocol_message(MID = 91, revision = 1)]
16pub struct MID0091rev1 {
17 #[open_protocol_field(length = 2)]
19 pub number_of_spindles: u8,
20
21 #[open_protocol_field(length = 2)]
23 pub spindles_running: u8,
24
25 #[open_protocol_field(length = 5)]
27 pub sync_tightening_id: u32,
28
29 #[open_protocol_field(length = 19)]
31 pub timestamp: DateTime<Local>,
32
33 #[open_protocol_field(length = 1)]
35 pub sync_overall_status: u8,
36
37 #[open_protocol_field(list, amount = "number_of_spindles", length = 5)]
39 pub spindle_statuses: Vec<SpindleStatus>,
40}
41
42#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
44#[open_protocol_message(MID = 92, revision = 1)]
45pub struct MID0092rev1 {
46 }
48
49#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
51#[open_protocol_message(MID = 93, revision = 1)]
52pub struct MID0093rev1 {
53 }
55
56#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode)]
58pub struct SpindleStatus {
59 #[open_protocol_field(length = 2)]
61 pub spindle_number: u8,
62
63 #[open_protocol_field(length = 2)]
65 pub channel_id: u8,
66
67 #[open_protocol_field(length = 1)]
69 pub overall_status: u8,
70}