Network layer
7 Network Iayer interface
8.Standardized diagnostic CAN identifiers
Addressing formats 

The exchange of network layer data is supported by three addressing formats: normal, extended and mixed addressing. Each addressing format requires a different number of CAN frame data bytes to encapsulate the addressing information associated with the data to be exchanged. Consequently, the number of data bytes transported within a single CAN frame depends on the type of addressing format chosen.

The following (7.3.2 to 7.3.5) specifies the mapping mechanisms for each addressing format, based on the data link layer services and service parameters defined in ISO 11898-1.

具体看NL_OBD_SendCANFrame函数关于ISO15765-4协议这部分代码的实现。
脱离枯燥的理论来感受ISO15765-4协议

ISO 15765 协议下载

Monday, 04 May 2020

下载链接

网络层的国际标准是ISO 15756-2,该标准详细规定了协议的具体细节。CAN总线是一帧8个字节,该协议可以使CAN总线高效的传输大约8个字节(up to 4095 bytes)的命令和数据。基于该标准文档,我开发出了一个独立性良好的协议栈,工作在上层诊断协议之下和下层CAN驱动之上,下面详解开发协议栈时需要实现的部分(基于 ISO 15765-2:2004(E))