27 #ifndef CO_ERROR_MSGS_H
28 #define CO_ERROR_MSGS_H
38 #define CAN_NOT_FOUND "(%s) CAN Interface \"%s\" not found", __func__
39 #define CAN_INIT_FAILED "(%s) CAN Interface \"%s\" Init failed", __func__
40 #define CAN_BINDING_FAILED "(%s) Binding CAN Interface \"%s\" failed", __func__
41 #define CAN_ERROR_FILTER_FAILED "(%s) Setting CAN Interface \"%s\" error filter failed", __func__
42 #define CAN_FILTER_FAILED "(%s) Setting CAN Interface \"%s\" message filter failed", __func__
43 #define CAN_NAMETOINDEX "CAN Interface \"%s\" -> Index %d"
44 #define CAN_SOCKET_BUF_SIZE "CAN Interface \"%s\" Buffer set to %d messages (%d Bytes)"
45 #define CAN_RX_SOCKET_QUEUE_OVERFLOW "CAN Interface \"%s\" has lost %d messages"
46 #define CAN_BUSOFF "CAN Interface \"%s\" changed to \"Bus Off\". Switching to Listen Only mode..."
47 #define CAN_NOACK "CAN Interface \"%s\" no \"ACK\" received. Switching to Listen Only mode..."
48 #define CAN_RX_PASSIVE "CAN Interface \"%s\" changed state to \"Rx Passive\""
49 #define CAN_TX_PASSIVE "CAN Interface \"%s\" changed state to \"Tx Passive\""
50 #define CAN_TX_LEVEL_ACTIVE "CAN Interface \"%s\" changed state to \"Active\""
51 #define CAN_RX_BUF_OVERFLOW "CAN Interface \"%s\" Rx buffer overflow. Message dropped"
52 #define CAN_TX_BUF_OVERFLOW "CAN Interface \"%s\" Tx buffer overflow. Message dropped"
53 #define CAN_RX_LEVEL_WARNING "CAN Interface \"%s\" reached Rx Warning Level"
54 #define CAN_TX_LEVEL_WARNING "CAN Interface \"%s\" reached Tx Warning Level"
60 #define DBG_GENERAL "(%s) Error: %s%d", __func__
61 #define DBG_ERRNO "(%s) OS error \"%s\" in %s", __func__, strerror(errno)
62 #define DBG_CO_DEBUG "(%s) CO_DEBUG: %s", __func__
63 #define DBG_CAN_TX_FAILED "(%s) Transmitting CAN msg OID 0x%08x failed(%s)", __func__
64 #define DBG_CAN_RX_PARAM_FAILED "(%s) Setting CAN rx buffer failed (%s)", __func__
65 #define DBG_CAN_RX_FAILED "(%s) Receiving CAN msg failed (%s)", __func__
66 #define DBG_CAN_ERROR_GENERAL "(%s) Socket error msg ID: 0x%08x, Data[0..7]: 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x (%s)", __func__
67 #define DBG_CAN_RX_EPOLL "(%s) CAN Epoll error (0x%02x - %s)", __func__
68 #define DBG_CAN_SET_LISTEN_ONLY "(%s) %s Set Listen Only", __func__
69 #define DBG_CAN_CLR_LISTEN_ONLY "(%s) %s Leave Listen Only", __func__
72 #define DBG_EMERGENCY_RX "CANopen Emergency message from node 0x%02X: errorCode=0x%04X, errorRegister=0x%02X, errorBit=0x%02X, infoCode=0x%08X"
73 #define DBG_NMT_CHANGE "CANopen NMT state changed to: \"%s\" (%d)"
74 #define DBG_HB_CONS_NMT_CHANGE "CANopen Remote node ID = 0x%02X (index = %d): NMT state changed to: \"%s\" (%d)"
75 #define DBG_ARGUMENT_UNKNOWN "(%s) Unknown %s argument: \"%s\"", __func__
76 #define DBG_NOT_TCP_PORT "(%s) -c argument \"%s\" is not a valid tcp port", __func__
77 #define DBG_WRONG_NODE_ID "(%s) Wrong node ID \"%d\"", __func__
78 #define DBG_WRONG_PRIORITY "(%s) Wrong RT priority \"%d\"", __func__
79 #define DBG_NO_CAN_DEVICE "(%s) Can't find CAN device \"%s\"", __func__
80 #define DBG_OBJECT_DICTIONARY "(%s) Error in Object Dictionary \"%s\"", __func__
81 #define DBG_OD_ENTRY "(%s) Error in Object Dictionary entry: 0x%X", __func__
82 #define DBG_CAN_OPEN "(%s) CANopen error in %s, err=%d", __func__
83 #define DBG_CAN_OPEN_INFO "CANopen device, Node ID = 0x%02X, %s"
86 #define DBG_EPOLL_UNKNOWN "(%s) CAN Epoll error, events=0x%02x, fd=%d", __func__
87 #define DBG_COMMAND_LOCAL_BIND "(%s) Can't bind local socket to path \"%s\"", __func__
88 #define DBG_COMMAND_TCP_BIND "(%s) Can't bind tcp socket to port \"%d\"", __func__
89 #define DBG_COMMAND_STDIO_INFO "CANopen command interface on \"standard IO\" started"
90 #define DBG_COMMAND_LOCAL_INFO "CANopen command interface on local socket \"%s\" started"
91 #define DBG_COMMAND_TCP_INFO "CANopen command interface on tcp port \"%d\" started"