Skip to main content

sim_codec_uds/
lib.rs

1//! UDS and OBD-II byte-frame codec for SIM automotive diagnostics.
2//!
3//! The runtime codec symbol is `codec/uds`. It reads diagnostic bytes and emits
4//! inert `Expr::Map` records for read-DID requests/responses, OBD-II mode
5//! requests, and DTC responses. Encoding those records produces the original
6//! bytes. DTC status bytes are decoded into the shared `auto/DtcStatus` shape
7//! without adding fault descriptions or proprietary traces.
8
9#![forbid(unsafe_code)]
10#![deny(missing_docs)]
11
12mod codec;
13mod expr;
14mod frame;
15mod status;
16
17#[cfg(test)]
18mod tests;
19
20pub use codec::{UdsCodec, UdsCodecLib, install_uds_codec_lib, uds_codec_symbol};
21pub use frame::{DtcFrame, UdsFrame, decode_frame, encode_frame};
22pub use status::{decode_dtc_status, dtc_status_expr};
23
24/// Cookbook recipes for this codec, embedded at build time.
25pub static RECIPES: sim_cookbook::EmbeddedDir =
26    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));