bacnet_ops/decode/mod.rs
1//! BACnet frames decoded for people: what the TUI's capture screen and the
2//! MCP server's `bacnet_decode` tool show, with no network traffic.
3//!
4//! - [`frame`] reads a frame of any link the stack taps (B/IP, B/IPv6,
5//! BACnet/SC, MS/TP), or a bare NPDU, as far as a one-line summary needs.
6//! - [`tree`] decodes a frame, an NPDU or an APDU into a tree of fields,
7//! each with the octets it came from; service parameters are walked tag
8//! by tag.
9//! - [`decode_npdu_layer`] reads the network and application layers that
10//! every link carries the same way.
11//!
12//! Every decoder takes untrusted octets: a malformed frame becomes a
13//! problem in the result, never a panic. A character string in a frame is
14//! whatever its sender wrote, so a tree field quoting one says so
15//! ([`tree::Field::device_text`]).
16
17pub mod frame;
18mod layers;
19#[cfg(any(test, feature = "test-support"))]
20#[doc(hidden)]
21pub mod testing;
22pub mod tree;
23
24pub use layers::{DecodedApdu, DecodedNpdu, decode_npdu_layer};