Integration with CAN¶
CAN bus is a message-based protocol, designed specifically for automotive applications but now also used in other areas such as aerospace, maritime, industrial automation and medical equipment (got from wiki).
Protocol¶
Network can be easy integrated with CAN
because the
protocols of these networks are frame-based. CAN
resides on the
Data-Link Layer of the Network Model and represented with data unit as
Frame. While the Network Layer operates through Routing Protocol (SARP) and
Packet. Therefore, SARP will work over CAN Protocol 2.0B
(specification with extended message formats).
The Data Length field of the Packet from SARP is equivalent with CAN
Frame. The SARP Header part can be converted to CAN
Extended
Identifier (29 bit).
Frame structure¶
Part | Field name | Length (bits) | Description | |
---|---|---|---|---|
Header | SACP | 29 | 8 | SACP Data Classifier |
SARP | 16 | SARP address information | ||
SATP | 3 | SATP flags | ||
Reserved | 2 | Must be set to 0x0 | ||
Length | Data length | 4 | The length of data in bytes | |
Payload | Data | 0-64 | Max 8 bytes |
Note
The fields Start of Frame, Cyclic redundancy check and End of Frame are not presented in this structure because the CAN protocol has own implementation for its.
SACP (8 bits)
¶
The Channel and Data Classifier for Control Protocol (SACP).
SARP (16 bits)
¶
The address information that contains Source and Destination IDs for Routing Protocol (SARP).
SATP (3 bits)
¶
The Segmentation, Final and Acknowledgment flags for Transport Protocol (SATP)
Data length (4 bits)
¶
The length of Payload part in bytes. The Frame can be empty (without
Payload). In this situation Data length=0x0
and Payload is not
presented in the Frame. The maximum size of Payload part is 8 bytes.
Data (0-64 bits)
¶
The Payload data for Transport Protocol (SATP).