+ /**
+ * @brief Initialize the binding.
+ *
+ * @param[in] service Structure which represent the Application Framework Binder.
+ *
+ * @return Exit code, zero if success.
+ */
+ int afbBindingV1ServiceInit(struct afb_service service)
+ {
+ int fd_conf;
+ fd_conf = afb_daemon_rootdir_open_locale(interface->daemon, "can_bus.json", O_RDONLY, NULL);
+
+ /* Open CAN socket */
+ can_bus_t can_bus_handler(interface, fd_conf);
+ if(can_bus_handler.init_can_dev() == 0)
+ {
+ can_bus_handler.start_threads();
+ return 0;
+ }
+
+ return 1;
+ }
+};
\ No newline at end of file