pub struct ManagedCa { /* private fields */ }Expand description
The Driver’s owned CAS-layer state (#763 Layer 1) — one
CI slot’s active service set plus the entitlement re-query cadence.
Implementations§
Source§impl ManagedCa
impl ManagedCa
Sourcepub fn new() -> Self
pub fn new() -> Self
New, empty managed-CA state at the default re-query cadence
(REQUERY_DEFAULT).
Sourcepub fn services(&self) -> &BTreeMap<u16, ManagedService>
pub fn services(&self) -> &BTreeMap<u16, ManagedService>
The currently-tracked services, keyed by program_number.
Sourcepub fn requery_interval(&self) -> Duration
pub fn requery_interval(&self) -> Duration
The re-query cadence currently configured (Task 5 consumes this).
Sourcepub fn emm_pids(&self) -> &[Pid]
pub fn emm_pids(&self) -> &[Pid]
The EMM PIDs to route into ci0: the last set_cat’s list of
(CAID, EMM PID) entries (one per CA_descriptor; a CAID may have
several), intersected with the CAM’s advertised CAIDs (last ca_info) — a
CAT entry for a CAID the CAM never advertised is never fed (#763 Task
4).
Sourcepub fn descramble_pids(&self) -> &[Pid]
pub fn descramble_pids(&self) -> &[Pid]
The union of every actively-managed service’s elementary-stream PIDs
— the PIDs a caller must route into ci0 for descrambling.
Sourcepub fn ca_pids(&self) -> &[Pid]
pub fn ca_pids(&self) -> &[Pid]
The union of every actively-managed service’s CA_PIDs (ECM PIDs,
ISO/IEC 13818-1 §2.6.16 CA_descriptor CA_PID, programme + ES level
combined) — the control-word channel a caller must route into ci0
alongside descramble_pids; without these
the module has ES to descramble but no control words to do it with.
Sourcepub fn required_pids(&self) -> Vec<Pid>
pub fn required_pids(&self) -> Vec<Pid>
descramble_pids ∪ ca_pids ∪ emm_pids ∪ PCR ∪ CAT — every PID class a
caller must route into ci0 for this slot to both descramble the
tracked services (ES + ECM), keep entitlements current (EMM), and
carry each active service’s programme clock reference (PCR — ISO/IEC
13818-1 §2.4.4.9). The PCR PID is folded in here rather than into
descramble_pids because a dedicated PCR PID
carries no elementary stream of its own; a service whose pcr_pid is
0x1FFF (“no PCR”) contributes nothing. Computed on demand (small
sets); dedup + sorted.
The CAT PID (CAT_PID, 0x0001) is always included, even with no
services and no CAM. This is hardware-evidenced, not mandated by
EN 50221: on a Digital Devices CXD2099 with an entitled AlphaCrypt
One4All V2.5 (CAID 0x0650) decrypting ORF1 over 180 s runs, routing the
CAT plus only EMM PID 0x259 descrambled from about 55 s, while routing
all seven EMM PIDs without the CAT never descrambled (#1296).