e2e-protection 0.2.1

Pluggable End-to-End (E2E) protection profiles. First class support for AUTOSAR P11 (CAN) and P22 (CAN FD).
Documentation
//! e2e-protection (E2E-first)
//!
//! High-level E2E API with profiles + session. CRC is internal.
//!
//! ### Quick start
//! ```
//! use e2e_protection::{E2eProfile, E2eSession, CounterPolicy};
//! use e2e_protection::p11::Profile11;
//!
//! let mut tx = E2eSession::new(
//!     Profile11::preset_sae_j1850(0x0042),
//!     CounterPolicy::MonotonicRollover { bits: 8, step: 1 },
//! );
//! let frame = tx.wrap(&[0x12, 0x34, 0x56, 0x78]).unwrap();
//!
//! let mut rx = E2eSession::new(
//!     Profile11::preset_sae_j1850(0x0042),
//!     CounterPolicy::MonotonicRollover { bits: 8, step: 1 },
//! );
//! let payload = rx.unwrap(&frame).unwrap();
//! assert_eq!(payload, &[0x12, 0x34, 0x56, 0x78]);
//! ```

mod crc;      // internal
mod e2e;
pub mod p11;
pub mod p22;

pub use e2e::{CheckInfo, CounterPolicy, E2eError, E2eProfile, E2eSession};