1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// SPDX-License-Identifier: GPL-3.0-or-later
//! `UvPacketRawMessage` — trait-required-only message codec.
//!
//! The new uvpacket bypasses [`MessageCodec`] entirely; encoding /
//! decoding happens at the *frame* level in [`crate::uvpacket::tx`]
//! and [`crate::uvpacket::rx`]. The [`Protocol`] trait nevertheless
//! requires a [`MessageCodec`] associated type to keep generic
//! pipeline / registry code honest.
//!
//! `UvPacketRawMessage` satisfies that requirement with a trivial
//! passthrough that:
//! - declares `PAYLOAD_BITS = 101` (= the K of `Ldpc240_101`)
//! - returns `None` from `pack` (uvpacket TX does not go through
//! this codec)
//! - returns the raw 101 info bits as a 13-byte `Vec<u8>` from
//! `unpack` (with the trailing 3 bits zero-padded to a byte
//! boundary)
//! - accepts unconditionally in `verify_info` — frame-level CRC-16
//! is what catches corruption, not a per-LDPC-block CRC
//!
//! This codec is **not** intended to be invoked directly by user
//! code. The public uvpacket API is byte-pipe — see
//! [`crate::uvpacket::tx::encode`] and
//! [`crate::uvpacket::rx::decode`].
//!
//! [`MessageCodec`]: crate::core::MessageCodec
//! [`Protocol`]: crate::core::Protocol
use crate;
/// Trivial passthrough [`MessageCodec`] for the uvpacket family.
/// See module-level docs.
;