Expand description
Generic PSI/SI section framing — ETSI EN 300 468 §5.1.1.
Every PSI and SI table is carried in one or more sections. This module parses the section header and exposes the payload + CRC for table-specific parsers to consume.
§Section layout
byte 0: table_id (8 bits)
byte 1 bit 7: section_syntax_indicator (1 bit)
byte 1 bit 6: private_indicator (1 bit)
byte 1 bits 5-4: reserved (2 bits — ignored)
byte 1 bits 3-0 + byte 2: section_length (12 bits)
Long-form (section_syntax_indicator == 1):
byte 3-4: table_id_extension (16 bits)
byte 5: reserved(2) | version_number(5) | current_next_indicator(1)
byte 6: section_number (8 bits)
byte 7: last_section_number (8 bits)
byte 8..(total-4): payload
last 4 bytes: CRC_32
Short-form (section_syntax_indicator == 0, e.g. TDT):
byte 3..(3+section_length): payload (no extension header, no CRC)NOTE the TOT exception: the TOT (0x73) also sets SSI=0 but DOES end with a
CRC_32 (EN 300 468 §5.2.6). Parsing it through this generic short-form
path folds the CRC into payload — use crate::tables::tot::Tot.
section_length counts bytes after the 3-byte section header, so the
total section size is section_length + 3.
Structs§
- Section
- A parsed PSI/SI section header, borrowing the raw input buffer for payload.