use chrono::{DateTime, Local};
use open_protocol_codec_proc_macro::{OpenProtocolDecode, OpenProtocolEncode, OpenProtocolMessage};
#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
#[open_protocol_message(MID = 105, revision = 1)]
pub struct MID0105rev1 {
}
#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
#[open_protocol_message(MID = 106, revision = 1)]
pub struct MID0106rev1 {
#[open_protocol_field(length = 4)]
pub station_number: u16,
#[open_protocol_field(length = 25)]
pub station_name: String,
#[open_protocol_field(length = 4)]
pub batch_size: u16,
#[open_protocol_field(length = 4)]
pub batch_counter: u16,
#[open_protocol_field(length = 19)]
pub batch_start_time: DateTime<Local>,
#[open_protocol_field(length = 1)]
pub batch_status: u8,
#[open_protocol_field(length = 10)]
pub tightening_id: u32,
}
#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
#[open_protocol_message(MID = 107, revision = 1)]
pub struct MID0107rev1 {
#[open_protocol_field(length = 3)]
pub number_of_bolts: u16,
#[open_protocol_field(list, amount = "number_of_bolts", length = 10)]
pub bolt_data: Vec<BoltData>,
}
#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode)]
pub struct BoltData {
#[open_protocol_field(length = 4)]
pub bolt_number: u32,
#[open_protocol_field(length = 6)]
pub bolt_torque: u32,
#[open_protocol_field(length = 5)]
pub bolt_angle: u16,
}
#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
#[open_protocol_message(MID = 108, revision = 1)]
pub struct MID0108rev1 {
}
#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
#[open_protocol_message(MID = 109, revision = 1)]
pub struct MID0109rev1 {
}