Skip to main content

Module ci_ext

Module ci_ext 

Source
Expand description

DVB CI Extensions (ETSI TS 101 699) — the resource-scoped APDU layer.

Unlike the EN 50221 application objects (which carry globally-unique apdu_tags and are dispatched by crate::AnyApdu), the TS 101 699 extension resources reuse the same 0x9F80xx tag values across different resources — per Table 87 several resources start their objects at 0x9F8000. The same three tag bytes therefore mean different objects depending on which resource’s session they arrive on, so they cannot join the global AnyApdu. This module provides a resource-scoped dispatch (CiExtApdu): parsing is keyed on the resource_identifier() first, then the leading 24-bit apdu_tag selects the object within that resource.

Each apdu_tag const lives in its resource module’s tag submodule, so the colliding values are namespaced per resource (power_manager::tag vs copy_protection::tag both define a 0x9F8000).

Spec: ETSI TS 101 699 V1.1.1 §8, Table 87 (resource IDs + tags) — see docs/ci_plus/resource-ids.md. The per-resource layouts are cited in their own module docs.

Resources implemented: Resource Manager v2, Application Information v2, Power Manager, Event Manager, Copy Protection, StreamInput, ServiceGateway (Generic Service Gateway), BroadcastServiceGateway, Status Query (+ audience metering), Application MMI, Download (CAM firmware, + DSM-CC U-N messages), CA Pipeline — the full TS 101 699 §6 resource set.

Modules§

application_info_v2
Application Information v2 objects — ETSI TS 101 699 V1.1.1 §5, Table 11 (PDF p. 21). See docs/ci_plus/application-info-v2.md.
application_mmi
Application MMI objects — ETSI TS 101 699 V1.1.1 §6.5, Tables 62-68 (PDF pp. 57-61). See docs/ci_plus/application-mmi.md.
broadcast_service_gateway
Broadcast Service Gateway objects — ETSI TS 101 699 V1.1.1 §6.1.3.3, Tables 32-34 (PDF pp. 39-40). See docs/ci_plus/input-modules.md.
ca_pipeline
CA Pipeline objects — ETSI TS 101 699 V1.1.1 §6.8, Tables 84-86 (PDF pp. 75-77). See docs/ci_plus/ca-pipeline.md.
copy_protection
Copy Protection objects — ETSI TS 101 699 V1.1.1 §6.6, Tables 69-73 (PDF pp. 62-63). See docs/ci_plus/copy-protection.md.
event_manager
Event Manager objects — ETSI TS 101 699 V1.1.1 §6.4, Tables 56-61 (PDF pp. 55-56). See docs/ci_plus/event-manager.md.
power_manager
Power Manager objects — ETSI TS 101 699 V1.1.1 §6.3, Tables 52-55 (PDF pp. 51-52). See docs/ci_plus/power-manager.md.
resource_manager_v2
Resource Manager v2 objects — ETSI TS 101 699 V1.1.1 §4.2.1, Tables 3-7 (PDF pp. 13-17). See docs/ci_plus/resource-manager-v2.md.
service_gateway
Generic Service Gateway objects — ETSI TS 101 699 V1.1.1 §6.1.3, Tables 21-31 (PDF pp. 32-37). See docs/ci_plus/input-modules.md.
software_download
Software Download (CAM firmware) objects + DSM-CC download messages — ETSI TS 101 699 V1.1.1 §6.7, Tables 74-83 (PDF pp. 64-74). See docs/ci_plus/software-download.md.
status_query
Status Query objects + audience-metering item structures — ETSI TS 101 699 V1.1.1 §6.2, Tables 35-51 (PDF pp. 42-50). See docs/ci_plus/status-query.md.
stream_input
StreamInput objects — ETSI TS 101 699 V1.1.1 §6.1.2, Tables 12-20 (PDF pp. 25-28). See docs/ci_plus/input-modules.md.

Enums§

CiExtApdu
A parsed DVB CI-extension APDU, scoped to the resource it arrived on.
CiExtResource
The DVB CI-extension resource a ResourceId denotes. type = 1* resources are matched after masking out the Module ID; fixed-ID resources match exactly.

Constants§

APPLICATION_INFO_V2
Application Information v2 — class 2, type 1, version 2 (0x00020042). Fixed ID.
APPLICATION_MMI
Application MMI — class 65, type 1, version 1 (0x00410041). Fixed ID.
BROADCAST_SERVICE_GATEWAY_TEMPLATE
BroadcastServiceGateway template — class 129, type 1* (0x00811ii1).
CA_PIPELINE_TEMPLATE
CA Pipeline template — class 6, type 1* (0x00061ii1).
COPY_PROTECTION_TEMPLATE
Copy Protection template — class 4, type 1* (0x00041ii1).
DOWNLOAD
Download resource — class 5, type 1, version 1 (0x00051041). Fixed ID.
EVENT_MANAGER_TEMPLATE
Event Manager template — class 35, type 1* (0x00231ii1).
MODULE_ID_MASK
Mask that clears the 6-bit Module ID (ii) of a type = 1* resource ID — the low 6 bits of the 10-bit resource_type field, i.e. bits [11:6] (TS 101 699 §8.1). Applying it to a 1* resource ID yields its template ID.
POWER_MANAGER
Power Manager — class 34, type 1, version 1 (0x00220041). Fixed ID.
RESOURCE_MANAGER_V2
Resource Manager v2 — class 1, type 1, version 2 (0x00010042). Fixed ID.
STATUS_QUERY_TEMPLATE
StatusQuery template — class 33, type 1* (0x00211ii1).
STREAM_INPUT_TEMPLATE
StreamInput template — class 128, type 1*, version 1 (0x00801ii1, ii = Module ID). Match with MODULE_ID_MASK.

Functions§

classify
Map a ResourceId to its DVB CI-extension resource. type = 1* resources are matched by masking out the Module ID byte; fixed-ID resources match exactly. Returns None for any non-CI-extension resource.
module_id
Extract the 6-bit Module ID (ii) from a type = 1* resource ID.