From: Romain Forlot Date: Mon, 6 Mar 2017 21:39:31 +0000 (+0100) Subject: Finalize new directories organization. X-Git-Tag: 3.99.1~393 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=a1a0b7b176f6c34c0e644335ff70be3f7421494b;p=apps%2Flow-level-can-service.git Finalize new directories organization. Change include statements and CMakeLists.txt accordingly to the new layout. Change-Id: Ief0821f7f6636b072cf26c7d8d8fcc16fe43ab01 Signed-off-by: Romain Forlot --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 89e3361..8acdd1d 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 bc2bb04..bf0bdd3 100644 --- a/src/can/can-bus.hpp +++ b/src/can/can-bus.hpp @@ -23,10 +23,10 @@ #include #include -#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 9f6a36d..b118ce7 100644 --- a/src/can/can-message.hpp +++ b/src/can/can-message.hpp @@ -22,7 +22,7 @@ #include #include -#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 250ff19..b5b87eb 100644 --- a/src/can/can-signals.hpp +++ b/src/can/can-signals.hpp @@ -23,11 +23,11 @@ #include #include -#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 a8f21e0..1ee9d96 100644 --- a/src/diagnostic/diagnostic-message.hpp +++ b/src/diagnostic/diagnostic-message.hpp @@ -20,8 +20,8 @@ #include #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& get_obd2_signals(); diff --git a/src/low-can-binding.cpp b/src/low-can-binding.cpp index 043261f..84f1d78 100644 --- a/src/low-can-binding.cpp +++ b/src/low-can-binding.cpp @@ -27,13 +27,13 @@ #include #include -#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 81ed424..bc421e9 100644 --- a/src/utils/signals.hpp +++ b/src/utils/signals.hpp @@ -22,8 +22,8 @@ #include #include "openxc.pb.h" -#include "can-signals.hpp" -#include "obd2-signals.hpp" +#include "can/can-signals.hpp" +#include "obd2/obd2-signals.hpp" template void lookup_signals_by_name(const std::string& key, std::vector& signals, std::vector& found_signals)