Skip to main content

sccp_protocol/message/
catalog.rs

1//! SCCP/SPCP message identifiers and direction metadata for the message domain.
2//!
3//! The numeric values are protocol facts.  The catalog intentionally includes
4//! messages which this crate can only preserve opaquely today: knowing the ID
5//! is still useful for bounded forwarding and future typed implementations.
6//!
7//! Start with [`MessageId`] when inspecting an unknown frame. Its
8//! [`MessageId::contract`] links the numeric identifier to routing, payload
9//! bounds, codec coverage, response selection, and field fidelity. Use
10//! [`implemented_message_contracts`] to enumerate the typed subset.
11
12use std::fmt;
13
14use super::wire::{HEADER_SIZE, MAX_FRAME_SIZE};
15
16/// The protocol roles between which a message is normally sent.
17///
18/// SCCP is not solely a station/client protocol. Conference resources, media
19/// resource services, and call-control peers share the same numeric message
20/// space. Keeping those routes explicit prevents a decoder or runtime from
21/// treating a service-node frame as handset input merely because both travel
22/// toward call control.
23#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
24pub enum MessageRoute {
25    StationToControl,
26    ControlToStation,
27    ControlToServiceNode,
28    ServiceNodeToControl,
29    IntraControl,
30}
31
32/// Legacy station-oriented view of the two handset message directions.
33///
34/// New code should use [`MessageRoute`]. A service-node or intra-control
35/// message deliberately has no `MessageDirection`.
36#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
37pub enum MessageDirection {
38    DeviceToServer,
39    ServerToDevice,
40}
41
42/// How completely the public message model implements a catalog entry.
43#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
44pub enum CodecSupport {
45    /// The message has a typed public representation and a checked codec.
46    Typed,
47    /// Only the identifier, direction, and opaque bytes are preserved.
48    OpaqueOnly,
49}
50
51/// The rule used to choose and bound a message payload layout.
52#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
53pub enum PayloadLayout {
54    /// No semantic payload bytes are carried.
55    Empty,
56    /// One fixed layout is used for all supported protocol versions.
57    Fixed,
58    /// The negotiated protocol selects between fixed layouts.
59    VersionSelected,
60    /// The negotiated protocol and exact body length jointly select a layout.
61    VersionAndLengthSelected,
62    /// A typed fixed prefix is decoded while a bounded extension is preserved.
63    MinimumLengthPreserved,
64    /// A bounded length/count field controls a variable tail.
65    LengthPrefixed,
66    /// A bounded payload is retained exactly while consumers may inspect it.
67    BoundedPreserved,
68    /// A bounded extension is retained byte-for-byte because its internal
69    /// schema is not modeled.
70    BoundedOpaque,
71    /// NUL-terminated station strings are followed by zero bytes to a
72    /// four-byte boundary.
73    DynamicWordPadded,
74    /// The crate deliberately does not interpret the payload.
75    Opaque,
76}
77
78/// Whether application code can construct a message without supplying raw
79/// wire bytes.
80#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
81pub enum EmissionSupport {
82    /// A typed encoder is available.
83    Typed,
84    /// Bytes can be forwarded explicitly through `KnownOpaque`, but there is
85    /// no typed constructor and runtime code must not synthesize the message.
86    PreserveOnly,
87}
88
89/// Present production/runtime role of a known message.
90#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
91pub enum RuntimeUse {
92    /// A typed phone-originated input accepted by the session runtime.
93    DeviceInput,
94    /// A server response required by a currently handled phone request.
95    RequiredResponse,
96    /// A server output emitted only for the corresponding configured feature
97    /// or call state.
98    ConditionalServerOutput,
99    /// A typed service-node input accepted by its independent runtime.
100    ServiceNodeInput,
101    /// A service-node output emitted only for an owned reservation transition.
102    ConditionalServiceNodeOutput,
103    /// The codec is typed for conformance/testing, but ordinary runtime flows
104    /// intentionally do not emit it.
105    TypedButNotEmitted,
106    /// Only catalog metadata and explicit opaque preservation are supported.
107    CatalogOnly,
108}
109
110/// Whether all semantic wire fields survive typed decoding and re-encoding.
111#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
112pub enum FieldFidelity {
113    /// Every accepted semantic field is represented; reserved/padding bytes
114    /// are validated rather than exposed.
115    Lossless,
116    /// A server-only producer omits or fills the named fields. Decoding may
117    /// project other values, so this is not an exact decode/re-encode guarantee.
118    CanonicalServerOutput(&'static str),
119    /// Typed decoding is intentionally projected onto the named runtime data.
120    SemanticProjection(&'static str),
121    /// The uninterpreted bounded body is retained exactly.
122    OpaquePreserved,
123}
124
125/// SCCP-level response expected for a request or media transaction.
126#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
127pub enum ResponseExpectation {
128    None,
129    Message(MessageId),
130    OptionalMessage(MessageId),
131    /// The negotiated protocol selects the response identifier.
132    VersionSelected {
133        /// Response used before `minimum_protocol`.
134        before: MessageId,
135        /// Response used at and after `minimum_protocol`.
136        from: MessageId,
137        /// First protocol version that selects `from`.
138        minimum_protocol: u8,
139    },
140    /// Negotiated session inputs select the response identifier.
141    SessionSelected {
142        /// Response used when `selector` does not select the dynamic form.
143        before: MessageId,
144        /// Dynamic response selected by `selector`.
145        from: MessageId,
146        /// Session rule that chooses between the response identifiers.
147        selector: SessionResponseSelector,
148    },
149    /// The response may be any member of this family.
150    OneOf(&'static [MessageId]),
151}
152
153/// Session rule used to select a dynamic response identifier.
154#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
155pub enum SessionResponseSelector {
156    /// Select the dynamic form when the feature is present or the negotiated
157    /// protocol meets the stated minimum.
158    DynamicMessagesOrProtocol { minimum_protocol: u8 },
159    /// Select the dynamic form only when the feature is present.
160    DynamicMessages,
161}
162
163/// Verification depth for a wire contract.
164#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
165pub enum ContractVerification {
166    Structural,
167    StructuralAndValidated,
168}
169
170/// Whether an identifier belongs to the base station-control inventory or an
171/// independently supported extension family.
172#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
173pub enum ContractScope {
174    Base,
175    Supplemental,
176}
177
178/// Inclusive payload-size bounds, excluding the 12-byte frame header.
179#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
180pub struct PayloadSizeBounds {
181    /// Smallest accepted payload in bytes.
182    pub minimum: usize,
183    /// Largest accepted payload in bytes.
184    pub maximum: usize,
185}
186
187/// Machine-readable support record for one known message identifier.
188///
189/// This is an implementation inventory, not a claim that every cataloged
190/// message is safe to send. `OpaqueOnly` entries exist for bounded forwarding
191/// and remain non-emittable through the typed API. `response`
192/// describes SCCP transaction acknowledgement; TCP acknowledgement is
193/// intentionally not treated as application-level acceptance.
194#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
195pub struct MessageContract {
196    pub id: MessageId,
197    pub scope: ContractScope,
198    pub route: MessageRoute,
199    pub codec: CodecSupport,
200    pub payload_layout: PayloadLayout,
201    /// Canonical typed-encoder payload size when there is one stable,
202    /// independently useful value. This excludes the 12-byte frame header;
203    /// nominally empty decoders may still accept bounded extension bytes.
204    pub fixed_payload_bytes: Option<usize>,
205    /// Accepted payload-size range when both bounds are known.
206    pub payload_size_bounds: Option<PayloadSizeBounds>,
207    /// Typed construction versus explicit opaque preservation.
208    pub emission: EmissionSupport,
209    /// Production/runtime use, distinct from mere encoder availability.
210    pub runtime_use: RuntimeUse,
211    /// Whether the typed model retains every accepted semantic wire field.
212    pub field_fidelity: FieldFidelity,
213    /// SCCP response/acknowledgement family, when one exists.
214    pub response: ResponseExpectation,
215    /// Depth of contract validation performed by the codec.
216    pub verification: ContractVerification,
217}
218
219/// Contract fields which are declared once beside a message's numeric ID and route.
220///
221/// Keeping the complete metadata record in the catalog entry prevents independent
222/// exhaustive matches from drifting or describing an incoherent wire contract.
223#[derive(Clone, Copy)]
224struct ContractMetadata {
225    scope: ContractScope,
226    codec: CodecSupport,
227    payload_layout: PayloadLayout,
228    fixed_payload_bytes: Option<usize>,
229    payload_size_bounds: Option<PayloadSizeBounds>,
230    runtime_use: RuntimeUse,
231    field_fidelity: FieldFidelity,
232    response: ResponseExpectation,
233    verification: ContractVerification,
234}
235
236impl ContractMetadata {
237    const fn into_contract(self, id: MessageId, route: MessageRoute) -> MessageContract {
238        MessageContract {
239            id,
240            scope: self.scope,
241            route,
242            codec: self.codec,
243            payload_layout: self.payload_layout,
244            fixed_payload_bytes: self.fixed_payload_bytes,
245            payload_size_bounds: self.payload_size_bounds,
246            emission: match self.codec {
247                CodecSupport::Typed => EmissionSupport::Typed,
248                CodecSupport::OpaqueOnly => EmissionSupport::PreserveOnly,
249            },
250            runtime_use: self.runtime_use,
251            field_fidelity: self.field_fidelity,
252            response: self.response,
253            verification: self.verification,
254        }
255    }
256}
257
258macro_rules! message_catalog {
259    ($(($variant:ident $(=> $wire_name:ident)?, $value:expr, $route:ident, $metadata:expr)),+ $(,)?) => {
260        /// A Skinny message identifier.
261        ///
262        /// Unknown values are retained to keep decoding forward-compatible.
263        #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
264        pub enum MessageId {
265            $($variant,)+
266            Unknown(u32),
267        }
268
269        impl MessageId {
270            pub const ALL_KNOWN: &'static [Self] = &[$(Self::$variant,)+];
271            /// Declarative contract records generated in catalog order.
272            pub const ALL_CONTRACTS: &'static [MessageContract] = &[
273                $($metadata.into_contract(Self::$variant, MessageRoute::$route),)+
274            ];
275
276            pub const fn wire_value(self) -> u32 {
277                match self {
278                    $(Self::$variant => $value,)+
279                    Self::Unknown(value) => value,
280                }
281            }
282
283            /// Returns the protocol route for a known identifier.
284            ///
285            /// Unknown identifiers return `None` because direction cannot be
286            /// inferred from their numeric value alone.
287            pub const fn route(self) -> Option<MessageRoute> {
288                match self {
289                    $(Self::$variant => Some(MessageRoute::$route),)+
290                    Self::Unknown(_) => None,
291                }
292            }
293
294            /// Return the legacy two-ended station direction, if applicable.
295            pub const fn direction(self) -> Option<MessageDirection> {
296                match self.route() {
297                    Some(MessageRoute::StationToControl) => {
298                        Some(MessageDirection::DeviceToServer)
299                    }
300                    Some(MessageRoute::ControlToStation) => {
301                        Some(MessageDirection::ServerToDevice)
302                    }
303                    Some(MessageRoute::ControlToServiceNode)
304                    | Some(MessageRoute::ServiceNodeToControl)
305                    | Some(MessageRoute::IntraControl)
306                    | None => None,
307                }
308            }
309
310            pub const fn name(self) -> &'static str {
311                match self {
312                    $(Self::$variant => stringify!($variant),)+
313                    Self::Unknown(_) => "Unknown",
314                }
315            }
316
317            pub const fn is_known(self) -> bool {
318                !matches!(self, Self::Unknown(_))
319            }
320
321            /// Return the codec and wire contract for this identifier.
322            pub const fn contract(self) -> Option<MessageContract> {
323                match self {
324                    $(
325                        Self::$variant => Some(
326                            $metadata.into_contract(Self::$variant, MessageRoute::$route)
327                        ),
328                    )+
329                    Self::Unknown(_) => None,
330                }
331            }
332        }
333
334        impl From<u32> for MessageId {
335            fn from(value: u32) -> Self {
336                match value {
337                    $($value => Self::$variant,)+
338                    value => Self::Unknown(value),
339                }
340            }
341        }
342
343        /// Raw identifiers used internally where Rust patterns require integer constants.
344        pub(crate) mod wire_id {
345            $(
346                $(pub(crate) const $wire_name: u32 =
347                    super::MessageId::$variant.wire_value();)?
348            )+
349        }
350    };
351}
352message_catalog! {
353    (KeepAlive => KEEP_ALIVE, 0x0000, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Empty, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: MAX_FRAME_SIZE - HEADER_SIZE }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("nominally empty request; bounded extension bytes are accepted but not modeled"), response: ResponseExpectation::Message(MessageId::KeepAliveAck), verification: ContractVerification::StructuralAndValidated }),
354    (Register => REGISTER, 0x0001, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionAndLengthSelected, fixed_payload_bytes: None, payload_size_bounds: Some(PayloadSizeBounds { minimum: 32, maximum: 172 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("device and firmware text are normalized while the exact length-selected layout is retained"), response: ResponseExpectation::Message(MessageId::RegisterAck), verification: ContractVerification::StructuralAndValidated }),
355    (IpPort => IP_PORT, 0x0002, StationToControl, ContractMetadata { scope: ContractScope::Supplemental, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
356    (KeypadButton => KEYPAD_BUTTON, 0x0003, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionAndLengthSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
357    (EnblocCall => ENBLOC_CALL, 0x0004, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionAndLengthSelected, fixed_payload_bytes: None, payload_size_bounds: Some(PayloadSizeBounds { minimum: 24, maximum: 32 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
358    (Stimulus => STIMULUS, 0x0005, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
359    (OffHook => OFF_HOOK, 0x0006, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
360    (OnHook => ON_HOOK, 0x0007, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionAndLengthSelected, fixed_payload_bytes: None, payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: 8 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("fieldless form omits line and call identity"), response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
361    (HookFlash => HOOK_FLASH, 0x0008, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
362    (ForwardStatusRequest => FORWARD_STAT_REQ, 0x0009, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
363    (SpeedDialStatusRequest => SPEED_DIAL_STAT_REQ, 0x000a, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::SessionSelected { before: MessageId::SpeedDialStatus, from: MessageId::SpeedDialStatusDynamic, selector: SessionResponseSelector::DynamicMessagesOrProtocol { minimum_protocol: 9 } }, verification: ContractVerification::Structural }),
364    (LineStatusRequest => LINE_STAT_REQ, 0x000b, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::SessionSelected { before: MessageId::LineStatus, from: MessageId::LineStatusDynamic, selector: SessionResponseSelector::DynamicMessagesOrProtocol { minimum_protocol: 9 } }, verification: ContractVerification::Structural }),
365    (ConfigStatusRequest => CONFIG_STAT_REQ, 0x000c, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Empty, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: MAX_FRAME_SIZE - HEADER_SIZE }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("nominally empty request; bounded extension bytes are accepted but not modeled"), response: ResponseExpectation::SessionSelected { before: MessageId::ConfigStatus, from: MessageId::ConfigStatusDynamic, selector: SessionResponseSelector::DynamicMessagesOrProtocol { minimum_protocol: 9 } }, verification: ContractVerification::Structural }),
366    (TimeDateRequest => TIME_DATE_REQ, 0x000d, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Empty, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: MAX_FRAME_SIZE - HEADER_SIZE }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("nominally empty request; bounded extension bytes are accepted but not modeled"), response: ResponseExpectation::Message(MessageId::DefineTimeDate), verification: ContractVerification::Structural }),
367    (ButtonTemplateRequest => BUTTON_TEMPLATE_REQ, 0x000e, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Empty, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: MAX_FRAME_SIZE - HEADER_SIZE }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("the optional total-button-count request word is accepted but not modeled"), response: ResponseExpectation::Message(MessageId::ButtonTemplate), verification: ContractVerification::Structural }),
368    (VersionRequest => VERSION_REQ, 0x000f, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Empty, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: MAX_FRAME_SIZE - HEADER_SIZE }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("nominally empty request; bounded extension bytes are accepted but not modeled"), response: ResponseExpectation::Message(MessageId::Version), verification: ContractVerification::Structural }),
369    (CapabilitiesResponse => CAPABILITIES_RES, 0x0010, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionAndLengthSelected, fixed_payload_bytes: None, payload_size_bounds: Some(PayloadSizeBounds { minimum: 4, maximum: 388 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("advertised capability count; inactive fixed-reservoir entries are not modeled"), response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
370    (MediaPortList => MEDIA_PORT_LIST, 0x0011, StationToControl, ContractMetadata { scope: ContractScope::Supplemental, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(68), payload_size_bounds: Some(PayloadSizeBounds { minimum: 68, maximum: 68 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("inactive fixed-array entries are not modeled"), response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
371    (ServerRequest => SERVER_REQ, 0x0012, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Empty, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: MAX_FRAME_SIZE - HEADER_SIZE }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("nominally empty request; bounded extension bytes are accepted but not modeled"), response: ResponseExpectation::Message(MessageId::ServerResponse), verification: ContractVerification::Structural }),
372    (Alarm => ALARM, 0x0020, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
373    (MulticastMediaReceptionAck => MULTICAST_MEDIA_RECEPTION_ACK, 0x0021, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(12), payload_size_bounds: Some(PayloadSizeBounds { minimum: 12, maximum: 12 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
374    (OpenReceiveChannelAck => OPEN_RECEIVE_CHANNEL_ACK, 0x0022, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
375    (ConnectionStatisticsResponse => CONNECTION_STATISTICS_RES, 0x0023, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionAndLengthSelected, fixed_payload_bytes: None, payload_size_bounds: Some(PayloadSizeBounds { minimum: 61, maximum: 668 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("inactive fixed quality-reservoir bytes are not modeled"), response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
376    (OffHookWithCallingParty => OFF_HOOK_WITH_CALLING_PARTY, 0x0024, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
377    (SoftKeySetRequest => SOFT_KEY_SET_REQ, 0x0025, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Empty, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: MAX_FRAME_SIZE - HEADER_SIZE }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("nominally empty request; bounded extension bytes are accepted but not modeled"), response: ResponseExpectation::Message(MessageId::SoftKeySetResponse), verification: ContractVerification::Structural }),
378    (SoftKeyEvent => SOFT_KEY_EVENT, 0x0026, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
379    (Unregister => UNREGISTER, 0x0027, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("an empty reason-zero body is accepted and normalized to the typed reason"), response: ResponseExpectation::Message(MessageId::UnregisterAck), verification: ContractVerification::Structural }),
380    (SoftKeyTemplateRequest => SOFT_KEY_TEMPLATE_REQ, 0x0028, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Empty, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: MAX_FRAME_SIZE - HEADER_SIZE }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("nominally empty request; bounded extension bytes are accepted but not modeled"), response: ResponseExpectation::Message(MessageId::SoftKeyTemplateResponse), verification: ContractVerification::Structural }),
381    (RegisterTokenRequest => REGISTER_TOKEN_REQ, 0x0029, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("simultaneously populated IPv4 and IPv6 station addresses collapse to one address"), response: ResponseExpectation::OneOf(&[MessageId::RegisterTokenAck, MessageId::RegisterTokenReject]), verification: ContractVerification::Structural }),
382    (MediaTransmissionFailure => MEDIA_TRANSMISSION_FAILURE, 0x002a, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("the public status is synthesized because the failure wire layouts carry no status"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
383    (HeadsetStatus => HEADSET_STATUS, 0x002b, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("non-canonical raw states are projected onto a boolean"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
384    (MediaResourceNotification => MEDIA_RESOURCE_NOTIFICATION, 0x002c, ServiceNodeToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
385    (RegisterAvailableLines => REGISTER_AVAILABLE_LINES, 0x002d, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("an absent or short legacy body is projected onto zero available lines"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
386    (DeviceToUserData => DEVICE_TO_USER_DATA, 0x002e, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::LengthPrefixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
387    (DeviceToUserDataResponse => DEVICE_TO_USER_DATA_RESPONSE, 0x002f, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::LengthPrefixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
388    (UpdateCapabilities => UPDATE_CAPABILITIES, 0x0030, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionAndLengthSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
389    (OpenMultimediaReceiveChannelAck => OPEN_MULTIMEDIA_RECEIVE_CHANNEL_ACK, 0x0031, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
390    (ClearConference => CLEAR_CONFERENCE, 0x0032, ServiceNodeToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
391    (ServiceUrlStatusRequest => SERVICE_URL_STAT_REQ, 0x0033, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::SessionSelected { before: MessageId::ServiceUrlStatus, from: MessageId::ServiceUrlStatusDynamic, selector: SessionResponseSelector::DynamicMessagesOrProtocol { minimum_protocol: 9 } }, verification: ContractVerification::Structural }),
392    (FeatureStatusRequest => FEATURE_STAT_REQ, 0x0034, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::SessionSelected { before: MessageId::FeatureStatus, from: MessageId::FeatureStatusDynamic, selector: SessionResponseSelector::DynamicMessages }, verification: ContractVerification::Structural }),
393    (CreateConferenceResponse => CREATE_CONFERENCE_RES, 0x0035, ServiceNodeToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::LengthPrefixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
394    (DeleteConferenceResponse => DELETE_CONFERENCE_RES, 0x0036, ServiceNodeToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
395    (ModifyConferenceResponse => MODIFY_CONFERENCE_RES, 0x0037, ServiceNodeToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::LengthPrefixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
396    (AddParticipantResponse => ADD_PARTICIPANT_RES, 0x0038, ServiceNodeToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::MinimumLengthPreserved, fixed_payload_bytes: Some(272), payload_size_bounds: Some(PayloadSizeBounds { minimum: 12, maximum: 272 }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
397    (AuditConferenceResponse => AUDIT_CONFERENCE_RES, 0x0039, ServiceNodeToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::LengthPrefixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
398    (AuditParticipantResponse => AUDIT_PARTICIPANT_RES, 0x0040, ServiceNodeToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::BoundedOpaque, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
399    (DeviceToUserDataV1 => DEVICE_TO_USER_DATA_V1, 0x0041, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::LengthPrefixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
400    (DeviceToUserDataResponseV1 => DEVICE_TO_USER_DATA_RESPONSE_V1, 0x0042, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::LengthPrefixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
401    (UpdateCapabilitiesV2 => UPDATE_CAPABILITIES_V2, 0x0043, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(2000), payload_size_bounds: Some(PayloadSizeBounds { minimum: 2000, maximum: 2000 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
402    (UpdateCapabilitiesV3 => UPDATE_CAPABILITIES_V3, 0x0044, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::MinimumLengthPreserved, fixed_payload_bytes: None, payload_size_bounds: Some(PayloadSizeBounds { minimum: 20, maximum: 2380 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
403    (PortResponse => PORT_RESPONSE, 0x0045, ServiceNodeToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::SemanticProjection("pre-v20 bodies omit media type, which is synthesized on decode"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
404    (QosReservationNotify => QOS_RESERVATION_NOTIFY, 0x0046, ServiceNodeToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(24), payload_size_bounds: Some(PayloadSizeBounds { minimum: 24, maximum: 24 }), runtime_use: RuntimeUse::ServiceNodeInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
405    (QosErrorNotify => QOS_ERROR_NOTIFY, 0x0047, ServiceNodeToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(44), payload_size_bounds: Some(PayloadSizeBounds { minimum: 44, maximum: 44 }), runtime_use: RuntimeUse::ServiceNodeInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
406    (SubscriptionStatusRequest => SUBSCRIPTION_STAT_REQ, 0x0048, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
407    (MediaPathEvent => ACCESSORY_STATUS, 0x0049, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
408    (MediaPathCapability => MEDIA_PATH_CAPABILITY, 0x004a, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
409    (MwiNotification => MWI_NOTIFICATION, 0x004c, ServiceNodeToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(88), payload_size_bounds: Some(PayloadSizeBounds { minimum: 88, maximum: 88 }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
410    (RegisterAck => REGISTER_ACK, 0x0081, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(20), payload_size_bounds: Some(PayloadSizeBounds { minimum: 20, maximum: 20 }), runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
411    (StartTone => START_TONE, 0x0082, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
412    (StopTone => STOP_TONE, 0x0083, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::CanonicalServerOutput("post-v11 tone word"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
413    (SetRinger => SET_RINGER, 0x0085, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
414    (SetLamp => SET_LAMP, 0x0086, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
415    (SetHookFlashDetect => SET_HOOK_FLASH_DETECT, 0x0087, ControlToStation, ContractMetadata { scope: ContractScope::Supplemental, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: 0 }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
416    (SetSpeakerMode => SET_SPEAKER_MODE, 0x0088, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
417    (SetMicrophoneMode => SET_MICROPHONE_MODE, 0x0089, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
418    (StartMediaTransmission => START_MEDIA_TRANSMISSION, 0x008a, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::OptionalMessage(MessageId::StartMediaTransmissionAck), verification: ContractVerification::StructuralAndValidated }),
419    (StopMediaTransmission => STOP_MEDIA_TRANSMISSION, 0x008b, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(16), payload_size_bounds: Some(PayloadSizeBounds { minimum: 16, maximum: 16 }), runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
420    (StartMediaReception => START_MEDIA_RECEPTION, 0x008c, ControlToStation, ContractMetadata { scope: ContractScope::Supplemental, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: 0 }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
421    (StopMediaReception => STOP_MEDIA_RECEPTION, 0x008d, ControlToStation, ContractMetadata { scope: ContractScope::Supplemental, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(8), payload_size_bounds: Some(PayloadSizeBounds { minimum: 8, maximum: 8 }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
422    (CallInfo => CALL_INFO, 0x008f, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::CanonicalServerOutput("mailboxes, call instance/security and version-selected party metadata"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
423    (ForwardStatus => FORWARD_STAT, 0x0090, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::CanonicalServerOutput("aggregate active flag and inactive forwarding-number slots"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
424    (SpeedDialStatus => SPEED_DIAL_STAT, 0x0091, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
425    (LineStatus => LINE_STAT, 0x0092, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(112), payload_size_bounds: Some(PayloadSizeBounds { minimum: 112, maximum: 112 }), runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::CanonicalServerOutput("display label/fully-qualified display name and display-options word"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
426    (ConfigStatus => CONFIG_STAT, 0x0093, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
427    (DefineTimeDate => DEFINE_TIME_DATE, 0x0094, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(36), payload_size_bounds: Some(PayloadSizeBounds { minimum: 36, maximum: 36 }), runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
428    (StartSessionTransmission => START_SESSION_TRANSMISSION, 0x0095, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
429    (StopSessionTransmission => STOP_SESSION_TRANSMISSION, 0x0096, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
430    (ButtonTemplate => BUTTON_TEMPLATE, 0x0097, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(96), payload_size_bounds: Some(PayloadSizeBounds { minimum: 96, maximum: 96 }), runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::CanonicalServerOutput("unused fixed-array entries outside the declared template count"), response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
431    (Version => VERSION, 0x0098, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
432    (DisplayText => DISPLAY_TEXT, 0x0099, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
433    (ClearDisplay => CLEAR_DISPLAY, 0x009a, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Empty, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: MAX_FRAME_SIZE - HEADER_SIZE }), runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::CanonicalServerOutput("display-control word"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
434    (CapabilitiesRequest => CAPABILITIES_REQ, 0x009b, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Empty, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: MAX_FRAME_SIZE - HEADER_SIZE }), runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::CanonicalServerOutput("nominally empty response; accepted extension bytes are not modeled"), response: ResponseExpectation::OneOf(&[MessageId::CapabilitiesResponse, MessageId::UpdateCapabilities, MessageId::UpdateCapabilitiesV2, MessageId::UpdateCapabilitiesV3]), verification: ContractVerification::Structural }),
435    (EnunciatorCommand => ENUNCIATOR_COMMAND, 0x009c, ControlToStation, ContractMetadata { scope: ContractScope::Supplemental, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: 0 }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
436    (RegisterReject => REGISTER_REJECT, 0x009d, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
437    (ServerResponse => SERVER_RES, 0x009e, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::SemanticProjection("empty server-list slot positions are not retained"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
438    (Reset => RESET, 0x009f, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
439    (KeepAliveAck => KEEP_ALIVE_ACK, 0x0100, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Empty, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: MAX_FRAME_SIZE - HEADER_SIZE }), runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::CanonicalServerOutput("nominally empty response; accepted extension bytes are not modeled"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
440    (StartMulticastMediaReception => START_MULTICAST_MEDIA_RECEPTION, 0x0101, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
441    (StartMulticastMediaTransmission => START_MULTICAST_MEDIA_TRANSMISSION, 0x0102, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
442    (StopMulticastMediaReception => STOP_MULTICAST_MEDIA_RECEPTION, 0x0103, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
443    (StopMulticastMediaTransmission => STOP_MULTICAST_MEDIA_TRANSMISSION, 0x0104, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
444    (OpenReceiveChannel => OPEN_RECEIVE_CHANNEL, 0x0105, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::Message(MessageId::OpenReceiveChannelAck), verification: ContractVerification::StructuralAndValidated }),
445    (CloseReceiveChannel => CLOSE_RECEIVE_CHANNEL, 0x0106, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(16), payload_size_bounds: Some(PayloadSizeBounds { minimum: 16, maximum: 16 }), runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
446    (ConnectionStatisticsRequest => CONNECTION_STATISTICS_REQ, 0x0107, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::CanonicalServerOutput("post-v18 directory-number alignment bytes"), response: ResponseExpectation::Message(MessageId::ConnectionStatisticsResponse), verification: ContractVerification::Structural }),
447    (SoftKeyTemplateResponse => SOFT_KEY_TEMPLATE_RES, 0x0108, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(652), payload_size_bounds: Some(PayloadSizeBounds { minimum: 652, maximum: 652 }), runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::CanonicalServerOutput("unused fixed-array entries outside the declared template count"), response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
448    (SoftKeySetResponse => SOFT_KEY_SET_RES, 0x0109, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(780), payload_size_bounds: Some(PayloadSizeBounds { minimum: 780, maximum: 780 }), runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::CanonicalServerOutput("unused fixed-array entries outside the declared template count"), response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
449    (SelectSoftKeys => SELECT_SOFT_KEYS, 0x0110, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
450    (CallState => CALL_STATE, 0x0111, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::CanonicalServerOutput("visibility, precedence and domain"), response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
451    (DisplayPromptStatus => DISPLAY_PROMPT_STATUS, 0x0112, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
452    (ClearPromptStatus => CLEAR_PROMPT_STATUS, 0x0113, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
453    (DisplayNotify => DISPLAY_NOTIFY, 0x0114, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
454    (ClearNotify => CLEAR_NOTIFY, 0x0115, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Empty, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: MAX_FRAME_SIZE - HEADER_SIZE }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::CanonicalServerOutput("nominally empty response; accepted extension bytes are not modeled"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
455    (ActivateCallPlane => ACTIVATE_CALL_PLANE, 0x0116, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
456    (DeactivateCallPlane => DEACTIVATE_CALL_PLANE, 0x0117, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Empty, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: MAX_FRAME_SIZE - HEADER_SIZE }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::CanonicalServerOutput("nominally empty response; accepted extension bytes are not modeled"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
457    (UnregisterAck => UNREGISTER_ACK, 0x0118, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::CanonicalServerOutput("acknowledgement body word"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
458    (BackspaceResponse => BACKSPACE_RESPONSE, 0x0119, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
459    (RegisterTokenAck => REGISTER_TOKEN_ACK, 0x011a, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Empty, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: MAX_FRAME_SIZE - HEADER_SIZE }), runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::CanonicalServerOutput("nominally empty response; accepted extension bytes are not modeled"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
460    (RegisterTokenReject => REGISTER_TOKEN_REJECT, 0x011b, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
461    (StartMediaFailureDetection => START_MEDIA_FAILURE_DETECTION, 0x011c, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(28), payload_size_bounds: Some(PayloadSizeBounds { minimum: 28, maximum: 28 }), runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
462    (DialedNumber => DIALED_NUMBER, 0x011d, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
463    (UserToDeviceData => USER_TO_DEVICE_DATA, 0x011e, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::LengthPrefixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
464    (FeatureStatus => FEATURE_STAT, 0x011f, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
465    (DisplayPriorityNotify => DISPLAY_PRIORITY_NOTIFY, 0x0120, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
466    (ClearPriorityNotify => CLEAR_PRIORITY_NOTIFY, 0x0121, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
467    (StartAnnouncement => START_ANNOUNCEMENT, 0x0122, IntraControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::CanonicalServerOutput("unused announcement and conference-party array entries"), response: ResponseExpectation::None, verification: ContractVerification::Structural }),
468    (StopAnnouncement => STOP_ANNOUNCEMENT, 0x0123, IntraControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
469    (AnnouncementFinish => ANNOUNCEMENT_FINISH, 0x0124, IntraControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
470    (NotifyDtmfTone => NOTIFY_DTMF_TONE, 0x0127, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(12), payload_size_bounds: Some(PayloadSizeBounds { minimum: 12, maximum: 12 }), runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
471    (SendDtmfTone => SEND_DTMF_TONE, 0x0128, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(12), payload_size_bounds: Some(PayloadSizeBounds { minimum: 12, maximum: 12 }), runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
472    (SubscribeDtmfPayloadRequest => SUBSCRIBE_DTMF_PAYLOAD_REQ, 0x0129, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(16), payload_size_bounds: Some(PayloadSizeBounds { minimum: 16, maximum: 16 }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::Message(MessageId::SubscribeDtmfPayloadResponse), verification: ContractVerification::Structural }),
473    (SubscribeDtmfPayloadResponse => SUBSCRIBE_DTMF_PAYLOAD_RES, 0x012a, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(12), payload_size_bounds: Some(PayloadSizeBounds { minimum: 12, maximum: 12 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
474    (SubscribeDtmfPayloadError => SUBSCRIBE_DTMF_PAYLOAD_ERR, 0x012b, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(12), payload_size_bounds: Some(PayloadSizeBounds { minimum: 12, maximum: 12 }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
475    (UnsubscribeDtmfPayloadRequest => UNSUBSCRIBE_DTMF_PAYLOAD_REQ, 0x012c, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(16), payload_size_bounds: Some(PayloadSizeBounds { minimum: 16, maximum: 16 }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::Message(MessageId::UnsubscribeDtmfPayloadResponse), verification: ContractVerification::Structural }),
476    (UnsubscribeDtmfPayloadResponse => UNSUBSCRIBE_DTMF_PAYLOAD_RES, 0x012d, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(12), payload_size_bounds: Some(PayloadSizeBounds { minimum: 12, maximum: 12 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
477    (UnsubscribeDtmfPayloadError => UNSUBSCRIBE_DTMF_PAYLOAD_ERR, 0x012e, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(12), payload_size_bounds: Some(PayloadSizeBounds { minimum: 12, maximum: 12 }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
478    (ServiceUrlStatus => SERVICE_URL_STAT, 0x012f, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
479    (CallSelectStatus => CALL_SELECT_STAT, 0x0130, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
480    (OpenMultimediaChannel => OPEN_MULTIMEDIA_CHANNEL, 0x0131, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::Message(MessageId::OpenMultimediaReceiveChannelAck), verification: ContractVerification::Structural }),
481    (StartMultimediaTransmission => START_MULTIMEDIA_TRANSMISSION, 0x0132, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::Message(MessageId::StartMultimediaTransmissionAck), verification: ContractVerification::Structural }),
482    (StopMultimediaTransmission => STOP_MULTIMEDIA_TRANSMISSION, 0x0133, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(16), payload_size_bounds: Some(PayloadSizeBounds { minimum: 16, maximum: 16 }), runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
483    (MiscellaneousCommand => MISCELLANEOUS_COMMAND, 0x0134, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(52), payload_size_bounds: Some(PayloadSizeBounds { minimum: 52, maximum: 52 }), runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
484    (FlowControlCommand => FLOW_CONTROL_COMMAND, 0x0135, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(16), payload_size_bounds: Some(PayloadSizeBounds { minimum: 16, maximum: 16 }), runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
485    (CloseMultimediaReceiveChannel => CLOSE_MULTIMEDIA_RECEIVE_CHANNEL, 0x0136, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(16), payload_size_bounds: Some(PayloadSizeBounds { minimum: 16, maximum: 16 }), runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
486    (CreateConferenceRequest => CREATE_CONFERENCE_REQ, 0x0137, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::LengthPrefixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::Message(MessageId::CreateConferenceResponse), verification: ContractVerification::Structural }),
487    (DeleteConferenceRequest => DELETE_CONFERENCE_REQ, 0x0138, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::Message(MessageId::DeleteConferenceResponse), verification: ContractVerification::Structural }),
488    (ModifyConferenceRequest => MODIFY_CONFERENCE_REQ, 0x0139, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::LengthPrefixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::Message(MessageId::ModifyConferenceResponse), verification: ContractVerification::Structural }),
489    (AddParticipantRequest => ADD_PARTICIPANT_REQ, 0x013a, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::Message(MessageId::AddParticipantResponse), verification: ContractVerification::Structural }),
490    (DropParticipantRequest => DROP_PARTICIPANT_REQ, 0x013b, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
491    (AuditConferenceRequest => AUDIT_CONFERENCE_REQ, 0x013c, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(0), payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: 0 }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::Message(MessageId::AuditConferenceResponse), verification: ContractVerification::Structural }),
492    (AuditParticipantRequest => AUDIT_PARTICIPANT_REQ, 0x013d, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::Message(MessageId::AuditParticipantResponse), verification: ContractVerification::Structural }),
493    (ChangeParticipantRequest => CHANGE_PARTICIPANT_REQ, 0x013e, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
494    (UserToDeviceDataV1 => USER_TO_DEVICE_DATA_V1, 0x013f, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::LengthPrefixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
495    (VideoDisplayCommand => VIDEO_DISPLAY_COMMAND, 0x0140, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(12), payload_size_bounds: Some(PayloadSizeBounds { minimum: 12, maximum: 12 }), runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
496    (FlowControlNotify => FLOW_CONTROL_NOTIFY, 0x0141, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(16), payload_size_bounds: Some(PayloadSizeBounds { minimum: 16, maximum: 16 }), runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
497    (ConfigStatusDynamic => CONFIG_STAT_DYNAMIC, 0x0142, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::DynamicWordPadded, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
498    (DisplayDynamicNotify => DISPLAY_DYNAMIC_NOTIFY, 0x0143, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::DynamicWordPadded, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
499    (DisplayDynamicPriorityNotify => DISPLAY_DYNAMIC_PRIORITY_NOTIFY, 0x0144, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::DynamicWordPadded, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
500    (DisplayDynamicPromptStatus => DISPLAY_DYNAMIC_PROMPT_STATUS, 0x0145, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::DynamicWordPadded, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
501    (FeatureStatusDynamic => FEATURE_STAT_DYNAMIC, 0x0146, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
502    (LineStatusDynamic => LINE_STAT_DYNAMIC, 0x0147, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::DynamicWordPadded, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::CanonicalServerOutput("display label/fully-qualified display name and display-options word"), response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
503    (ServiceUrlStatusDynamic => SERVICE_URL_STAT_DYNAMIC, 0x0148, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::DynamicWordPadded, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
504    (SpeedDialStatusDynamic => SPEED_DIAL_STAT_DYNAMIC, 0x0149, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
505    (CallInfoDynamic => CALL_INFO_DYNAMIC, 0x014a, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::DynamicWordPadded, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::CanonicalServerOutput("mailboxes, call instance/security and version-selected party metadata"), response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
506    (PortRequest => PORT_REQUEST, 0x014b, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::Message(MessageId::PortResponse), verification: ContractVerification::Structural }),
507    (PortClose => PORT_CLOSE, 0x014c, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
508    (QosListen => QOS_LISTEN, 0x014d, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(172), payload_size_bounds: Some(PayloadSizeBounds { minimum: 172, maximum: 172 }), runtime_use: RuntimeUse::ConditionalServiceNodeOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
509    (QosPath => QOS_PATH, 0x014e, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(168), payload_size_bounds: Some(PayloadSizeBounds { minimum: 168, maximum: 168 }), runtime_use: RuntimeUse::ConditionalServiceNodeOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
510    (QosTeardown => QOS_TEARDOWN, 0x014f, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(24), payload_size_bounds: Some(PayloadSizeBounds { minimum: 24, maximum: 24 }), runtime_use: RuntimeUse::ConditionalServiceNodeOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
511    (UpdateDscp => UPDATE_DSCP, 0x0150, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(24), payload_size_bounds: Some(PayloadSizeBounds { minimum: 24, maximum: 24 }), runtime_use: RuntimeUse::ConditionalServiceNodeOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
512    (QosModify => QOS_MODIFY, 0x0151, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(152), payload_size_bounds: Some(PayloadSizeBounds { minimum: 152, maximum: 152 }), runtime_use: RuntimeUse::ConditionalServiceNodeOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
513    (SubscriptionStatus => SUBSCRIPTION_STAT, 0x0152, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
514    (Notification => NOTIFICATION, 0x0153, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
515    (StartMediaTransmissionAck => START_MEDIA_TRANSMISSION_ACK, 0x0154, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionAndLengthSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
516    (StartMultimediaTransmissionAck => START_MULTIMEDIA_TRANSMISSION_ACK, 0x0155, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionSelected, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
517    (CallHistoryDisposition => CALL_HISTORY_DISPOSITION, 0x0156, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
518    (LocationInfo => LOCATION_INFO, 0x0157, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(2404), payload_size_bounds: Some(PayloadSizeBounds { minimum: 2404, maximum: 2404 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
519    (MwiResponse => MWI_RESPONSE, 0x0158, ControlToServiceNode, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(32), payload_size_bounds: Some(PayloadSizeBounds { minimum: 32, maximum: 32 }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
520    (ExtensionDeviceCapabilities => EXTENSION_DEVICE_CAPABILITIES, 0x0159, StationToControl, ContractMetadata { scope: ContractScope::Supplemental, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(164), payload_size_bounds: Some(PayloadSizeBounds { minimum: 164, maximum: 164 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
521    (XmlAlarm => XML_ALARM, 0x015a, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::BoundedPreserved, fixed_payload_bytes: None, payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: 2048 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
522    (CallCountRequest => CALL_COUNT_REQ, 0x015e, StationToControl, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::VersionAndLengthSelected, fixed_payload_bytes: None, payload_size_bounds: Some(PayloadSizeBounds { minimum: 0, maximum: 152 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::Message(MessageId::CallCountResponse), verification: ContractVerification::StructuralAndValidated }),
523    (CallCountResponse => CALL_COUNT_RES, 0x015f, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(180), payload_size_bounds: Some(PayloadSizeBounds { minimum: 180, maximum: 180 }), runtime_use: RuntimeUse::RequiredResponse, field_fidelity: FieldFidelity::SemanticProjection("inactive fixed-array line entries are not modeled"), response: ResponseExpectation::None, verification: ContractVerification::StructuralAndValidated }),
524    (RecordingStatus => RECORDING_STATUS, 0x0160, ControlToStation, ContractMetadata { scope: ContractScope::Base, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: None, payload_size_bounds: None, runtime_use: RuntimeUse::ConditionalServerOutput, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
525    (SpcpRegisterTokenRequest => SPCP_REGISTER_TOKEN_REQ, 0x8000, StationToControl, ContractMetadata { scope: ContractScope::Supplemental, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(36), payload_size_bounds: Some(PayloadSizeBounds { minimum: 36, maximum: 36 }), runtime_use: RuntimeUse::DeviceInput, field_fidelity: FieldFidelity::SemanticProjection("reserved station identifier word is not modeled"), response: ResponseExpectation::OneOf(&[MessageId::SpcpRegisterTokenAck, MessageId::SpcpRegisterTokenReject]), verification: ContractVerification::StructuralAndValidated }),
526    (SpcpRegisterTokenAck => SPCP_REGISTER_TOKEN_ACK, 0x8100, ControlToStation, ContractMetadata { scope: ContractScope::Supplemental, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(4), payload_size_bounds: Some(PayloadSizeBounds { minimum: 4, maximum: 4 }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
527    (SpcpRegisterTokenReject => SPCP_REGISTER_TOKEN_REJECT, 0x8101, ControlToStation, ContractMetadata { scope: ContractScope::Supplemental, codec: CodecSupport::Typed, payload_layout: PayloadLayout::Fixed, fixed_payload_bytes: Some(4), payload_size_bounds: Some(PayloadSizeBounds { minimum: 4, maximum: 4 }), runtime_use: RuntimeUse::TypedButNotEmitted, field_fidelity: FieldFidelity::Lossless, response: ResponseExpectation::None, verification: ContractVerification::Structural }),
528}
529
530impl fmt::Display for MessageId {
531    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
532        match self {
533            Self::Unknown(value) => write!(f, "Unknown(0x{value:04x})"),
534            known => f.write_str(known.name()),
535        }
536    }
537}
538
539/// Iterates the complete typed implementation inventory in wire-ID order.
540///
541/// Opaque-only contracts are intentionally excluded. To inspect every known
542/// identifier, iterate [`MessageId::ALL_KNOWN`] and call
543/// [`MessageId::contract`] instead.
544pub fn implemented_message_contracts() -> impl Iterator<Item = MessageContract> {
545    MessageId::ALL_CONTRACTS
546        .iter()
547        .copied()
548        .filter(|contract| contract.codec == CodecSupport::Typed)
549}
550
551#[cfg(test)]
552mod tests {
553    use super::*;
554    use sha2::{Digest, Sha256};
555    use std::collections::HashSet;
556
557    #[test]
558    fn known_catalog_values_are_unique_and_round_trip() {
559        let mut values = HashSet::new();
560        for id in MessageId::ALL_KNOWN {
561            assert!(values.insert(id.wire_value()), "duplicate {id}");
562            assert_eq!(MessageId::from(id.wire_value()), *id);
563            assert!(id.route().is_some());
564            assert!(id.is_known());
565        }
566        assert!(MessageId::ALL_KNOWN.len() > 140);
567    }
568
569    #[test]
570    fn supplemental_contract_scope_is_explicit_and_closed() {
571        let supplemental = MessageId::ALL_KNOWN
572            .iter()
573            .copied()
574            .filter(|id| id.contract().unwrap().scope == ContractScope::Supplemental)
575            .collect::<Vec<_>>();
576
577        assert_eq!(
578            supplemental,
579            [
580                MessageId::IpPort,
581                MessageId::MediaPortList,
582                MessageId::SetHookFlashDetect,
583                MessageId::StartMediaReception,
584                MessageId::StopMediaReception,
585                MessageId::EnunciatorCommand,
586                MessageId::ExtensionDeviceCapabilities,
587                MessageId::SpcpRegisterTokenRequest,
588                MessageId::SpcpRegisterTokenAck,
589                MessageId::SpcpRegisterTokenReject,
590            ]
591        );
592    }
593
594    #[test]
595    fn message_contract_catalog_matches_the_golden_snapshot() {
596        let snapshot = MessageId::ALL_KNOWN
597            .iter()
598            .filter_map(|id| id.contract())
599            .map(|contract| format!("{contract:?}\n"))
600            .collect::<String>();
601        let digest = Sha256::digest(snapshot.as_bytes())
602            .iter()
603            .map(|byte| format!("{byte:02x}"))
604            .collect::<String>();
605        assert_eq!(
606            digest,
607            "d8d291836879483d4c9f0773457d847454c9c2bfc296bba6c34c54cf949e7b2b"
608        );
609    }
610
611    #[test]
612    fn unknown_identifiers_remain_lossless() {
613        let id = MessageId::from(0xdead_beef);
614        assert_eq!(id, MessageId::Unknown(0xdead_beef));
615        assert_eq!(id.wire_value(), 0xdead_beef);
616        assert_eq!(id.direction(), None);
617    }
618
619    #[test]
620    fn dtmf_subscription_responses_have_the_device_to_server_direction() {
621        assert_eq!(
622            MessageId::SubscribeDtmfPayloadRequest.direction(),
623            Some(MessageDirection::ServerToDevice)
624        );
625        assert_eq!(
626            MessageId::SubscribeDtmfPayloadResponse.direction(),
627            Some(MessageDirection::DeviceToServer)
628        );
629        assert_eq!(
630            MessageId::UnsubscribeDtmfPayloadRequest.direction(),
631            Some(MessageDirection::ServerToDevice)
632        );
633        assert_eq!(
634            MessageId::UnsubscribeDtmfPayloadResponse.direction(),
635            Some(MessageDirection::DeviceToServer)
636        );
637    }
638
639    #[test]
640    fn every_known_id_has_an_explicit_support_and_runtime_contract() {
641        for id in MessageId::ALL_KNOWN {
642            let contract = id.contract().expect("known ID has a contract");
643            assert_eq!(contract.id, *id);
644            assert_eq!(contract.route, id.route().unwrap());
645            match contract.codec {
646                CodecSupport::Typed => {
647                    assert_eq!(contract.emission, EmissionSupport::Typed);
648                    assert_ne!(contract.runtime_use, RuntimeUse::CatalogOnly);
649                }
650                CodecSupport::OpaqueOnly => {
651                    assert_eq!(contract.emission, EmissionSupport::PreserveOnly);
652                    assert_eq!(contract.runtime_use, RuntimeUse::CatalogOnly);
653                    assert_eq!(contract.payload_layout, PayloadLayout::Opaque);
654                }
655            }
656            match contract.field_fidelity {
657                FieldFidelity::CanonicalServerOutput(detail) => {
658                    assert!(matches!(
659                        contract.route,
660                        MessageRoute::ControlToStation
661                            | MessageRoute::ControlToServiceNode
662                            | MessageRoute::IntraControl
663                    ));
664                    assert!(!detail.is_empty());
665                }
666                FieldFidelity::SemanticProjection(detail) => {
667                    assert_eq!(contract.codec, CodecSupport::Typed);
668                    assert!(!detail.is_empty());
669                }
670                FieldFidelity::OpaquePreserved => {
671                    assert_eq!(contract.codec, CodecSupport::OpaqueOnly);
672                }
673                FieldFidelity::Lossless => {}
674            }
675        }
676        assert!(implemented_message_contracts().count() > 100);
677
678        for id in [
679            MessageId::OpenReceiveChannel,
680            MessageId::StartMediaTransmission,
681            MessageId::StartMediaTransmissionAck,
682            MessageId::KeypadButton,
683            MessageId::EnblocCall,
684            MessageId::Alarm,
685            MessageId::DefineTimeDate,
686        ] {
687            assert_eq!(
688                id.contract().unwrap().field_fidelity,
689                FieldFidelity::Lossless
690            );
691        }
692    }
693
694    #[test]
695    fn semantic_field_fidelity_overclaims_are_explicitly_excluded() {
696        for (id, omitted) in [
697            (MessageId::LineStatus, "display label"),
698            (MessageId::CallInfo, "mailboxes"),
699            (MessageId::CallState, "visibility"),
700        ] {
701            let FieldFidelity::CanonicalServerOutput(detail) =
702                id.contract().unwrap().field_fidelity
703            else {
704                panic!("{id} must not claim lossless field fidelity");
705            };
706            assert!(detail.contains(omitted), "{id}: {detail}");
707        }
708
709        for id in [MessageId::ConfigStatus, MessageId::ConfigStatusDynamic] {
710            assert_eq!(
711                id.contract().unwrap().field_fidelity,
712                FieldFidelity::Lossless
713            );
714        }
715
716        for id in [
717            MessageId::CapabilitiesResponse,
718            MessageId::MediaTransmissionFailure,
719            MessageId::PortResponse,
720            MessageId::Register,
721        ] {
722            assert!(matches!(
723                id.contract().unwrap().field_fidelity,
724                FieldFidelity::SemanticProjection(_)
725            ));
726        }
727    }
728
729    #[test]
730    fn variable_layout_messages_never_claim_one_fixed_payload_size() {
731        for contract in MessageId::ALL_KNOWN.iter().filter_map(|id| id.contract()) {
732            if matches!(
733                contract.payload_layout,
734                PayloadLayout::VersionSelected
735                    | PayloadLayout::VersionAndLengthSelected
736                    | PayloadLayout::BoundedPreserved
737            ) {
738                assert_eq!(
739                    contract.fixed_payload_bytes, None,
740                    "{} has a variable payload layout",
741                    contract.id
742                );
743            }
744        }
745    }
746
747    #[test]
748    fn bounded_and_counted_payload_contracts_report_their_wire_limits() {
749        for id in [
750            MessageId::KeepAlive,
751            MessageId::ConfigStatusRequest,
752            MessageId::ButtonTemplateRequest,
753            MessageId::KeepAliveAck,
754        ] {
755            assert_eq!(
756                id.contract().unwrap().payload_size_bounds,
757                Some(PayloadSizeBounds {
758                    minimum: 0,
759                    maximum: MAX_FRAME_SIZE - HEADER_SIZE,
760                }),
761                "{id}"
762            );
763        }
764
765        let capabilities = MessageId::CapabilitiesResponse.contract().unwrap();
766        assert_eq!(
767            capabilities.payload_layout,
768            PayloadLayout::VersionAndLengthSelected
769        );
770        assert_eq!(capabilities.fixed_payload_bytes, None);
771        assert_eq!(
772            capabilities.payload_size_bounds,
773            Some(PayloadSizeBounds {
774                minimum: 4,
775                maximum: 388,
776            })
777        );
778
779        for (id, minimum, maximum) in [
780            (MessageId::EnblocCall, 24, 32),
781            (MessageId::OnHook, 0, 8),
782            (MessageId::ConnectionStatisticsResponse, 61, 668),
783        ] {
784            assert_eq!(
785                id.contract().unwrap().payload_size_bounds,
786                Some(PayloadSizeBounds { minimum, maximum }),
787                "{id}"
788            );
789        }
790
791        let on_hook = MessageId::OnHook.contract().unwrap();
792        assert_eq!(
793            on_hook.payload_layout,
794            PayloadLayout::VersionAndLengthSelected
795        );
796        assert_eq!(
797            on_hook.field_fidelity,
798            FieldFidelity::SemanticProjection("fieldless form omits line and call identity")
799        );
800
801        let call_count = MessageId::CallCountRequest.contract().unwrap();
802        assert_eq!(
803            call_count.payload_layout,
804            PayloadLayout::VersionAndLengthSelected
805        );
806        assert_eq!(
807            call_count.payload_size_bounds,
808            Some(PayloadSizeBounds {
809                minimum: 0,
810                maximum: 152,
811            })
812        );
813
814        let call_count_response = MessageId::CallCountResponse.contract().unwrap();
815        assert_eq!(call_count_response.payload_layout, PayloadLayout::Fixed);
816        assert_eq!(call_count_response.fixed_payload_bytes, Some(180));
817        assert_eq!(
818            call_count_response.payload_size_bounds,
819            Some(PayloadSizeBounds {
820                minimum: 180,
821                maximum: 180,
822            })
823        );
824
825        let version_two = MessageId::UpdateCapabilitiesV2.contract().unwrap();
826        assert_eq!(version_two.payload_layout, PayloadLayout::Fixed);
827        assert_eq!(version_two.fixed_payload_bytes, Some(2_000));
828
829        let version_three = MessageId::UpdateCapabilitiesV3.contract().unwrap();
830        assert_eq!(
831            version_three.payload_layout,
832            PayloadLayout::MinimumLengthPreserved
833        );
834        assert_eq!(
835            version_three.payload_size_bounds,
836            Some(PayloadSizeBounds {
837                minimum: 20,
838                maximum: 2_380,
839            })
840        );
841    }
842
843    #[test]
844    fn service_message_payload_bounds_are_explicit() {
845        assert_eq!(
846            MessageId::XmlAlarm.contract().unwrap().payload_size_bounds,
847            Some(PayloadSizeBounds {
848                minimum: 0,
849                maximum: 2_048,
850            })
851        );
852        assert_eq!(
853            MessageId::AddParticipantResponse
854                .contract()
855                .unwrap()
856                .payload_size_bounds,
857            Some(PayloadSizeBounds {
858                minimum: 12,
859                maximum: 272,
860            })
861        );
862
863        for (id, size) in [
864            (MessageId::AuditConferenceRequest, 0),
865            (MessageId::SubscribeDtmfPayloadRequest, 16),
866            (MessageId::SubscribeDtmfPayloadResponse, 12),
867            (MessageId::SubscribeDtmfPayloadError, 12),
868            (MessageId::UnsubscribeDtmfPayloadRequest, 16),
869            (MessageId::UnsubscribeDtmfPayloadResponse, 12),
870            (MessageId::UnsubscribeDtmfPayloadError, 12),
871        ] {
872            assert_eq!(
873                id.contract().unwrap().payload_size_bounds,
874                Some(PayloadSizeBounds {
875                    minimum: size,
876                    maximum: size,
877                }),
878                "{id}"
879            );
880        }
881    }
882
883    #[test]
884    fn media_contracts_record_fixed_and_version_selected_sizes() {
885        for id in [
886            MessageId::OpenMultimediaReceiveChannelAck,
887            MessageId::StartMultimediaTransmissionAck,
888            MessageId::StartSessionTransmission,
889            MessageId::StopSessionTransmission,
890            MessageId::OpenMultimediaChannel,
891            MessageId::StartMultimediaTransmission,
892            MessageId::PortRequest,
893            MessageId::PortClose,
894        ] {
895            let contract = id.contract().unwrap();
896            assert_eq!(contract.payload_layout, PayloadLayout::VersionSelected);
897            assert_eq!(contract.fixed_payload_bytes, None);
898        }
899
900        for (id, size) in [
901            (MessageId::MulticastMediaReceptionAck, 12),
902            (MessageId::CloseReceiveChannel, 16),
903            (MessageId::StopMediaTransmission, 16),
904            (MessageId::MiscellaneousCommand, 52),
905            (MessageId::QosReservationNotify, 24),
906            (MessageId::QosErrorNotify, 44),
907            (MessageId::QosListen, 172),
908            (MessageId::QosPath, 168),
909            (MessageId::QosTeardown, 24),
910            (MessageId::UpdateDscp, 24),
911            (MessageId::QosModify, 152),
912        ] {
913            assert_eq!(id.contract().unwrap().fixed_payload_bytes, Some(size));
914        }
915
916        assert_eq!(
917            MessageId::StartMediaTransmissionAck
918                .contract()
919                .unwrap()
920                .payload_layout,
921            PayloadLayout::VersionAndLengthSelected
922        );
923        assert_eq!(
924            MessageId::LocationInfo
925                .contract()
926                .unwrap()
927                .payload_size_bounds,
928            Some(PayloadSizeBounds {
929                minimum: 2_404,
930                maximum: 2_404,
931            })
932        );
933        for id in [
934            MessageId::CloseReceiveChannel,
935            MessageId::StopMediaTransmission,
936        ] {
937            assert_eq!(
938                id.contract().unwrap().field_fidelity,
939                FieldFidelity::Lossless
940            );
941        }
942    }
943
944    #[test]
945    fn session_transmission_contracts_use_the_service_node_codec() {
946        for id in [
947            MessageId::StartSessionTransmission,
948            MessageId::StopSessionTransmission,
949        ] {
950            let contract = id.contract().unwrap();
951            assert_eq!(contract.route, MessageRoute::ControlToServiceNode);
952            assert_eq!(contract.codec, CodecSupport::Typed);
953            assert_eq!(contract.emission, EmissionSupport::Typed);
954            assert_eq!(contract.runtime_use, RuntimeUse::TypedButNotEmitted);
955            assert_eq!(contract.field_fidelity, FieldFidelity::Lossless);
956            assert_eq!(contract.payload_layout, PayloadLayout::VersionSelected);
957        }
958    }
959
960    #[test]
961    fn supplemental_token_messages_are_typed() {
962        for (id, size) in [
963            (MessageId::SpcpRegisterTokenRequest, 36),
964            (MessageId::SpcpRegisterTokenAck, 4),
965            (MessageId::SpcpRegisterTokenReject, 4),
966        ] {
967            let contract = id.contract().unwrap();
968            assert_eq!(contract.codec, CodecSupport::Typed);
969            assert_eq!(contract.emission, EmissionSupport::Typed);
970            assert_eq!(contract.payload_layout, PayloadLayout::Fixed);
971            assert_eq!(contract.fixed_payload_bytes, Some(size));
972        }
973
974        assert_eq!(
975            MessageId::SpcpRegisterTokenRequest
976                .contract()
977                .unwrap()
978                .response,
979            ResponseExpectation::OneOf(&[
980                MessageId::SpcpRegisterTokenAck,
981                MessageId::SpcpRegisterTokenReject,
982            ])
983        );
984    }
985
986    #[test]
987    fn runtime_emission_is_distinct_from_typed_encodability() {
988        let dtmf = MessageId::SubscribeDtmfPayloadRequest.contract().unwrap();
989        assert_eq!(dtmf.codec, CodecSupport::Typed);
990        assert_eq!(dtmf.emission, EmissionSupport::Typed);
991        assert_eq!(dtmf.runtime_use, RuntimeUse::TypedButNotEmitted);
992
993        let open = MessageId::OpenReceiveChannel.contract().unwrap();
994        assert_eq!(open.runtime_use, RuntimeUse::ConditionalServerOutput);
995        assert_eq!(
996            open.response,
997            ResponseExpectation::Message(MessageId::OpenReceiveChannelAck)
998        );
999
1000        assert_eq!(
1001            MessageId::StartMediaTransmission
1002                .contract()
1003                .unwrap()
1004                .response,
1005            ResponseExpectation::OptionalMessage(MessageId::StartMediaTransmissionAck)
1006        );
1007
1008        for id in [
1009            MessageId::MiscellaneousCommand,
1010            MessageId::FlowControlCommand,
1011            MessageId::FlowControlNotify,
1012        ] {
1013            assert_eq!(
1014                id.contract().unwrap().runtime_use,
1015                RuntimeUse::ConditionalServerOutput
1016            );
1017        }
1018
1019        for (id, response, runtime_use) in [
1020            (
1021                MessageId::OpenMultimediaChannel,
1022                MessageId::OpenMultimediaReceiveChannelAck,
1023                RuntimeUse::ConditionalServerOutput,
1024            ),
1025            (
1026                MessageId::StartMultimediaTransmission,
1027                MessageId::StartMultimediaTransmissionAck,
1028                RuntimeUse::ConditionalServerOutput,
1029            ),
1030        ] {
1031            let contract = id.contract().unwrap();
1032            assert_eq!(contract.route, MessageRoute::ControlToStation);
1033            assert_eq!(contract.codec, CodecSupport::Typed);
1034            assert_eq!(contract.emission, EmissionSupport::Typed);
1035            assert_eq!(contract.runtime_use, runtime_use);
1036            assert_eq!(contract.field_fidelity, FieldFidelity::Lossless);
1037            assert_eq!(contract.payload_layout, PayloadLayout::VersionSelected);
1038            assert_eq!(contract.response, ResponseExpectation::Message(response));
1039        }
1040    }
1041
1042    #[test]
1043    fn dynamic_response_contracts_include_every_session_selector() {
1044        for (request, before, from) in [
1045            (
1046                MessageId::ConfigStatusRequest,
1047                MessageId::ConfigStatus,
1048                MessageId::ConfigStatusDynamic,
1049            ),
1050            (
1051                MessageId::LineStatusRequest,
1052                MessageId::LineStatus,
1053                MessageId::LineStatusDynamic,
1054            ),
1055            (
1056                MessageId::ServiceUrlStatusRequest,
1057                MessageId::ServiceUrlStatus,
1058                MessageId::ServiceUrlStatusDynamic,
1059            ),
1060            (
1061                MessageId::SpeedDialStatusRequest,
1062                MessageId::SpeedDialStatus,
1063                MessageId::SpeedDialStatusDynamic,
1064            ),
1065        ] {
1066            assert_eq!(
1067                request.contract().unwrap().response,
1068                ResponseExpectation::SessionSelected {
1069                    before,
1070                    from,
1071                    selector: SessionResponseSelector::DynamicMessagesOrProtocol {
1072                        minimum_protocol: 9,
1073                    },
1074                }
1075            );
1076        }
1077
1078        assert_eq!(
1079            MessageId::FeatureStatusRequest.contract().unwrap().response,
1080            ResponseExpectation::SessionSelected {
1081                before: MessageId::FeatureStatus,
1082                from: MessageId::FeatureStatusDynamic,
1083                selector: SessionResponseSelector::DynamicMessages,
1084            }
1085        );
1086    }
1087}