Mozilla Public License 2.0

项目介绍

Iandiehard/diag-client-lib 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 Mozilla Public License 2.0 许可证,目前获得 69 个 Star、21 次 Fork。

仓库全名
Iandiehard/diag-client-lib
开源许可证
Mozilla Public License 2.0
Star 数
69
Fork 数
21
未关闭 Issue
10

README 摘要

Diagnostic Client Library Diagnostic Client Library Diagnostic Client Library Overview Documentation Get Started Build and Install In Linux :- In Windows :- How to use diag-client-lib Logging in diag-client-lib Documentation in diag-client-lib Requirements Known Defect Future Work License Contact Author Diagnostic Client Library Welcome to Diagnostic Client library that is developed based on motivation taken from…

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

常见问题

diag-client-lib 用什么语言开发?

主要使用 C++ 编写,采用 Mozilla Public License 2.0 许可证,目前有 69 个 Star。

diag-client-lib 可以免费商用吗?

仓库标注的许可证为 Mozilla Public License 2.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 diag-client-lib 的源码?

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

diag-client-lib 最近还在维护吗?

仓库最近一次更新为 2025年3月24日,当前有 10 个未关闭 Issue;Star 数为 69,可作为社区活跃度的参考。

关于

Diagnostic Client library for diagnosing Automotive ECU, based on Adaptive Autosar Standard

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

语言占比

C++
CMake
Dockerfile
Shell

Release

贡献者

README

Diagnostic Client Library

Clang14 Gcc11

Diagnostic Client Library

Welcome to Diagnostic Client library that is developed based on motivation taken from Adaptive AUTOSAR Diagnostic Specification 21-11

Diagnostic Client library is developed according to the requirements needed on the diagnostic tester side. Some internal APIs is implemented based on API Reference mentioned in Adaptive AUTOSAR Diagnostic Specification 21-11

Overview

Diagnostic Client library acts as diagnostic tester library that is linked to a user application which wants to send diagnostic requests to multiple ECU over a network.

Diagnostic Client library supports below Diagnostic Protocols :-

  • DoIP (Diagnostic over Internet Protocol)
  • UDS (Unified Diagnostic Services)

Diagnostic Client library supports opening of multiple conversation(tester instance) for sending diagnostic request to multiple ECU at the same time.

Documentation

The documentation of this project can be found here GitHub pages

Get Started

In this section, you will learn how to build and install Diagnostic Client Library and also learn how to use diag-client-lib

Build and Install

In Linux :-

The following packages are needed to build and install Diagnostic Client library:-

Package Usage Recommended version
CMake build system >=3.5
COVESA DLT logging & tracing >= 2.18.8
Boost asio operation >= 1.79.0

You can also execute to install dependencies :-

sh .github/setup.sh 
In Windows :-

The following packages are needed to build and install Diagnostic Client library:-

Package Usage Recommended version
CMake build system >=3.5
Boost asio operation >= 1.79.0

Note: Covesa DLT is not directly supported in Windows. For more information see Dlt Issue

How to use diag-client-lib

Diagnostic Client Library has to be linked first either statically or dynamically with executable before usage. Diagnostic Client library can be built as shared library by setting the below CMake Flag to ON

BUILD_SHARED_LIBS : ON

Main instance of Diagnostic Client Library must be created using CreateDiagnosticClient method call by passing the path to diag-client config json file as parameter.

  // Create the Diagnostic client and pass the config for creating internal properties
  std::unique_ptr<diag::client::DiagClient> diag_client{
      diag::client::CreateDiagnosticClient("etc/diag_client_config.json")};

diag-client config json file can be modified as per user requirements.

Once Diagnostic Client Library is instantiated and initialized, GetDiagnosticClientConversation can be used to get the tester/conversation instance by passing the tester/conversation name.

  // Get conversation for tester one by providing the conversation name configured
  // in diag_client_config file passed while creating the diag client
  diag::client::conversation::DiagClientConversation diag_client_conversation {
      diag_client->GetDiagnosticClientConversation("DiagTesterOne")};

Multiple tester instance can be created using these method as provided in the configuration json file.

It also supports finding the available Diagnostic ECUs in the whole network through vehicle discovery.

  // Create a vehicle info request for finding available ECU in the whole network,
  // Use preselection mode `0` for broadcasting vehicle identification request to the whole network
  diag::client::vehicle_info::VehicleInfoListRequestType const vehicle_info_request{0u, ""};
  // Send Vehicle Identification request and get the response with available ECU information
  diag::client::Result<diag::client::vehicle_info::VehicleInfoMessageResponseUniquePtr,
                       diag::client::DiagClient::VehicleInfoResponseError> const
      vehicle_response_result{diag_client->SendVehicleIdentificationRequest(vehicle_info_request)};

Check the example application on how Diagnostic Client Library can be linked and used. Example can be built too by enabling CMake Flag:-

BUILD_EXAMPLES : ON

Logging in diag-client-lib

Diagnostic Client Library supports logging and tracing by using the logging infrastructure from COVESA DLT. Logging is switched OFF by default using the CMake Flag, can be switched ON by enabling the flag:-

BUILD_WITH_DLT : ON

Note: DLT logging is not supported in Windows. So, CMake Flag must be switched OFF.

Documentation in diag-client-lib

Diagnostic Client Library uses doxygen to generate the documentation of the public api’s. Doxygen build is switched OFF by default using the CMake Flag, can be switched ON by enabling the flag:-

BUILD_DOXYGEN : ON

In the future, we will have internal code documentation too.

Requirements

Component requirements implemented are documented REQ

Known Defect

  • No defect is identified yet.

You can add new issues with label bug for notifying us about any defect in library.

Future Work

  • Improve internal API documentation
  • DoIP with TLS

For adding more features you can add new issues with label enhancement so that we can work on it.

License

Full information on project license is available here LICENSE. Boost License is available here LICENSE.

Contact

For any other queries regarding diag-client-lib, please drop a mail to [email protected].

Author

Original idea, design and implementation done by Avijit Dey [email protected].

评论

暂无评论