diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-09 16:56:56 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-16 17:10:40 +0100 |
commit | 8871f8ae696035877afcbb3b089fc06219c2ba3a (patch) | |
tree | c06b629ad775ae362a9e05430bb5fea64bb64049 /src | |
parent | 9099177556d598676e4d6322ae49d22bb2f0c59e (diff) |
Fix: include statement with wrong path.
And minor fixes.
Change-Id: Ica55c0708edd86d0aa37e7117b3c3fad551a0167
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r-- | src/can/can-bus-dev.cpp | 2 | ||||
-rw-r--r-- | src/can/can-bus.hpp | 11 | ||||
-rw-r--r-- | src/can/can-message.cpp | 4 | ||||
-rw-r--r-- | src/can/can-message.hpp | 3 | ||||
-rw-r--r-- | src/can/can-signals.hpp | 8 | ||||
-rw-r--r-- | src/diagnostic/active-diagnostic-request.cpp | 2 | ||||
-rw-r--r-- | src/diagnostic/active-diagnostic-request.hpp | 13 | ||||
-rw-r--r-- | src/diagnostic/diagnostic-manager.cpp | 7 | ||||
-rw-r--r-- | src/diagnostic/diagnostic-manager.hpp | 19 | ||||
-rw-r--r-- | src/diagnostic/diagnostic-message.cpp | 5 | ||||
-rw-r--r-- | src/diagnostic/diagnostic-message.hpp | 6 | ||||
-rw-r--r-- | src/utils/openxc-utils.cpp | 2 | ||||
-rw-r--r-- | src/utils/timer.hpp | 2 |
13 files changed, 47 insertions, 37 deletions
diff --git a/src/can/can-bus-dev.cpp b/src/can/can-bus-dev.cpp index 87d7bf5..3f3dc1c 100644 --- a/src/can/can-bus-dev.cpp +++ b/src/can/can-bus-dev.cpp @@ -29,7 +29,7 @@ #include "can-bus.hpp" #include "can-message.hpp" -#include "low-can-binding.hpp" +#include "../low-can-binding.hpp" /// @brief Class constructor /// @param dev_name String representing the device name into the linux /dev tree diff --git a/src/can/can-bus.hpp b/src/can/can-bus.hpp index 154822f..17e60d2 100644 --- a/src/can/can-bus.hpp +++ b/src/can/can-bus.hpp @@ -25,14 +25,13 @@ #include <condition_variable> #include "openxc.pb.h" -#include "utils/timer.hpp" -#include "can/can-signals.hpp" -#include "can/can-message.hpp" - -#include "low-can-binding.hpp" - +#include "../utils/timer.hpp" +#include "can-signals.hpp" +#include "can-message.hpp" #include "can-bus-dev.hpp" +#include "../low-can-binding.hpp" + // TODO actual max is 32 but dropped to 24 for memory considerations #define MAX_ACCEPTANCE_FILTERS 24 // TODO this takes up a ton of memory diff --git a/src/can/can-message.cpp b/src/can/can-message.cpp index b9a2d1a..592f5e5 100644 --- a/src/can/can-message.cpp +++ b/src/can/can-message.cpp @@ -15,11 +15,11 @@ * limitations under the License. */ -#include "can/can-message.hpp" +#include "can-message.hpp" #include <cstring> -#include "low-can-binding.hpp" +#include "../low-can-binding.hpp" /******************************************************************************** * diff --git a/src/can/can-message.hpp b/src/can/can-message.hpp index f7e445d..730e9f9 100644 --- a/src/can/can-message.hpp +++ b/src/can/can-message.hpp @@ -22,7 +22,8 @@ #include <cstdint> #include <linux/can.h> -#include "utils/timer.hpp" +#include "../utils/timer.hpp" +#include "can-message-set.hpp" #define CAN_MESSAGE_SIZE 8 diff --git a/src/can/can-signals.hpp b/src/can/can-signals.hpp index 63903bd..e906d26 100644 --- a/src/can/can-signals.hpp +++ b/src/can/can-signals.hpp @@ -24,10 +24,10 @@ #include <string> #include "openxc.pb.h" -#include "utils/timer.hpp" -#include "can/can-bus.hpp" -#include "can/can-message.hpp" -#include "obd2/obd2-signals.hpp" +#include "../utils/timer.hpp" +#include "can-bus.hpp" +#include "can-message.hpp" +#include "../obd2/obd2-signals.hpp" extern "C" { diff --git a/src/diagnostic/active-diagnostic-request.cpp b/src/diagnostic/active-diagnostic-request.cpp index 96e4b3a..251fddb 100644 --- a/src/diagnostic/active-diagnostic-request.cpp +++ b/src/diagnostic/active-diagnostic-request.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#include "active-diagnostic-request.hpp" + active_diagnostic_request_t::active_diagnostic_request_t() : can_bus_dev_{nullptr}, uint32_t id_{0}, DiagnosticRequestHandle{nullptr}, name_{""}, decoder_{nullptr}, callback_{nullptr}, reccuring_{false}, wait_for_multiple_responses_{false}, diff --git a/src/diagnostic/active-diagnostic-request.hpp b/src/diagnostic/active-diagnostic-request.hpp index 2850663..f1128c5 100644 --- a/src/diagnostic/active-diagnostic-request.hpp +++ b/src/diagnostic/active-diagnostic-request.hpp @@ -21,13 +21,14 @@ #include "uds/uds.h" #include "uds/uds_types.h" -#include "can/can-bus.hpp" -#include "can/can-message.hpp" +#include "../can/can-bus-dev.hpp" +#include "../can/can-message.hpp" +#include "diagnostic-manager.hpp" -#include "low-can-binding.hpp" +#include "../low-can-binding.hpp" class active_diagnostic_request_t; -class can_bus_dev_t; +class diagnostic_manager_t; /* Public: The signature for an optional function that can apply the neccessary * formula to translate the binary payload into meaningful data. @@ -80,7 +81,7 @@ private: public: active_diagnostic_request_t(); - void updateDiagnosticRequestEntry(DiagnosticsManager* manager, CanBus* bus, DiagnosticRequest* request, - const char* name, bool waitForMultipleResponses, const DiagnosticResponseDecoder decoder, + void updateDiagnosticRequestEntry(diagnostic_manager_t* manager, can_bus_dev_t* bus, DiagnosticRequest* request, + const std::string name, bool wait_for_multiple_responses, const DiagnosticResponseDecoder decoder, const DiagnosticResponseCallback callback, float frequencyHz); }; diff --git a/src/diagnostic/diagnostic-manager.cpp b/src/diagnostic/diagnostic-manager.cpp index 2be9a05..547b087 100644 --- a/src/diagnostic/diagnostic-manager.cpp +++ b/src/diagnostic/diagnostic-manager.cpp @@ -15,10 +15,13 @@ * limitations under the License. */ -#include "obd2/diagnostic-manager.hpp" +#include <algorithm> +#include "diagnostic-manager.hpp" + +#include "uds/uds.h" #include "../configuration.hpp" -#include "../low-can-binding.hpp" + #define MAX_REQUEST_ENTRIES 50 diagnostic_manager_t::diagnostic_manager_t() diff --git a/src/diagnostic/diagnostic-manager.hpp b/src/diagnostic/diagnostic-manager.hpp index bb12f6b..2b804a4 100644 --- a/src/diagnostic/diagnostic-manager.hpp +++ b/src/diagnostic/diagnostic-manager.hpp @@ -17,14 +17,15 @@ #pragma once +#include <queue> #include <vector> #include "uds/uds.h" -#include "can/can-bus-dev.hpp" -#include "can/can-message.hpp" -#include "obd2/active-diagnostic-request.hpp" +#include "../can/can-bus-dev.hpp" +#include "../can/can-message.hpp" +#include "active-diagnostic-request.hpp" -#include "low-can-binding.hpp" +#include "../low-can-binding.hpp" /* Private: Each CAN bus needs its own set of shim functions, so this should * match the maximum CAN controller count. @@ -57,7 +58,7 @@ private: std::vector<active_diagnostic_request_t> free_request_entries_; /*!< freeRequestEntries - A list of all available slots for active diagnostic * requests. This free list is backed by statically allocated entries in * the requestListEntries attribute.*/ - std::vector<active_diagnostic_request_t> request_list_entries_ /*!< requestListEntries - Static allocation for all active diagnostic requests.*/ + std::vector<active_diagnostic_request_t> request_list_entries_; /*!< requestListEntries - Static allocation for all active diagnostic requests.*/ bool initialized_; /*!< * initialized - True if the DiagnosticsManager has been initialized with shims. It will interface with the uds-c lib*/ @@ -72,11 +73,13 @@ public: void checkSupportedPids(const active_diagnostic_request_t& request, const DiagnosticResponse& response, float parsedPayload); - bool addRecurringRequest(DiagnosticRequest* request, const char* name, + bool add_request(DiagnosticRequest* request, const std::string name, + bool waitForMultipleResponses, const DiagnosticResponseDecoder decoder, + const DiagnosticResponseCallback callback); + + bool add_recurring_request(DiagnosticRequest* request, const char* name, bool waitForMultipleResponses, const DiagnosticResponseDecoder decoder, const DiagnosticResponseCallback callback, float frequencyHz); void reset(); - - void add_request(int pid); }; diff --git a/src/diagnostic/diagnostic-message.cpp b/src/diagnostic/diagnostic-message.cpp index bd5d0ec..8f42653 100644 --- a/src/diagnostic/diagnostic-message.cpp +++ b/src/diagnostic/diagnostic-message.cpp @@ -89,13 +89,14 @@ bool obd2_signal_t::is_obd2_response(can_message_t can_message) } return false; */ -} + return false; +} void obd2_signal_t::add_request(int pid) { DiagnosticRequest request = { arbitration_id: OBD2_FUNCTIONAL_BROADCAST_ID, - mode: 0x1, has_pid: true, pid_ }; + mode: 0x1, has_pid: true, pid: pid_ }; } /** diff --git a/src/diagnostic/diagnostic-message.hpp b/src/diagnostic/diagnostic-message.hpp index 2c6d4ba..5ca651c 100644 --- a/src/diagnostic/diagnostic-message.hpp +++ b/src/diagnostic/diagnostic-message.hpp @@ -20,10 +20,10 @@ #include <vector> #include "uds/uds.h" -#include "can/can-bus.hpp" -#include "can/can-message.hpp" +#include "../can/can-bus.hpp" +#include "../can/can-message.hpp" -#include "low-can-binding.hpp" +#include "../low-can-binding.hpp" enum UNIT { POURCENT, diff --git a/src/utils/openxc-utils.cpp b/src/utils/openxc-utils.cpp index 527f725..40745a0 100644 --- a/src/utils/openxc-utils.cpp +++ b/src/utils/openxc-utils.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -#include "utils/openxc-utils.hpp" +#include "openxc-utils.hpp" openxc_VehicleMessage build_VehicleMessage_with_SimpleMessage(openxc_DynamicField_Type type, const openxc_SimpleMessage& message) { diff --git a/src/utils/timer.hpp b/src/utils/timer.hpp index c8b7fb9..a3cbecd 100644 --- a/src/utils/timer.hpp +++ b/src/utils/timer.hpp @@ -47,4 +47,4 @@ private: public: frequency_clock_t(); -}
\ No newline at end of file +};
\ No newline at end of file |