Expand description
Packet codec — framing, header, security control block, MAC, trailer.
§Spec: §5.9 Tables 1–3, Annex C
Structs§
- Address
- PD bus address.
- Control
Byte - Decoded control byte.
- Ctrl
Flags - Control byte flags.
- Packet
Builder alloc - Builder for a single OSDP packet.
- Parsed
Packet - View of a parsed OSDP packet, borrowed from the input slice.
- Scb
alloc - Owned Security Control Block.
- ScbView
- Borrowed view of a parsed Security Control Block.
- Sqn
- Sequence number (
0..=3).
Enums§
Constants§
- HEADER_
LEN - Length of the fixed OSDP header (SOM, ADDR, LEN_LSB, LEN_MSB, CTRL).
- MAC_LEN
- MAC trailer length on the wire (the first 4 bytes of the computed MAC).
Functions§
- checksum8
- Compute the 8-bit OSDP checksum over
bytes. - crc16
- Compute the CRC-16/KERMIT over
bytes. - crc16_
le - Compute the CRC-16/KERMIT and return it as little-endian bytes.
Type Aliases§
- Packet
alloc - Re-export of the high-level
PacketBuilderunder a friendlier name.