1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! ISO-TP (ISO 15765-2) transport protocol module.
//!
//! This module provides functionality for transmitting data larger than a single CAN frame
//! using the ISO-TP segmentation and reassembly protocol.
//!
//! # Features
//!
//! - Single Frame (SF) for data ≤ 7 bytes (CAN 2.0) or ≤ 62 bytes (CAN-FD)
//! - Multi-frame transfer with First Frame (FF), Consecutive Frames (CF), and Flow Control (FC)
//! - Configurable block size and separation time (`STmin`)
//! - Support for Normal, Extended, and Mixed addressing modes
//! - Automatic CAN 2.0 / CAN-FD frame size detection
//!
//! # Example
//!
//! ```rust,ignore
//! use canlink_hal::isotp::{IsoTpChannel, IsoTpConfig};
//! use canlink_mock::MockBackend;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let backend = MockBackend::new();
//!
//! let config = IsoTpConfig::builder()
//! .tx_id(0x7E0)
//! .rx_id(0x7E8)
//! .build()?;
//!
//! let mut channel = IsoTpChannel::new(backend, config)?;
//!
//! // Send data (automatically segmented if needed)
//! channel.send(&[0x10, 0x01]).await?;
//!
//! // Receive response (automatically reassembled)
//! let response = channel.receive().await?;
//!
//! Ok(())
//! }
//! ```
pub use ;
pub use ;
pub use IsoTpError;
pub use ;
pub use ;