Skip to main content

osdp/packet/
mod.rs

1//! Packet codec — framing, header, security control block, MAC, trailer.
2//!
3//! # Spec: §5.9 Tables 1–3, Annex C
4
5mod checksum;
6mod codec;
7mod crc;
8mod header;
9mod scb;
10mod trailer;
11
12pub use checksum::checksum8;
13pub use codec::{HEADER_LEN, MAC_LEN, ParsedPacket};
14pub use crc::{crc16, crc16_le};
15pub use header::{Address, ControlByte, CtrlFlags, Sqn};
16pub use scb::{ScbView, ScsType};
17pub use trailer::Trailer;
18
19#[cfg(feature = "alloc")]
20pub use codec::PacketBuilder;
21#[cfg(feature = "alloc")]
22pub use scb::Scb;
23
24/// Re-export of the high-level [`PacketBuilder`] under a friendlier name.
25#[cfg(feature = "alloc")]
26pub type Packet = PacketBuilder;