Fix wrong returned value about getCanBuses.
[apps/low-level-can-service.git] / src / can-signals.hpp
index d4ada1d..4b43945 100644 (file)
 #pragma once
 
 #include <map>
+#include <mutex>
 #include <queue>
-#include <string>
 #include <vector>
-#include <fnmatch.h>
+#include <string>
+#include <thread>
+#include <linux/can.h>
 
+#include "timer.hpp"
+#include "openxc.pb.h"
 #include "can-utils.hpp"
 
 extern "C"
 {
+       #include <afb/afb-binding.h>
        #include <afb/afb-event-itf.h>
 }
 
@@ -42,6 +47,8 @@ extern "C"
  */
 static std::map<std::string, struct afb_event> subscribed_signals;
 
+std::mutex& get_subscribed_signals_mutex();
+
 /** Public: Return the currently active CAN configuration. */
 CanMessageSet* getActiveMessageSet();
 
@@ -90,7 +97,7 @@ int getMessageCount();
  * @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