Skip to main content

ManagedCa

Struct ManagedCa 

Source
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

Source

pub fn new() -> Self

New, empty managed-CA state at the default re-query cadence (REQUERY_DEFAULT).

Source

pub fn services(&self) -> &BTreeMap<u16, ManagedService>

The currently-tracked services, keyed by program_number.

Source

pub fn requery_interval(&self) -> Duration

The re-query cadence currently configured (Task 5 consumes this).

Source

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).

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Clone for ManagedCa

Source§

fn clone(&self) -> ManagedCa

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ManagedCa

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ManagedCa

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DescriptorObject for T
where T: Debug + Any + Send + Sync,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Borrow as &dyn Any so the caller can downcast to the concrete type.
Source§

impl<T> ExtensionObject for T
where T: Debug + Any + Send + Sync,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Borrow as &dyn Any so the caller can downcast to the concrete type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> TableObject for T
where T: Debug + Any + Send + Sync,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Borrow as &dyn Any so the caller can downcast to the concrete type.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.