31#if __has_include("CO_error_custom.h")
32#include "CO_error_custom.h"
34#include "CO_error_msgs.h"
66void log_printf(
int priority,
const char* format, ...);
86#define CO_CANerror_NOACK_MAX 16
93#define CO_CANerror_LISTEN_ONLY 10
100 char ifName[IFNAMSIZ];
103 struct timespec timestamp;
155 const struct can_frame* msg);
unsigned long int uint32_t
void CO_CANerror_init(CO_CANinterfaceErrorhandler_t *CANerrorhandler, int fd, const char *ifname)
Initialize CAN error handler.
Definition CO_error.c:176
void CO_CANerror_rxMsg(CO_CANinterfaceErrorhandler_t *CANerrorhandler)
Message received event.
Definition CO_error.c:201
void CO_CANerror_disable(CO_CANinterfaceErrorhandler_t *CANerrorhandler)
Reset CAN error handler.
Definition CO_error.c:191
CO_CANinterfaceState_t
driver interface state
Definition CO_error.h:76
CO_CANinterfaceState_t CO_CANerror_rxMsgError(CO_CANinterfaceErrorhandler_t *CANerrorhandler, const struct can_frame *msg)
Error message received event.
Definition CO_error.c:235
CO_CANinterfaceState_t CO_CANerror_txMsg(CO_CANinterfaceErrorhandler_t *CANerrorhandler)
Check if interface is ready for message transmission.
Definition CO_error.c:214
void log_printf(int priority, const char *format,...)
Message logging function.
Definition CO_main_basic.c:136
@ CO_INTERFACE_BUS_OFF
CAN bus off.
Definition CO_error.h:79
@ CO_INTERFACE_LISTEN_ONLY
CAN error passive/active, but currently no other device on bus.
Definition CO_error.h:78
@ CO_INTERFACE_ACTIVE
CAN error passive/active.
Definition CO_error.h:77
socketCAN interface error handling
Definition CO_error.h:98
int fd
interface FD
Definition CO_error.h:99
uint16_t CANerrorStatus
CAN error status bitfield, see CAN error status bitmasks.
Definition CO_error.h:104
uint32_t noackCounter
counts no ACK on CAN transmission
Definition CO_error.h:101
volatile unsigned char listenOnly
set to listen only mode
Definition CO_error.h:102