open_protocol/messages/
powermacs_result.rs1use chrono::{DateTime, Local};
2use open_protocol_codec_proc_macro::{OpenProtocolDecode, OpenProtocolEncode, OpenProtocolMessage};
3
4#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
6#[open_protocol_message(MID = 105, revision = 1)]
7pub struct MID0105rev1 {
8 }
10
11#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
14#[open_protocol_message(MID = 106, revision = 1)]
15pub struct MID0106rev1 {
16 #[open_protocol_field(length = 4)]
18 pub station_number: u16,
19
20 #[open_protocol_field(length = 25)]
22 pub station_name: String,
23
24 #[open_protocol_field(length = 4)]
26 pub batch_size: u16,
27
28 #[open_protocol_field(length = 4)]
30 pub batch_counter: u16,
31
32 #[open_protocol_field(length = 19)]
34 pub batch_start_time: DateTime<Local>,
35
36 #[open_protocol_field(length = 1)]
38 pub batch_status: u8,
39
40 #[open_protocol_field(length = 10)]
42 pub tightening_id: u32,
43}
44
45#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
48#[open_protocol_message(MID = 107, revision = 1)]
49pub struct MID0107rev1 {
50 #[open_protocol_field(length = 3)]
52 pub number_of_bolts: u16,
53
54 #[open_protocol_field(list, amount = "number_of_bolts", length = 10)]
56 pub bolt_data: Vec<BoltData>,
57}
58
59#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode)]
61pub struct BoltData {
62 #[open_protocol_field(length = 4)]
64 pub bolt_number: u32,
65
66 #[open_protocol_field(length = 6)]
68 pub bolt_torque: u32,
69
70 #[open_protocol_field(length = 5)]
72 pub bolt_angle: u16,
73}
74
75#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
77#[open_protocol_message(MID = 108, revision = 1)]
78pub struct MID0108rev1 {
79 }
81
82#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
84#[open_protocol_message(MID = 109, revision = 1)]
85pub struct MID0109rev1 {
86 }