summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/can-signals.cpp2
-rw-r--r--src/can-signals.hpp5
-rw-r--r--src/can_decode_message.cpp2
-rw-r--r--src/low-can-binding.cpp2
-rw-r--r--src/low-can-binding.hpp2
6 files changed, 7 insertions, 7 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b08dead9..8fd38ec7 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -40,6 +40,7 @@ add_compile_options(-Werror=implicit-function-declaration)
add_compile_options(-ffunction-sections -fdata-sections)
add_compile_options(-Wl,--as-needed -Wl,--gc-sections)
add_compile_options(-fPIC)
+add_compile_options(-std=c++11)
set(CMAKE_C_FLAGS_PROFILING "-g -O0 -pg -Wp,-U_FORTIFY_SOURCE")
set(CMAKE_C_FLAGS_DEBUG "-g -O0 -ggdb -Wp,-U_FORTIFY_SOURCE")
diff --git a/src/can-signals.cpp b/src/can-signals.cpp
index 0348268a..1ccc7c30 100644
--- a/src/can-signals.cpp
+++ b/src/can-signals.cpp
@@ -27,7 +27,7 @@ size_t getSignalCount()
return SIGNALS[MESSAGE_SET_ID].size();
}
-std::vector<CanSignal> find_can_signals(openxc_DynamicField& key)
+std::vector<CanSignal> find_can_signals(const struct afb_binding_interface* interface, openxc_DynamicField& key)
{
std::vector<CanSignal> signals;
diff --git a/src/can-signals.hpp b/src/can-signals.hpp
index d6ec171a..37724867 100644
--- a/src/can-signals.hpp
+++ b/src/can-signals.hpp
@@ -24,13 +24,14 @@
#include <linux/can.h>
#include "can-utils.hpp"
-#include "low-can-binding.hpp"
extern "C"
{
#include <afb/afb-event-itf.h>
}
+#define MESSAGE_SET_ID 0
+
/**
* @brief Dumb SIGNALS array. It is composed by CanMessageSet
* SIGNALS[MESSAGE_SET_ID][CanSignal]
@@ -98,7 +99,7 @@ CanBus* getCanBuses();
*
* return[std::vector<std::string>] return found CanSignal generic name vector.
*/
-std::vector<CanSignal> find_can_signals(const openxc_DynamicField &key);
+std::vector<CanSignal> find_can_signals(const struct afb_binding_interface* interface, const openxc_DynamicField &key);
uint32_t get_CanSignal_id(const CanSignal& sig)
{
diff --git a/src/can_decode_message.cpp b/src/can_decode_message.cpp
index 51993b80..126c4fac 100644
--- a/src/can_decode_message.cpp
+++ b/src/can_decode_message.cpp
@@ -35,7 +35,7 @@ void can_decode_message(can_bus_t &can_bus)
/* First we have to found which CanSignal is */
search_key = build_DynamicField((double)can_message.get_id());
- signals = find_can_signals(search_key);
+ signals = find_can_signals(interface, search_key);
/* Decoding the message ! Don't kill the messenger ! */
for(const auto& sig : signals)
diff --git a/src/low-can-binding.cpp b/src/low-can-binding.cpp
index 4e58dd40..a3351445 100644
--- a/src/low-can-binding.cpp
+++ b/src/low-can-binding.cpp
@@ -118,7 +118,7 @@ static int subscribe_unsubscribe_name(struct afb_req request, bool subscribe, co
else
{
openxc_DynamicField search_key = build_DynamicField(name);
- sig = find_can_signals(search_key);
+ sig = find_can_signals(interface, search_key);
if (sig.empty())
ret = 0;
}
diff --git a/src/low-can-binding.hpp b/src/low-can-binding.hpp
index 5c43ded8..a1d3169a 100644
--- a/src/low-can-binding.hpp
+++ b/src/low-can-binding.hpp
@@ -46,8 +46,6 @@
#include "can-decoder.hpp"
#include "openxc-utils.hpp"
-#define MESSAGE_SET_ID 0
-
/*
* Interface between the daemon and the binding
*/