canboat_rs/pgns/
simnet_reprogram_status.rs

1use crate::pgn_types::PgnType;
2pub const LENGTH: usize = 7usize;
3pub const PGN: u32 = 130820u32;
4use bitfield::bitfield;
5bitfield! {
6    #[doc = "Simnet: Reprogram Status"] pub struct SimnetReprogramStatus([u8]); impl
7    Debug; u32; pub manufacturer_code, _ : 10usize, 0usize; pub reserved, _ : 12usize,
8    11usize; pub industry_code, _ : 15usize, 13usize; pub reserved_4, _ : 23usize,
9    16usize; pub status, _ : 31usize, 24usize; pub reserved_6, _ : 55usize, 32usize;
10}
11impl SimnetReprogramStatus<&[u8]> {
12    pub fn is_match(&self, pgn: u32) -> bool {
13        130820u32 == pgn && self.manufacturer_code() == 1857u32
14            && self.industry_code() == 4u32
15    }
16    pub fn get_pgn() -> u32 {
17        130820u32
18    }
19    pub fn get_message_type() -> PgnType {
20        PgnType::Fast
21    }
22}