Go to the documentation of this file.
35 #if defined(__linux__)
37 #include <linux/can.h>
38 #include <libsocketcan.h>
45 #define CAN_MAX_DLEN (8)
52 #define CAN_EFF_FLAG (0x80000000U)
53 #define CAN_RTR_FLAG (0x40000000U)
54 #define CAN_ERR_FLAG (0x20000000U)
57 #define CAN_SFF_MASK (0x000007FFU)
58 #define CAN_EFF_MASK (0x1FFFFFFFU)
59 #define CAN_ERR_MASK (0x1FFFFFFFU)
@ CAN_STATE_ERROR_PASSIVE
RX/TX error count < 256.
uint32_t brp_inc
Bit-rate prescaler, increment.
#define CAN_MAX_DLEN
Max data length for a CAN frame.
uint8_t __res1
reserved / padding
uint8_t __res0
reserved / padding
uint32_t brp_max
Bit-rate prescaler, max value.
uint32_t sjw_max
Synchronisation jump width.
uint32_t tseg1_max
Time segment 1, max value.
@ CAN_STATE_BUS_OFF
RX/TX error count >= 256.
uint32_t sample_point
Sample point in one-tenth of a percent.
@ CAN_STATE_STOPPED
Device is stopped.
@ CAN_STATE_ERROR_WARNING
RX/TX error count < 128.
@ CAN_STATE_ERROR_ACTIVE
RX/TX error count < 96.
uint32_t phase_seg2
Phase buffer segment 2 in TQs.
uint32_t tseg2_min
Time segment 2 = phase_seg2, min value.
uint32_t prop_seg
Propagation segment in TQs.
@ CAN_STATE_SLEEPING
Device is sleeping.
Controller Area Network filter.
CAN hardware-dependent bit-timing constant.
uint32_t tq
Time quanta (TQ) in nanoseconds.
Controller Area Network frame.
uint32_t tseg2_max
Time segment 2, max value.
canid_t can_id
32 bit CAN_ID + EFF/RTR/ERR flags
uint32_t tseg1_min
Time segment 1 = prop_seg + phase_seg1, min value.
uint32_t sjw
Synchronisation jump width in TQs.
uint32_t phase_seg1
Phase buffer segment 1 in TQs.
CAN bit-timing parameters.
uint32_t brp
Bit-rate prescaler.
uint8_t can_dlc
frame payload length in byte (0 .
uint8_t data[CAN_MAX_DLEN]
Frame data.
uint32_t brp_min
Bit-rate prescaler, min value.
uint32_t bitrate
Bit-rate in bits/second.
uint32_t canid_t
Controller Area Network Identifier structure.