canboat_rs/pgns/
channel_source_configuration.rs

1use crate::pgn_types::PgnType;
2pub const LENGTH: usize = 19usize;
3pub const PGN: u32 = 130061u32;
4use bitfield::bitfield;
5bitfield! {
6    #[doc = "Channel Source Configuration"] pub struct ChannelSourceConfiguration([u8]);
7    impl Debug; u32; pub data_source_channel_id, _ : 7usize, 0usize; pub
8    source_selection_status, _ : 9usize, 8usize; pub reserved, _ : 11usize, 10usize; pub
9    name_selection_criteria_mask, _ : 23usize, 12usize; pub source_name, _ : 87usize,
10    24usize; pub pgn, _ : 111usize, 88usize; pub data_source_instance_field_number, _ :
11    119usize, 112usize; pub data_source_instance_value, _ : 127usize, 120usize; pub
12    secondary_enumeration_field_number, _ : 135usize, 128usize; pub
13    secondary_enumeration_field_value, _ : 143usize, 136usize; pub
14    parameter_field_number, _ : 151usize, 144usize;
15}
16impl ChannelSourceConfiguration<&[u8]> {
17    pub fn is_match(&self, pgn: u32) -> bool {
18        130061u32 == pgn
19    }
20    pub fn get_pgn() -> u32 {
21        130061u32
22    }
23    pub fn get_message_type() -> PgnType {
24        PgnType::Fast
25    }
26}