DriveWorks SDK Reference
4.0.0 Release
For Test and Development only


About This Module

The CAN bus module provides access to the CAN bus typically used for communication between different ECUs and devices/sensors in a vehicle. Also part of this module is a CAN data interpreter, supporting communication in DBC format and extendable by the user for additional formats.

CAN bus sensor

The CAN sensor module is defined in CAN.h. It provides an abstracted interface to send, receive and filter CAN messages. Extended CAN frame format is supported. CAN FD (Flexible Data-Rate) messages for longer 64 byte messages and data bit rate switching is supported on compatible CAN Bus devices.

The supported interfaces are:

  • can.socket interface for system CAN bus, including system virtual socket CAN. Supports CAN FD messages for message up to 64 bytes and data bit rate switching.
  • can.aurix interface for CAN over Aurix. The CAN packets are received and sent by the Aurix unit. The can data is passed to Driveworks via UDP packets.

    • Aurix version below 4.0 Support 64 byte messages Support hardware timestamps Need to be configured with EasyCan configuration file.
    • Aurix version above 4.0 Support upto 8 byte messages Does not support hardware timestamps Need to be configured with parameters

    See Receiving and Sending Data for more information.

  • can.virtual interface for reading CAN data from binary logs.
  • can.simulator interface similar to can.socket. This configuration returns messages timestamped against an external source, supported by interleaved CAN messages wth payloads interpreted as timestamps. The timestamp message ID is fixed at 0x0F2. For example, if an external application wanted to send a message with ID 0xABC with custom timestamp, it may send:
ID 0x0F2 <timestamp>

CAN message interpreter

The CAN interpreter module is defined in Interpreter.h. It supports the DBC communication format and can be extended to additional formats by the user.

Relevant Tutorials