- * Interface between the daemon and the binding
- */
-static const struct afb_binding_interface *interface;
-
-/*
- * the type of position expected
- *
- * here, this type is the selection of protocol
- */
-enum type {
- type_OBDII,
- type_CAN,
- type_DEFAULT = type_CAN,
- type_INVALID = -1
-};
-
-#define type_size sizeof(enum type)-2
-
-/* CAN variable initialization */
-struct canfd_frame canfd_frame;
-
-struct can_handler {
- int socket;
- char *device;
- openxc_CanMessage *msg;
- struct sockaddr_can txAddress;
-};
-
-/*
- * each generated event
- */
-struct event {
- struct event *next; /* link for the same period */
- const char *name; /* name of the event */
- struct afb_event event; /* the event for the binder */
- enum type type; /* the type of data expected */
- int id; /* id of the event for unsubscribe */
-};
-
-/*****************************************************************************************/
-/*****************************************************************************************/
-/** **/
-/** **/
-/** SECTION: UTILITY FUNCTIONS **/
-/** **/
-/** **/
-/*****************************************************************************************/
-/*****************************************************************************************/
-
-/*
- * @brief Retry a function 3 times