DoIP(Diagnostic over Internet Protocol)实现基于 IP 的车辆诊断,符合 ISO 13400。位于 PduR/SoAd 之上,DCM 之下。支持车辆识别、路由激活、诊断数据传输等。R4.4 增强 IPv6 支持。
DoIP / ISO 13400 / UDS / TCP / UDP / IPv4 / IPv6 / VIN / GID / Routing Activation / EID / DID / Tester / Entity / Activation Line / SoAd / DCM
[1] AUTOSAR SWS SocketAdaptor
[2] AUTOSAR SWS TcpIp
[2] AUTOSAR SWS DCM
[4] ISO 13400 (DoIP)
[5] ISO 14229 (UDS)
DoIP 应:
DoIP 依赖:SoAd(Socket Adapter)/ TcpIp(TCP/UDP)/ DCM(诊断通信管理器)/ Dem(错误上报)。
DoIP 位于 SoAd 之上,DCM 之下。处理 DoIP 协议层(车辆识别、路由激活、消息分发),将 UDS 消息路由到 DCM。
DoIP 协议栈:
void DoIP_Init(const DoIP_ConfigType* ConfigPtr):初始化。
void DoIP_DeInit(void):去初始化。
Std_ReturnType DoIP_SoAdTpTransmit(PduIdType TxPduId, const PduInfoType* PduInfoPtr):TP 传输。
Std_ReturnType DoIP_IfTransmit(PduIdType TxPduId, const PduInfoType* PduInfoPtr):IF 传输。
BufReq_ReturnType DoIP_SoAdTpStartOfReception(PduIdType RxPduId, PduLengthType SduLength, PduLengthType* RxBufferSizePtr):TP 接收开始。
BufReq_ReturnType DoIP_SoAdTpCopyRxData(PduIdType RxPduId, const PduInfoType* PduInfoPtr, PduLengthType* RxBufferSizePtr):TP 接收数据复制。
BufReq_ReturnType DoIP_SoAdTpCopyTxData(PduIdType TxPduId, PduInfoType* PduInfoPtr, RetryInfoType* RetryInfoPtr, PduLengthType* TxDataCntPtr):TP 发送数据复制。
void DoIP_SoAdTpRxIndication(PduIdType RxPduId, Std_ReturnType Result):TP 接收指示。
void DoIP_SoAdTpTxConfirmation(PduIdType TxPduId, Std_ReturnType Result):TP 发送确认。
void DoIP_SoAdIfRxIndication(PduIdType RxPduId, const PduInfoType* PduInfoPtr):IF 接收指示。
void DoIP_SoAdIfTxConfirmation(PduIdType TxPduId, Std_ReturnType Result):IF 发送确认。
void DoIP_ActivationLineSwitchActive(void):激活线切换到 Active。
void DoIP_ActivationLineSwitchInactive(void):激活线切换到 Inactive。
Std_ReturnType DoIP_GetTesterAddress(NetworkHandleType NetworkHandle, uint16* TesterAddressPtr):获取 Tester 地址。
Std_ReturnType DoIP_SetTesterAddress(NetworkHandleType NetworkHandle, uint16 TesterAddress):设置 Tester 地址。
DoIP 配置类:
DOIP_E_UNINIT:模块未初始化。
DOIP_E_PARAM_POINTER:参数指针为空。
DOIP_E_PARAM:参数无效。
DOIP_E_BUSY:模块忙。
DOIP_E_NO_BUFFER:无可用缓冲区。
校对轮次:L1 自动校对(2026-06-13)