13#ifndef ANTHOCNET_CORE_ANT_MESSAGE_CODEC_H
14#define ANTHOCNET_CORE_ANT_MESSAGE_CODEC_H
56 return deserialize(bytes.data(), bytes.size(), msg);
std::size_t serializedSize(const AntMessage &msg)
Number of bytes serialize() will produce for msg.
std::vector< std::uint8_t > serialize(const AntMessage &msg)
Encode msg into a fresh byte buffer.
bool deserialize(const std::uint8_t *bytes, std::size_t len, AntMessage &msg)
Decode bytes into msg.
constexpr std::uint8_t kWireVersion
On-wire format version, written at offset 0 of every frame and checked before any other field (ADR-00...
constexpr std::uint16_t kMaxHelloOnWire
generous bound on adverts
constexpr std::uint16_t kMaxHistoryOnWire
retraced path ≤ path length
constexpr std::uint16_t kMaxVisitedOnWire
Protocol bounds enforced on decode of untrusted input, mirroring the Config defaults so the codec sta...
AntHistoryTracker: (src, seqNum) duplicate detection.
Complete, copyable description of an ant packet.