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 = 100, revision = 1)]
pub struct MID0100rev1 {
}
#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
#[open_protocol_message(MID = 101, revision = 1)]
pub struct MID0101rev1 {
#[open_protocol_field(length = 2)]
pub number_of_spindles: u8,
#[open_protocol_field(length = 2)]
pub spindles_running: u8,
#[open_protocol_field(length = 5)]
pub sync_tightening_id: u32,
#[open_protocol_field(length = 1)]
pub sync_overall_status: u8,
#[open_protocol_field(length = 25)]
pub vin_number: String,
#[open_protocol_field(length = 2)]
pub job_id: u8,
#[open_protocol_field(length = 3)]
pub parameter_set_id: u16,
#[open_protocol_field(length = 4)]
pub batch_size: u16,
#[open_protocol_field(length = 4)]
pub batch_counter: u16,
#[open_protocol_field(length = 1)]
pub batch_status: u8,
#[open_protocol_field(length = 19)]
pub timestamp: DateTime<Local>,
#[open_protocol_field(list, amount = "number_of_spindles", length = 5)]
pub spindle_statuses: Vec<SpindleResult>,
}
#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
#[open_protocol_message(MID = 102, revision = 1)]
pub struct MID0102rev1 {
}
#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
#[open_protocol_message(MID = 103, revision = 1)]
pub struct MID0103rev1 {
}
#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
#[open_protocol_message(MID = 104, revision = 1)]
pub struct MID0104rev1 {
#[open_protocol_field(length = 10)]
pub old_sync_tightening_id: u32,
}
#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode)]
pub struct SpindleResult {
#[open_protocol_field(length = 2)]
pub spindle_number: u8,
#[open_protocol_field(length = 2)]
pub channel_id: u8,
#[open_protocol_field(length = 1)]
pub overall_status: u8,
}