MIT License

项目介绍

shishir-dey/libautomotive 是一个托管在 GitHub 上的开源项目,主要使用 Rust 编写,采用 MIT License 许可证,目前获得 23 个 Star、3 次 Fork。

仓库全名
shishir-dey/libautomotive
开源许可证
MIT License
Star 数
23
Fork 数
3
未关闭 Issue
2

README 摘要

A comprehensive Rust library for automotive protocol implementations, following the OSI layer model for clear separation of concerns. The library provides support for various automotive protocols including CAN, CAN-FD, ISO-TP, J1939, ISOBUS, UDS, and OBD-II. Features Complete automotive protocol stack implementation Modular and extensible design following OSI layers High-performance implementations Strong type…

完整内容见 GitHub 原始 README 或本页 。

常见问题

libautomotive 用什么语言开发?

主要使用 Rust 编写,采用 MIT License 许可证,目前有 23 个 Star。

libautomotive 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 libautomotive 的源码?

可以直接克隆仓库:git clone https://github.com/shishir-dey/libautomotive.git,默认分支为 main;安装与运行步骤见仓库 README。

libautomotive 最近还在维护吗?

仓库最近一次更新为 4月5日,当前有 2 个未关闭 Issue;Star 数为 23,可作为社区活跃度的参考。

关于

A nascent Rust implementation of automotive protocols, including OBD-II, ISO-TP, J1939, LIN, ISOBUS, DoIP, and UDS

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

Rust
Shell

贡献者

README

libautomotive logo

A comprehensive Rust library for automotive protocol implementations, following the OSI layer model for clear separation of concerns. The library provides support for various automotive protocols including CAN, CAN-FD, ISO-TP, J1939, ISOBUS, UDS, and OBD-II.

Features

  • Complete automotive protocol stack implementation
  • Modular and extensible design following OSI layers
  • High-performance implementations
  • Strong type safety and error handling
  • Easy-to-use abstractions

Supported Protocols

  • Physical Layer: CAN and CAN-FD implementations
  • Data Link Layer: Raw CAN frame handling
  • Network Layer: J1939 and ISOBUS protocol implementations
  • Transport Layer: ISO-TP (ISO 15765-2) implementation
  • Application Layer:
    • UDS (ISO 14229) implementation
    • OBD-II implementation
    • ISOBUS Diagnostic Protocol (DM1, DM2, DM3, DM11, DM13, DM22)

Building

  1. Ensure you have Rust and Cargo installed (https://rustup.rs/)
  2. Clone the repository:
    git clone https://github.com/shishir-dey/libautomotive.git
    cd libautomotive
    
  3. Build the library:
    cargo build
    
  4. For release build:
    cargo build --release
    

Testing

Run the test suite:

cargo test

For verbose test output:

cargo test -- --nocapture

Example Usage

use libautomotive::application::{uds, obdii};
use libautomotive::transport::isobus_diagnostic;

// UDS example
let uds_config = uds::Config::default();
let uds_interface = uds::Interface::new(uds_config);

// OBD-II example
let obd_config = obdii::Config::default();
let obd_interface = obdii::Interface::new(obd_config);

// ISOBUS Diagnostic example
let mut isobus_diag = isobus_diagnostic::ISOBUSDiagnosticProtocol::new();
let dtc = isobus_diagnostic::DiagnosticTroubleCode::new(100, 1); // SPN: 100, FMI: 1
isobus_diag.add_dtc(dtc);

License

MIT

Credits and Acknowledgments

This library draws inspiration from and acknowledges the following open-source projects:

评论

暂无评论