Struct p25::trunking::tsbk::TsbkReceiver
[−]
[src]
pub struct TsbkReceiver { /* fields omitted */ }State machine for receiving a TSBK packet.
The state machine consumes dibit symbols and performs the following steps:
- Buffer dibits until a full packet's worth are available
- Descramble symbols using the same deinterleaver as data packets
- Decode 1/2-rate convolutional code and attempt to correct any errors
- Group dibits into a buffer of bytes for further interpretation
Methods
impl TsbkReceiver[src]
pub fn new() -> TsbkReceiver[src]
Create a new TsbkReceiver in the initial state.
pub fn feed(&mut self, dibit: Dibit) -> Option<Result<TsbkFields>>[src]
Feed in a baseband symbol, possibly producing a complete TSBK packet. Return
Some(Ok(pkt)) if a packet was successfully received, Some(Err(err)) if an
error occurred, and None in the case of no event.