summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-06 22:39:31 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:05:17 +0100
commita1a0b7b176f6c34c0e644335ff70be3f7421494b (patch)
tree7735cf4de3d4ed8b9df757064c73860fa052fdee
parentde8fb10e1d8e98a85dfba6fc8966266dbf5e42c6 (diff)
Finalize new directories organization.
Change include statements and CMakeLists.txt accordingly to the new layout. Change-Id: Ief0821f7f6636b072cf26c7d8d8fcc16fe43ab01 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--src/CMakeLists.txt7
-rw-r--r--src/can/can-bus.hpp6
-rw-r--r--src/can/can-message.hpp2
-rw-r--r--src/can/can-signals.hpp8
-rw-r--r--src/diagnostic/diagnostic-message.hpp6
-rw-r--r--src/low-can-binding.cpp12
-rw-r--r--src/utils/signals.hpp4
7 files changed, 24 insertions, 21 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 89e33611..8acdd1d7 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -69,7 +69,7 @@ add_compile_options(${EXTRAS_CXXFLAGS})
add_definitions(-DPB_FIELD_16BIT)
# Needed extra directories to hit the required headers files.
-include_directories(${EXTRAS_INCLUDE_DIRS} ${PROJECT_LIBDIR}/openxc-message-format/gen/cpp ${PROJECT_LIBDIR}/nanopb/ ${PROJECT_LIBDIR}/uds-c/src ${PROJECT_LIBDIR}/bitfield-c/src ${PROJECT_LIBDIR}/isotp-c/src)
+include_directories(${EXTRAS_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR} ${PROJECT_LIBDIR}/openxc-message-format/gen/cpp ${PROJECT_LIBDIR}/nanopb/ ${PROJECT_LIBDIR}/uds-c/src ${PROJECT_LIBDIR}/bitfield-c/src ${PROJECT_LIBDIR}/isotp-c/src)
###########################################################################
# the library used by the binding : openxc, bitfield, uds, isotp
@@ -83,7 +83,10 @@ add_library(openxc STATIC ${PROJECT_LIBDIR}/openxc-message-format/gen/cpp/openxc
message(STATUS "Creation of ${PROJECT_NAME} binding for AFB-DAEMON")
###########################################################################
-add_library(${PROJECT_NAME} MODULE ${PROJECT_NAME}.cpp can-bus.cpp can-message.cpp can-signals.cpp can-decoder.cpp obd2-signals.cpp signals.cpp openxc-utils.cpp timer.cpp)
+add_library(${PROJECT_NAME} MODULE ${PROJECT_NAME}.cpp
+ can/can-bus.cpp can/can-message.cpp can/can-signals.cpp can/can-decoder.cpp
+ obd2/obd2-signals.cpp
+ utils/signals.cpp utils/openxc-utils.cpp utils/timer.cpp)
target_link_libraries(${PROJECT_NAME} ${EXTRAS_LIBRARIES} bitfield isotp uds openxc pthread)
set_target_properties(${PROJECT_NAME} PROPERTIES
diff --git a/src/can/can-bus.hpp b/src/can/can-bus.hpp
index bc2bb04c..bf0bdd31 100644
--- a/src/can/can-bus.hpp
+++ b/src/can/can-bus.hpp
@@ -23,10 +23,10 @@
#include <linux/can.h>
#include <condition_variable>
-#include "timer.hpp"
#include "openxc.pb.h"
-#include "can-signals.hpp"
-#include "can-message.hpp"
+#include "utils/timer.hpp"
+#include "can/can-signals.hpp"
+#include "can/can-message.hpp"
#include "low-can-binding.hpp"
// TODO actual max is 32 but dropped to 24 for memory considerations
diff --git a/src/can/can-message.hpp b/src/can/can-message.hpp
index 9f6a36da..b118ce72 100644
--- a/src/can/can-message.hpp
+++ b/src/can/can-message.hpp
@@ -22,7 +22,7 @@
#include <cstdint>
#include <linux/can.h>
-#include "timer.hpp"
+#include "utils/timer.hpp"
#define CAN_MESSAGE_SIZE 8
diff --git a/src/can/can-signals.hpp b/src/can/can-signals.hpp
index 250ff197..b5b87eb4 100644
--- a/src/can/can-signals.hpp
+++ b/src/can/can-signals.hpp
@@ -23,11 +23,11 @@
#include <vector>
#include <string>
-#include "obd2-signals.hpp"
-#include "timer.hpp"
#include "openxc.pb.h"
-#include "can-bus.hpp"
-#include "can-message.hpp"
+#include "utils/timer.hpp"
+#include "can/can-bus.hpp"
+#include "can/can-message.hpp"
+#include "obd2/obd2-signals.hpp"
extern "C"
{
diff --git a/src/diagnostic/diagnostic-message.hpp b/src/diagnostic/diagnostic-message.hpp
index a8f21e09..1ee9d961 100644
--- a/src/diagnostic/diagnostic-message.hpp
+++ b/src/diagnostic/diagnostic-message.hpp
@@ -20,8 +20,8 @@
#include <vector>
#include "uds/uds.h"
-#include "can-bus.hpp"
-#include "can-message.hpp"
+#include "can/can-bus.hpp"
+#include "can/can-message.hpp"
#include "low-can-binding.hpp"
@@ -78,7 +78,7 @@ class obd2_signals_t {
public:
obd2_signals_t(uint8_t pid, const char* generic_name, const int min_, const int max_, enum UNIT unit, int frequency, bool supported);
- void init_diagnostic_shims(can_bus_dev_t& can_bus_dev)
+ void init_diagnostic_shims(can_bus_dev_t& can_bus_dev);
void add_request(int pid);
std::vector<Obd2Pid>& get_obd2_signals();
diff --git a/src/low-can-binding.cpp b/src/low-can-binding.cpp
index 043261fa..84f1d789 100644
--- a/src/low-can-binding.cpp
+++ b/src/low-can-binding.cpp
@@ -27,13 +27,13 @@
#include <json-c/json.h>
#include <systemd/sd-event.h>
-#include "timer.hpp"
-#include "signals.hpp"
-#include "can-bus.hpp"
#include "openxc.pb.h"
-#include "can-signals.hpp"
-#include "can-message.hpp"
-#include "openxc-utils.hpp"
+#include "can/can-bus.hpp"
+#include "can/can-signals.hpp"
+#include "can/can-message.hpp"
+#include "utils/timer.hpp"
+#include "utils/signals.hpp"
+#include "utils/openxc-utils.hpp"
extern "C"
{
diff --git a/src/utils/signals.hpp b/src/utils/signals.hpp
index 81ed4248..bc421e96 100644
--- a/src/utils/signals.hpp
+++ b/src/utils/signals.hpp
@@ -22,8 +22,8 @@
#include <fnmatch.h>
#include "openxc.pb.h"
-#include "can-signals.hpp"
-#include "obd2-signals.hpp"
+#include "can/can-signals.hpp"
+#include "obd2/obd2-signals.hpp"
template <typename T>
void lookup_signals_by_name(const std::string& key, std::vector<T>& signals, std::vector<T*>& found_signals)