+void can_bus_t::start_threads()
+{
+ th_decoding_ = std::thread(can_decoder, this);
+ th_pushing_ = std::thread(can_event_push, this);
+}
+
+/**
+ * @brief Initialize as many as can_bus_dev_t objects with their respective reading thread
+ *
+ * params[std::ifstream& conf_file] conf_file ifstream to the JSON configuration
+ * file located at the rootdir of the binding
+ */
+int init_can_dev()
+{
+ std::vector<std::string> devices_name;
+ int i, t, ret;
+
+ devices_name = read_conf(conf_file_);
+
+ if (devices_name)
+ {
+ t = devices_name.size();
+ i=0
+
+ for(const auto& device : devices_name)
+ {
+ can_bus_dev_t(device);
+ i++;
+ }
+
+ NOTICE(interface_, "Initialized %d/%d can bus device(s)", i, t);
+ return 0;
+ }
+ ERROR(interface_, "init_can_dev: Error at CAN device initialization.");
+ return 1;
+}
+
+/**
+ * @brief Read the conf file and extract device name
+ *
+ * @return[std:vector<std::string>] return a vector of device name
+ */
+std::vector<std::string> read_conf()
+{
+ std::vector<std::string> ret;
+ json_object jo, canbus;
+ int n, i, ok;
+
+ if (conf_file_)
+ {
+ std::string fd_conf_content;
+ std::fseek(conf_file_, 0, SEEK_END);
+ fd_conf_content.resize(std::ftell(conf_file_));
+ std::rewind(fp);
+ std::fread(&fd_conf_content[0], 1, fd_conf_content.size(), conf_file_);
+ std::fclose(conf_file_);
+
+ jo = json_tokener_parse(&fd_conf_content);
+
+ if (jo == NULL || !json_object_object_get_ex(&jo, "canbus", &&canbus))
+ {
+ ERROR(interface_, "Can't find canbus node in the configuration file. Please review it.");
+ ret = nullptr;
+ }
+ else if (json_object_get_type(canbus) != json_type_array)
+ ret.push_back(json_object_get_string(a));
+ else
+ {
+ n = json_object_array_length(a);
+ ok = 0;
+ for (i = 0 ; i < n ; i++)
+ ret.push_back(json_object_get_string(json_object_array_get_idx(a, i)));
+ }
+ return ret;
+ }
+ ERROR(interface_, "Problem at reading the conf file");
+ return nullptr;
+}
+
+/**
+ * @brief Send a can message from a can_message_t object.
+ * TODO: specify which can_dev to use as we can use many
+ *
+ * params[const can_message_t& can_msg] the can message object to send
+ *
+ */
+int can_bus_t::send_can_message(const can_message_t &can_msg)