simulcrypt 0.1.0

DVB SimulCrypt (ETSI TS 103 197) head-end protocol: ECMG client, EMMG server, control words
Documentation
//! EMMG/PDG <=> MUX protocol constants: message types, TLV tags and error codes.

/// `CHANNEL_SETUP` message type.
pub const EMMG_MSG_CHANNEL_SETUP: u16 = 0x0011;
/// `CHANNEL_TEST` message type.
pub const EMMG_MSG_CHANNEL_TEST: u16 = 0x0012;
/// `CHANNEL_STATUS` message type.
pub const EMMG_MSG_CHANNEL_STATUS: u16 = 0x0013;
/// `CHANNEL_CLOSE` message type.
pub const EMMG_MSG_CHANNEL_CLOSE: u16 = 0x0014;
/// `CHANNEL_ERROR` message type.
pub const EMMG_MSG_CHANNEL_ERROR: u16 = 0x0015;
/// `STREAM_SETUP` message type.
pub const EMMG_MSG_STREAM_SETUP: u16 = 0x0111;
/// `STREAM_TEST` message type.
pub const EMMG_MSG_STREAM_TEST: u16 = 0x0112;
/// `STREAM_STATUS` message type.
pub const EMMG_MSG_STREAM_STATUS: u16 = 0x0113;
/// `STREAM_CLOSE_REQUEST` message type.
pub const EMMG_MSG_STREAM_CLOSE_REQUEST: u16 = 0x0114;
/// `STREAM_CLOSE_RESPONSE` message type.
pub const EMMG_MSG_STREAM_CLOSE_RESPONSE: u16 = 0x0115;
/// `STREAM_ERROR` message type.
pub const EMMG_MSG_STREAM_ERROR: u16 = 0x0116;
/// `STREAM_BW_REQUEST` message type.
pub const EMMG_MSG_STREAM_BW_REQUEST: u16 = 0x0117;
/// `STREAM_BW_ALLOC` message type.
pub const EMMG_MSG_STREAM_BW_ALLOC: u16 = 0x0118;
/// `DATA_PROVISION` message type.
pub const EMMG_MSG_DATA_PROVISION: u16 = 0x0211;

/// `super_cas_id` TLV tag.
pub const EMMG_VAR_SUPER_CAS_ID: u16 = 0x0001;
/// `section_TSpkt_flag` TLV tag.
pub const EMMG_VAR_SECTION_TS_PKT_FLAG: u16 = 0x0002;
/// `channel_id` TLV tag.
pub const EMMG_VAR_CHANNEL_ID: u16 = 0x0003;
/// `stream_id` TLV tag.
pub const EMMG_VAR_STREAM_ID: u16 = 0x0004;
/// `datagram` TLV tag (the EMM datagram in `DATA_PROVISION`).
pub const EMMG_VAR_DATAGRAM: u16 = 0x0005;
/// `bandwidth` TLV tag.
pub const EMMG_VAR_BANDWIDTH: u16 = 0x0006;
/// `data_type` TLV tag.
pub const EMMG_VAR_DATA_TYPE: u16 = 0x0007;
/// `data_id` TLV tag.
pub const EMMG_VAR_DATA_ID: u16 = 0x0008;

/// `error_status` TLV tag (common to all `SimulCrypt` protocols).
pub const EMMG_VAR_ERROR_STATUS: u16 = 0x7000;
/// `error_info` TLV tag (common to all `SimulCrypt` protocols).
pub const EMMG_VAR_ERROR_INFO: u16 = 0x7001;

/// EMMG error codes - values fixed by the `SimulCrypt` protocol.
pub const EMMG_ERR_INVALID_MESSAGE: u16 = 0x0001;
/// Unknown `stream_id`.
pub const EMMG_ERR_UNKNOWN_STREAM_ID: u16 = 0x0005;
/// Unknown `channel_id`.
pub const EMMG_ERR_UNKNOWN_CHANNEL_ID: u16 = 0x0006;
/// Unknown `super_cas_id` (the `channel_id` is known but bound to another CAS).
pub const EMMG_ERR_UNKNOWN_SUPER_CAS_ID: u16 = 0x000E;
/// `channel_id` is already taken by another channel.
pub const EMMG_ERR_CHANNEL_IN_USE: u16 = 0x0011;