pub struct AncContent {
pub did: u16,
pub sdid: u16,
pub data_count: u16,
pub user_data_words: Vec<u16>,
pub checksum: u16,
}Expand description
One ST 291-1 ANC data packet’s content: DID/SDID/Data_Count/
User_Data_Words/Checksum_Word, every value the raw 10-bit wire word
(including the ST 291-1 parity bits) stored verbatim — parity/checksum are
not computed or validated here (docs/anc_packet_291.md scope note).
Identical across ST 2038 (MPEG-2 TS/PES) and RFC 8331 (RTP) carriage; see the module doc for why this type is always compiled.
Fields§
§did: u16DID (10-bit raw, incl. ST 291-1 parity bits).
sdid: u16SDID (10-bit raw). For a “Type 1” ANC packet this word actually
carries the data block number (DBN).
data_count: u16Data_Count (10-bit raw). The User_Data_Words loop counter uses
only the low 8 bits (data_count & 0xFF).
user_data_words: Vec<u16>User_Data_Words (each 10-bit raw). Length is data_count & 0xFF.
checksum: u16Checksum_Word (10-bit raw, ST 291-1 checksum — not validated here).
Implementations§
Source§impl AncContent
impl AncContent
Sourcepub fn udw_loop_count(&self) -> usize
pub fn udw_loop_count(&self) -> usize
The User_Data_Words loop count actually used on the wire: the low
8 bits of data_count, independent of the stored Vec’s length.
Trait Implementations§
Source§impl Clone for AncContent
impl Clone for AncContent
Source§fn clone(&self) -> AncContent
fn clone(&self) -> AncContent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AncContent
impl Debug for AncContent
impl Eq for AncContent
Source§impl PartialEq for AncContent
impl PartialEq for AncContent
Source§impl Serialize for AncContent
Available on crate feature serde only.
impl Serialize for AncContent
serde only.