canboat_rs/pgns/
load_controller_connection_state_control.rs

1use crate::pgn_types::PgnType;
2pub const LENGTH: usize = 8usize;
3pub const PGN: u32 = 127500u32;
4use bitfield::bitfield;
5bitfield! {
6    #[doc = "Load Controller Connection State/Control"] pub struct
7    LoadControllerConnectionStateControl([u8]); impl Debug; u32; pub sequence_id, _ :
8    7usize, 0usize; pub connection_id, _ : 15usize, 8usize; pub state, _ : 23usize,
9    16usize; pub status, _ : 31usize, 24usize; pub operational_status_control, _ :
10    39usize, 32usize; pub pwm_duty_cycle, _ : 47usize, 40usize; pub timeon, _ : 55usize,
11    48usize; pub timeoff, _ : 63usize, 56usize;
12}
13impl LoadControllerConnectionStateControl<&[u8]> {
14    pub fn is_match(&self, pgn: u32) -> bool {
15        127500u32 == pgn
16    }
17    pub fn get_pgn() -> u32 {
18        127500u32
19    }
20    pub fn get_message_type() -> PgnType {
21        PgnType::Single
22    }
23}