libsbf 0.17.0

A no_std rust crate to parse Septentrio SBF Messages.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::binrw_util;
use alloc::vec::Vec;
use binrw::binrw;

// Commands Block 4015
#[binrw]
#[derive(Clone, Debug)]
pub struct Commands {
    #[br(map = binrw_util::map_u4)]
    #[bw(map = binrw_util::unmap_u4)]
    pub tow: Option<u32>,
    #[br(map = binrw_util::map_u2)]
    #[bw(map = binrw_util::unmap_u2)]
    pub wnc: Option<u16>,
    pub reserved: [u8; 2],
    #[br(parse_with = binrw::helpers::until_eof)]
    pub cmd_data: Vec<u8>,
}