1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! DVB Common Interface (EN 50221) — the host↔CICAM wire protocol.
//!
//! Parses + builds the EN 50221 protocol objects: resource APDUs (Resource
//! Manager, Application Information, CA support incl. `ca_pmt`/`ca_pmt_reply`,
//! Date-Time, Host Control, the full MMI set — low-level/display/keypad/subtitle/
//! download and high-level menu/list/enq — and Low-Speed Communications), the
//! session-layer SPDUs and transport-layer TPDUs, plus a `CA_PMT` builder that
//! turns a `dvb-si` PMT into the object handed to a CICAM.
//!
//! Every wire structure implements [`dvb_common::Parse`] / [`dvb_common::Serialize`]
//! symmetrically (parse → serialize is byte-identical), with all length fields
//! computed from content. Spec citations live in each module doc; the
//! render-verified transcription is in `docs/en_50221/`.
//!
//! Scope: the wire/protocol layer only. The physical PC-Card transport and CI+
//! crypto (the CC resource) are out of scope. `#![no_std]` (+ `alloc`).
//!
//! # Layers
//!
//! - [`tag`] / [`length`] — the 3-byte `apdu_tag` and the ASN.1-style
//! `length_field` shared by all PDUs.
//! - [`resource`] — the 4-octet `resource_identifier()`.
//! - [`objects`] — application-layer APDU objects, dispatched by [`AnyApdu`].
//! - [`spdu`] — session-layer SPDUs (open/create/close session, session number).
//! - [`tpdu`] — transport-layer framing (C_TPDU/R_TPDU + connection mgmt).
//! - [`builder`] — the `CA_PMT` projection from a `dvb-si` PMT.
//!
//! All Table 58 `apdu_tag`s are now typed; an unallocated/private tag is produced
//! by [`AnyApdu::parse`] as [`AnyApdu::Unknown`] (lossless round-trip). The CI+
//! crypto (CC resource) and the PC-Card hardware transport remain out of scope.
// Runnable examples, embedded so they render on docs.rs and stay in sync with
// the actual `examples/*.rs` files (shown, not compiled).
extern crate alloc;
pub use AnyApdu;
pub use ;
pub use ResourceId;
pub use ApduTag;
pub use ApduDef;