open_protocol/messages/
multi_spindle_result.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 = 100, revision = 1)]
8pub struct MID0100rev1 {
9 }
11
12#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
15#[open_protocol_message(MID = 101, revision = 1)]
16pub struct MID0101rev1 {
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 = 1)]
31 pub sync_overall_status: u8,
32
33 #[open_protocol_field(length = 25)]
35 pub vin_number: String,
36
37 #[open_protocol_field(length = 2)]
39 pub job_id: u8,
40
41 #[open_protocol_field(length = 3)]
43 pub parameter_set_id: u16,
44
45 #[open_protocol_field(length = 4)]
47 pub batch_size: u16,
48
49 #[open_protocol_field(length = 4)]
51 pub batch_counter: u16,
52
53 #[open_protocol_field(length = 1)]
55 pub batch_status: u8,
56
57 #[open_protocol_field(length = 19)]
59 pub timestamp: DateTime<Local>,
60
61 #[open_protocol_field(list, amount = "number_of_spindles", length = 5)]
63 pub spindle_statuses: Vec<SpindleResult>,
64}
65
66#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
68#[open_protocol_message(MID = 102, revision = 1)]
69pub struct MID0102rev1 {
70 }
72
73#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
75#[open_protocol_message(MID = 103, revision = 1)]
76pub struct MID0103rev1 {
77 }
79
80#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
82#[open_protocol_message(MID = 104, revision = 1)]
83pub struct MID0104rev1 {
84 #[open_protocol_field(length = 10)]
86 pub old_sync_tightening_id: u32,
87}
88
89#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode)]
91pub struct SpindleResult {
92 #[open_protocol_field(length = 2)]
94 pub spindle_number: u8,
95
96 #[open_protocol_field(length = 2)]
98 pub channel_id: u8,
99
100 #[open_protocol_field(length = 1)]
102 pub overall_status: u8,
103}