aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-12 19:52:05 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:10:41 +0100
commit301b33d9bfff4db47a06684ebd7916cdebd63edc (patch)
treeac8983331695d1526d458ea685505eed654041d8 /src
parent95d91c64f891ece71fa196178345bacf9e3967d6 (diff)
Missing include header and code reordering and cleaning.
Change-Id: I37b2b2b439bb72d2230d606b9ddd52c3eb08ea8f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r--src/configuration.hpp8
-rw-r--r--src/low-can-binding.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/configuration.hpp b/src/configuration.hpp
index 516b0ff8..321b96ea 100644
--- a/src/configuration.hpp
+++ b/src/configuration.hpp
@@ -69,11 +69,12 @@ class configuration_t
std::vector<can_signal_t>& get_can_signals();
- const std::vector<can_message_definition_t>& get_can_message_definition();
-
std::vector<obd2_signal_t>& get_obd2_signals();
const std::vector<std::string>& get_signals_prefix() const;
+
+ const std::vector<can_message_definition_t>& get_can_message_definition();
+
uint32_t get_signal_id(obd2_signal_t& sig) const;
uint32_t get_signal_id(can_signal_t& sig) const;
@@ -90,14 +91,12 @@ class configuration_t
/// @param[in] bus A CanBus struct defining the bus's metadata
/// @param[in] writable Configure the controller in a writable mode. If false, it will be configured as "listen only" and will not allow writes or even CAN ACKs.
/// @param[in] buses An array of all CAN buses.
- /// @param[in] busCount The length of the buses array.
void pre_initialize(can_bus_dev_t* bus, bool writable, can_bus_dev_t* buses, const int busCount);
/// TODO: implement this function as method into can_bus class
/// @brief Post-initialize actions made after CAN bus initialization
/// @param[in] bus A CanBus struct defining the bus's metadata
/// @param[in] writable Configure the controller in a writable mode. If false, it will be configured as "listen only" and will not allow writes or even CAN ACKs.
/// @param[in] buses An array of all CAN buses.
- /// @param[in] busCount The length of the buses array.
void post_initialize(can_bus_dev_t* bus, bool writable, can_bus_dev_t* buses, const int busCount);
/// TODO: implement this function as method into can_bus class
/// @brief Check if the device is connected to an active CAN bus, i.e. it's received a message in the recent past.
@@ -106,7 +105,6 @@ class configuration_t
/// TODO: implement this function as method into can_bus class
/// @brief Log transfer statistics about all active CAN buses to the debug log.
/// @param[in] buses An array of active CAN buses.
- /// @param[in] busCount The length of the buses array.
bool isBusActive(can_bus_dev_t* bus);
*/
};
diff --git a/src/low-can-binding.cpp b/src/low-can-binding.cpp
index 7baf147a..d1c9ae07 100644
--- a/src/low-can-binding.cpp
+++ b/src/low-can-binding.cpp
@@ -22,6 +22,7 @@
#include <mutex>
#include <vector>
#include <thread>
+#include <time.h>
#include <linux/can.h>
#include <json-c/json.h>
#include <systemd/sd-event.h>
@@ -33,6 +34,7 @@
#include "can/can-message.hpp"
#include "utils/timer.hpp"
#include "utils/signals.hpp"
+#include "obd2/obd2-signals.hpp"
#include "utils/openxc-utils.hpp"
extern "C"