pub struct UleReceiver { /* private fields */ }Expand description
A de-fragmenting ULE receiver (RFC 4326 §7).
Stateful across TS packets on one PID. Hand it each packet’s payload via
UleReceiver::push; it returns the complete SNDUs that finished in that
packet. The receiver owns a reassembly buffer for the partial SNDU spanning
packet boundaries.
Implementations§
Source§impl UleReceiver
impl UleReceiver
Sourcepub fn in_reassembly(&self) -> bool
pub fn in_reassembly(&self) -> bool
true if the receiver is mid-SNDU (a fragment is buffered).
Sourcepub fn push(&mut self, payload: &[u8], pusi: bool) -> Vec<Vec<u8>>
pub fn push(&mut self, payload: &[u8], pusi: bool) -> Vec<Vec<u8>>
Feed one TS packet’s payload (payload = the bytes after the 4-byte TS
header, length TS_PAYLOAD_LEN in practice) and its pusi flag.
Returns every SNDU that completed within this packet, as owned byte
vectors (header..CRC inclusive).
On a malformed Payload Pointer or an inconsistent length the partial SNDU is dropped and the receiver re-enters the Idle State (§7), but the already-completed SNDUs from this packet are still returned.
Trait Implementations§
Source§impl Clone for UleReceiver
impl Clone for UleReceiver
Source§fn clone(&self) -> UleReceiver
fn clone(&self) -> UleReceiver
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more