pub struct Bbheader {
pub matype: Matype,
pub upl: u16,
pub sync: u8,
pub dfl: u16,
pub syncd: u16,
pub mode: Mode,
pub issy_in_header: Option<[u8; 3]>,
}Expand description
Parsed 10-byte BBHEADER.
Fields vary based on Mode:
- NM (MODE=0):
upl,syncare from the header;issy_in_headeris None. - HEM (MODE=1):
uplandsyncare both zero;issy_in_headercarries the 3 ISSY bytes that reuse the NM UPL/SYNC layout.
Detection: crc8(bytes[0..9]) ^ bytes[9] yields 0 for NM, 1 for HEM.
Fields§
§matype: MatypeMATYPE field.
upl: u16User Packet Length in bits (NM only; 0 in HEM).
sync: u8Copy of the User Packet Sync-byte (NM only; 0 in HEM).
dfl: u16Data Field Length in bits.
syncd: u16Distance in bits from DATA FIELD start to the first complete UP beginning.
mode: ModeDetected mode (NM vs HEM).
issy_in_header: Option<[u8; 3]>3-byte ISSY from header bytes (HEM only; None in NM).
Implementations§
Trait Implementations§
impl Copy for Bbheader
impl Eq for Bbheader
impl StructuralPartialEq for Bbheader
Auto Trait Implementations§
impl Freeze for Bbheader
impl RefUnwindSafe for Bbheader
impl Send for Bbheader
impl Sync for Bbheader
impl Unpin for Bbheader
impl UnsafeUnpin for Bbheader
impl UnwindSafe for Bbheader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more