#pragma once
#include <map>
+#include <mutex>
#include <queue>
#include <vector>
#include <string>
#include <thread>
#include <linux/can.h>
-#include <mutex>
-#include <condition_variable>
#include "timer.hpp"
#include "openxc.pb.h"
*/
static std::map<std::string, struct afb_event> subscribed_signals;
-/**
-* @brief Mutex allowing safe manipulation on subscribed_signals map.
-* @desc To ensure that the map object isn't modified when we read it, you
-* have to set this mutex before use subscribed_signals map object.
-*/
-extern std::mutex subscribed_signals_mutex;
+std::mutex& get_subscribed_signals_mutex();
/** Public: Return the currently active CAN configuration. */
CanMessageSet* getActiveMessageSet();
* @brief Return an array of the metadata for the 2 CAN buses you want to
* monitor. The size of this array is fixed at 2.
*/
-CanBus* getCanBuses();
+can_bus_dev_t getCanBuses();
/**
* @brief Find one or many signals based on its name or id