can_types/protocol/mod.rs
1// Copyright (c) 2024 Nathan H. Keough
2//
3// This work is dual-licensed under MIT OR Apache 2.0 (or any later version).
4// You may choose between one of them if you use this work.
5//
6// For further detail, please refer to the individual licenses located at the root of this crate.
7
8//! # CAN Protocols Supported by this Crate.
9//!
10//! ## [CAN2.0 A](crate::protocol::can2_a)
11//!
12//! **Description:**
13//! CAN2.0 A is the original specification of the CAN protocol, which defines a communication system
14//! for vehicles and industrial automation. It provides a robust and efficient way for microcontrollers
15//! and devices to communicate with each other in real-time.
16//!
17//! - **Data Frame Format:** CAN2.0 A specifies an 11-bit identifier for message frames.
18//! - **Standardization:** It is widely used and supports basic communication needs.
19//! - **Application:** Commonly used in applications where a smaller identifier field suffices, such as
20//! simpler automotive or industrial systems.
21//!
22//! **Source Document:**
23//! - *ISO 11898-1*
24//!
25//! ## [CAN2.0 B](crate::protocol::can2_b)
26//!
27//! **Description:**
28//! CAN2.0 B is an extension of the CAN2.0 A specification and introduces a more flexible frame format
29//! to accommodate larger networks and more complex systems.
30//!
31//! - **Data Frame Format:** CAN2.0 B adds support for a 29-bit identifier, known as Extended Frame Format,
32//! in addition to the 11-bit identifier of CAN2.0 A.
33//! - **Standardization:** This extension allows for a larger number of unique identifiers and is backward
34//! compatible with CAN2.0 A.
35//! - **Application:** Useful in scenarios where a larger range of identifiers is needed, such as more
36//! complex automotive systems or larger industrial networks.
37//!
38//! **Source Document:**
39//! - *ISO 11898-1*
40//!
41//! ## [J1939](crate::protocol::j1939)
42//!
43//! **Description:**
44//! J1939 is a higher-layer protocol based on CAN2.0, specifically designed for heavy-duty vehicles and
45//! off-road equipment. It builds upon the CAN2.0 B physical layer and frame format but adds additional
46//! features tailored to the needs of commercial vehicles.
47//!
48//! - **Data Frame Format:** Utilizes the Extended Frame Format (29-bit identifier) of CAN2.0 B.
49//! - **Standardization:** Includes specifications for message formats, data encoding, and communication
50//! parameters tailored for truck and bus applications.
51//! - **Application:** Commonly used in the trucking industry and off-highway vehicles for diagnostics,
52//! control, and communication among different vehicle systems.
53//!
54//! **Source Document:**
55//! - *SAE J1939-01*
56//! - *SAE J1939-21*
57//! - *SAE J1939-71*
58
59pub mod can2_a;
60pub mod can2_b;
61pub mod j1939;