pub struct CarryOverExtractor { /* private fields */ }Expand description
Stateful UP extractor that carries partial user packets across BBFrame boundaries — a single UP can span multiple frames, especially in HEM where stride=187 bytes.
Use feed_nm / feed_hem per received frame; the returned Vec holds
whichever 188-byte TS packets completed during that frame.
Implementations§
Source§impl CarryOverExtractor
impl CarryOverExtractor
Sourcepub fn feed_hem(
&mut self,
bbheader_bytes: &[u8; 10],
data_field: &[u8],
npd: bool,
) -> Vec<[u8; 188]>
pub fn feed_hem( &mut self, bbheader_bytes: &[u8; 10], data_field: &[u8], npd: bool, ) -> Vec<[u8; 188]>
Feed a HEM BBFrame’s header + data field. Returns any TS packets that completed during this frame.
npd is the MATYPE-1 NPD flag for the frame — when true the stream
would additionally carry DNP bytes between UPs. NPD reinsertion is
NOT YET implemented here; callers must not pass npd=true until
the DNP path lands.
Sourcepub fn feed_hem_into(
&mut self,
bbheader_bytes: &[u8; 10],
data_field: &[u8],
npd: bool,
out: &mut Vec<[u8; 188]>,
)
pub fn feed_hem_into( &mut self, bbheader_bytes: &[u8; 10], data_field: &[u8], npd: bool, out: &mut Vec<[u8; 188]>, )
Buffer-reusing variant of feed_hem. Clears out,
then appends the TS packets that completed during this frame. Reuse the
same Vec across frames to avoid a per-frame heap allocation.