canboat_rs/pgns/
simnet_engine_and_tank_configuration.rs

1use crate::pgn_types::PgnType;
2pub const LENGTH: usize = 2usize;
3pub const PGN: u32 = 130834u32;
4use bitfield::bitfield;
5bitfield! {
6    #[doc = "Simnet: Engine and Tank Configuration"] pub struct
7    SimnetEngineAndTankConfiguration([u8]); impl Debug; u32; pub manufacturer_code, _ :
8    10usize, 0usize; pub reserved, _ : 12usize, 11usize; pub industry_code, _ : 15usize,
9    13usize;
10}
11impl SimnetEngineAndTankConfiguration<&[u8]> {
12    pub fn is_match(&self, pgn: u32) -> bool {
13        130834u32 == pgn && self.manufacturer_code() == 1857u32
14            && self.industry_code() == 4u32
15    }
16    pub fn get_pgn() -> u32 {
17        130834u32
18    }
19    pub fn get_message_type() -> PgnType {
20        PgnType::Fast
21    }
22}