47 #ifndef DW_SENSORS_CANBUS_CAN_H_ 48 #define DW_SENSORS_CANBUS_CAN_H_ 97 #define DW_SENSORS_CAN_MAX_ID_LEN 29 100 #define DW_SENSORS_CAN_MAX_MESSAGE_LEN 64 103 #define DW_SENSORS_CAN_MAX_FILTERS 255 109 #pragma pack(push, 1) // Makes sure you have consistent structure packings. 260 #endif // DW_SENSORS_CANBUS_CAN_H_ NVIDIA DriveWorks API: Core Types
DW_API_PUBLIC dwStatus dwSensorCAN_setUseHwTimestamps(bool flag, dwSensorHandle_t sensor)
Enables or disables hardware timestamp of the CAN messages.
DW_API_PUBLIC dwStatus dwSensorCAN_readMessage(dwCANMessage *msg, dwTime_t timeout_us, dwSensorHandle_t sensor)
Reads a CAN packet with a given timeout from the CAN bus.
uint16_t size
Number of bytes of the payload.
uint8_t data[DW_SENSORS_CAN_MAX_MESSAGE_LEN]
Payload.
DW_API_PUBLIC dwStatus dwSensorCAN_popMessage(dwCANMessage *msg, dwSensorHandle_t sensor)
Returns any CAN data previously processed through a RAW data stream.
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
dwStatus
Status definition.
NVIDIA DriveWorks API: Sensors
dwTime_t timestamp_us
Timestamp of the message in microseconds (using clock of the context).
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
DW_API_PUBLIC dwStatus dwSensorCAN_sendMessage(const dwCANMessage *msg, dwTime_t timeout_us, dwSensorHandle_t sensor)
Sends a message over the CAN bus within a specified timeout.
uint32_t id
CAN ID of the message sender.
DW_API_PUBLIC dwStatus dwSensorCAN_setMessageFilter(const uint32_t *ids, const uint32_t *masks, uint16_t num, dwSensorHandle_t sensor)
Specifes a set of CAN IDs to be filtered.
#define DW_SENSORS_CAN_MAX_MESSAGE_LEN
Maximal length of the supported CAN payload [bytes].
DW_API_PUBLIC dwStatus dwSensorCAN_processRawData(const uint8_t *data, size_t size, dwSensorHandle_t sensor)
Decodes CAN data previously read as a RAW data stream into internal queue.
NVIDIA DriveWorks API: Core Exports