【UDS诊断】——0x19 0A

🙋‍♂️【UDS诊断服务介绍合集】系列💁‍♂️点击跳转

一、服务概述

该服务用于请求所有支持的DTC信息(3字节的DTC标识符+1字节的DTC状态位), 19 0A用于让ECU返回所有支持的DTC,不论DTC状态如何,故障是否发生,都要返回。通常用来测试ECU中实际支持的DTC和预定义的DTC列表是否相符。
其响应报文与19 02服务一致,但该服务返回的是所有DTC的信息;而19 02服务是返回与请求时状态掩码相与不为0 的DTC信息。

二、报文

1.请求报文定义

在这里插入图片描述

2.肯定响应

在这里插入图片描述

3.报文讲解

3.1格式及内容

发 送: 19 +0A
正响应: 59+01+DTCStatusAvailabilityMask+DTC故障码+对应DTC故障码信息

3.2举例

在这里插入图片描述

### UDS Diagnostic Service 19 02 0A Protocol Explanation The UDS (Unified Diagnostic Services) diagnostic service identifier `19` corresponds to the **ReadDTCInformation** request, which is used for reading different types of Diagnostic Trouble Codes (DTCs). The subfunction `02` within this service indicates a specific operation related to DTC information retrieval. Specifically, when combined with data record parameter `0A`, it signifies requesting the number of DTCs by status mask[^1]. This particular combination (`19 02 0A`) instructs the ECU (Electronic Control Unit) or another relevant automotive component to provide detailed information about the count of active DTCs based on specified criteria defined in the status mask. #### Example Request and Response Structure For clarity, here’s how such an interaction might look: - **Request**: ```plaintext 19 02 0A ``` - **Response**: A typical positive response would include: ```plaintext 59 02 LL HH ``` Where: - `59`: Positive response SID. - `LL HH`: Two-byte value representing the total number of DTCs matching the provided status mask conditions. In some cases, additional bytes may follow depending upon whether extended data records are included as part of the response payload. ```python def read_dtc_information(status_mask): """ Simulates sending a ReadDTCInformation request using UDS protocol Args: status_mask (int): Status condition filter applied during DTC counting Returns: tuple: Number of DTCs found that match the given status mask """ # Hypothetical function call simulating network communication result = send_uds_request([0x19, 0x02, status_mask]) if not isinstance(result, list) or len(result) != 4: raise ValueError("Invalid response format") dtc_count = (result[2] << 8) | result[3] return dtc_count ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值