pub struct ManchesterDecoder;Expand description
Manchester decoder for MIL-STD-1553B
Implementations§
Source§impl ManchesterDecoder
impl ManchesterDecoder
Sourcepub fn decode_bit(pair: u8) -> Result<bool>
pub fn decode_bit(pair: u8) -> Result<bool>
Decode a single Manchester-encoded bit pair (Thomas encoding)
Returns Ok(bit) on valid encoding, Err on invalid pattern
Sourcepub fn decode_bits(data: &[u8], num_bits: usize) -> Result<Vec<bool>>
pub fn decode_bits(data: &[u8], num_bits: usize) -> Result<Vec<bool>>
Decode a sequence of Manchester-encoded bits
Each byte contains 4 Manchester-encoded bits (2 bits per bit)
Sourcepub fn decode_word(data: &[u8]) -> Result<u32>
pub fn decode_word(data: &[u8]) -> Result<u32>
Decode a Manchester-encoded word (20 bits)
Expects 5 bytes (40 bits) of Manchester-encoded data
Auto Trait Implementations§
impl Freeze for ManchesterDecoder
impl RefUnwindSafe for ManchesterDecoder
impl Send for ManchesterDecoder
impl Sync for ManchesterDecoder
impl Unpin for ManchesterDecoder
impl UnwindSafe for ManchesterDecoder
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