dvb_t2mi/lib.rs
1//! ETSI TS 102 773 v1.4.1 DVB-T2 Modulator Interface (T2-MI) parser + builder.
2//!
3//! Entry points:
4//! - [`Parse`](dvb_common::Parse) / [`Serialize`](dvb_common::Serialize) — the two
5//! symmetric contracts every payload type implements.
6//! - [`packet`] — T2-MI packet header and type parsing.
7//! - [`payload`] — BBFrame, L1, FEF, timestamp, and addressing payload types.
8//! - [`crc`] — CRC-32 per Annex A.
9//!
10//! # RFU policy
11//!
12//! Payload parsers REJECT non-zero reserved (rfu) bits with
13//! `ReservedBitsViolation` and serialize them as 0 — with one deliberate
14//! exception: individual addressing (0x21) PRESERVES its leading rfu byte
15//! verbatim so gateway streams round-trip byte-exact (see
16//! `payload::individual_addressing`).
17//!
18//! # Example
19//!
20//! ```
21//! use dvb_t2mi::packet::Header;
22//! use dvb_common::Parse;
23//! let buf = [0x00u8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00];
24//! let hdr = Header::parse(&buf[..]).unwrap();
25//! assert_eq!(hdr.payload_len_bits, 0);
26//! ```
27
28#![warn(missing_docs)]
29
30pub mod crc;
31pub mod error;
32pub mod packet;
33pub mod payload;
34
35#[cfg(feature = "ts")]
36pub mod ts;
37
38pub use error::{Error, Result};