Go to the documentation of this file.
34 #include <linux/can.h>
37 #if __has_include("CO_error_custom.h")
38 #include "CO_error_custom.h"
40 #include "CO_error_msgs.h"
75 void log_printf(
int priority,
const char *format, ...);
98 #define CO_CANerror_NOACK_MAX 16
107 #define CO_CANerror_LISTEN_ONLY 10
115 char ifName[IFNAMSIZ];
118 struct timespec timestamp;
182 const struct can_frame *msg);
unsigned long int uint32_t
UNSIGNED32 in CANopen (0007h), 32-bit unsigned integer.
Definition: CO_driver.h:155
void log_printf(int priority, const char *format,...)
Message logging function.
Definition: CO_main_basic.c:137
uint16_t CANerrorStatus
CAN error status bitfield, see CO_CAN_ERR_status_t.
Definition: CO_error.h:119
unsigned int uint16_t
UNSIGNED16 in CANopen (0006h), 16-bit unsigned integer.
Definition: CO_driver.h:153
void CO_CANerror_disable(CO_CANinterfaceErrorhandler_t *CANerrorhandler)
Reset CAN error handler.
Definition: CO_error.c:224
@ CO_INTERFACE_LISTEN_ONLY
CAN error passive/active, but currently no other device on bus.
Definition: CO_error.h:88
@ CO_INTERFACE_BUS_OFF
CAN bus off.
Definition: CO_error.h:89
CO_CANinterfaceState_t
driver interface state
Definition: CO_error.h:86
@ CO_INTERFACE_ACTIVE
CAN error passive/active.
Definition: CO_error.h:87
CO_CANinterfaceState_t CO_CANerror_rxMsgError(CO_CANinterfaceErrorhandler_t *CANerrorhandler, const struct can_frame *msg)
Error message received event.
Definition: CO_error.c:277
void CO_CANerror_rxMsg(CO_CANinterfaceErrorhandler_t *CANerrorhandler)
Message received event.
Definition: CO_error.c:237
uint32_t noackCounter
counts no ACK on CAN transmission
Definition: CO_error.h:116
volatile unsigned char listenOnly
set to listen only mode
Definition: CO_error.h:117
CO_CANinterfaceState_t CO_CANerror_txMsg(CO_CANinterfaceErrorhandler_t *CANerrorhandler)
Check if interface is ready for message transmission.
Definition: CO_error.c:253
int fd
interface FD
Definition: CO_error.h:114
void CO_CANerror_init(CO_CANinterfaceErrorhandler_t *CANerrorhandler, int fd, const char *ifname)
Initialize CAN error handler.
Definition: CO_error.c:204
socketCAN interface error handling
Definition: CO_error.h:113