Skip to main content

korri_n2k/
lib.rs

1//! `korri-n2k` library: primitives and protocols required to handle
2//! NMEA 2000 frames in a `no_std` environment. The crate exposes the
3//! infrastructure modules (codec, CAN bus), protocol logic (address management,
4//! transport, messages), and a few prototypes.
5#![cfg_attr(not(feature = "std"), no_std)]
6#![allow(async_fn_in_trait)]
7// The README's self-contained snippets are compiled and run as doctests, so a
8// signature cannot change without the documentation failing with it.
9#![cfg_attr(doctest, doc = include_str!("../README.md"))]
10//==================================================================================
11// use pgn::Pgn;
12//==================================================================================
13/// Core data types shared by the build script and the codec engine.
14pub mod core;
15/// Domain and low-level errors (CAN identifier construction, serialization,
16/// deserialization, and related issues).
17pub mod error;
18/// Representation of a raw NMEA 2000 frame as it is read from the CAN bus.
19pub mod infra;
20/// NMEA 2000 protocol implementation: CAN transport, fast packets,
21/// address management, and lookup tables.
22pub mod protocol;
23
24#[cfg(feature = "tokio")]
25pub use protocol::transport::traits::korri_timer::TokioTimer;
26//==================================================================================