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) -> &[u16]
pub fn emm_pids(&self) -> &[u16]
The EMM PIDs to route into ci0: the last set_cat’s CAID → EMM-PID
map, 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) -> &[u16]
pub fn descramble_pids(&self) -> &[u16]
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) -> &[u16]
pub fn ca_pids(&self) -> &[u16]
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<u16>
pub fn required_pids(&self) -> Vec<u16>
descramble_pids ∪ ca_pids ∪ emm_pids ∪ PCR — 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.8). 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.