open_protocol/messages/
vin.rs

1use open_protocol_codec_proc_macro::{OpenProtocolDecode, OpenProtocolEncode, OpenProtocolMessage};
2
3#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
4#[open_protocol_message(MID = 50, revision = 1)]
5pub struct MID0050rev1 {
6    /// The Vehicle Identification Number (VIN) to be sent to the controller
7    #[open_protocol_field(length = 25)]
8    pub vin_number: String,
9}
10
11#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
12#[open_protocol_message(MID = 51, revision = 1)]
13pub struct MID0051rev1 {
14    // Subscription for VIN and other identifiers
15    // No fields for this revision
16}
17
18#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
19#[open_protocol_message(MID = 52, revision = 1)]
20pub struct MID0052rev1 {
21    /// The current Vehicle Identification Number (VIN)
22    #[open_protocol_field(length = 25)]
23    pub vin_number: String,
24}
25
26#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
27#[open_protocol_message(MID = 52, revision = 2)]
28pub struct MID0052rev2 {
29    /// The current Vehicle Identification Number (VIN)
30    #[open_protocol_field(length = 25)]
31    pub vin_number: String,
32
33    /// Additional identifier parts
34    #[open_protocol_field(list, amount = 3, length = 25)]
35    pub additional_identifiers: Vec<String>,
36}
37
38#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
39#[open_protocol_message(MID = 53, revision = 1)]
40pub struct MID0053rev1 {
41    // Acknowledge receipt of the VIN number
42    // No fields for this revision
43}
44
45#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
46#[open_protocol_message(MID = 54, revision = 1)]
47pub struct MID0054rev1 {
48    // Unsubscribe from the current tightening identifiers
49    // No fields for this revision
50}
51
52#[derive(Debug, Default, Eq, PartialEq, OpenProtocolEncode, OpenProtocolDecode, OpenProtocolMessage)]
53#[open_protocol_message(MID = 54, revision = 2)]
54pub struct MID0054rev2 {
55    // Unsubscribe from the current tightening identifiers
56    // No fields for this revision
57}