aboutsummaryrefslogtreecommitdiffstats
path: root/src/can
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:08:57 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:08:57 +0100
commit89e072c41f3417e0a80cf95be3cf88326df32777 (patch)
tree6029dbafee1577413beb77d2d96702dad7470c2e /src/can
parent609bb7b10984e6a04f4a1ec977ab695835ffcdae (diff)
Include file changes, typo and renaming operation.
Change-Id: I6643333cfcc8bea120496c53f1cd3b8596e33398 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/can')
-rw-r--r--src/can/can-bus.cpp16
-rw-r--r--src/can/can-bus.hpp2
-rw-r--r--src/can/can-message.cpp2
-rw-r--r--src/can/can-signals.cpp8
4 files changed, 14 insertions, 14 deletions
diff --git a/src/can/can-bus.cpp b/src/can/can-bus.cpp
index d46092bf..851f62a5 100644
--- a/src/can/can-bus.cpp
+++ b/src/can/can-bus.cpp
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-#include "can-bus.hpp"
+#include "can/can-bus.hpp"
#include <map>
#include <cerrno>
@@ -29,8 +29,8 @@
#include <json-c/json.h>
#include <linux/can/raw.h>
-#include "can-decoder.hpp"
-#include "openxc-utils.hpp"
+#include "can/can-decoder.hpp"
+#include "utils/openxc-utils.hpp"
extern "C"
{
@@ -74,7 +74,7 @@ void can_bus_t::can_decode_message()
while(is_decoding_)
{
std::unique_lock<std::mutex> can_message_lock(can_message_mutex_);
- new_can_message_.wait(can_message_lock);
+ new_can_message_cv_.wait(can_message_lock);
can_message = next_can_message();
/* First we have to found which CanSignal it is */
@@ -144,7 +144,7 @@ void can_bus_t::can_event_push()
*/
void can_bus_t::start_threads()
{
- v_ = true;
+ is_decoding_ = true;
th_decoding_ = std::thread(&can_bus_t::can_decode_message, this);
if(!th_decoding_.joinable())
is_decoding_ = false;
@@ -263,9 +263,9 @@ std::vector<std::string> can_bus_t::read_conf()
}
/**
-* @brief return new_can_message_ member
+* @brief return new_can_message_cv_ member
*
-* @return return new_can_message_ member
+* @return return new_can_message_cv_ member
*/
std::condition_variable& can_bus_t::get_new_can_message_cv()
{
@@ -518,7 +518,7 @@ void can_bus_dev_t::can_reader(can_bus_t& can_bus)
std::lock_guard<std::mutex> can_message_lock(can_bus.get_can_message_mutex());
can_bus.push_new_can_message(can_message);
}
- can_bus.get_new_can_message_cv_().notify_one();
+ can_bus.get_new_can_message_cv().notify_one();
}
}
diff --git a/src/can/can-bus.hpp b/src/can/can-bus.hpp
index bf0bdd31..0fa13b22 100644
--- a/src/can/can-bus.hpp
+++ b/src/can/can-bus.hpp
@@ -83,7 +83,7 @@ class can_bus_t {
can_message_t next_can_message();
void push_new_can_message(const can_message_t& can_msg);
std::mutex& get_can_message_mutex();
- std::condition_variable& get_new_can_message_cv_();
+ std::condition_variable& get_new_can_message_cv();
openxc_VehicleMessage next_vehicle_message();
void push_new_vehicle_message(const openxc_VehicleMessage& v_msg);
diff --git a/src/can/can-message.cpp b/src/can/can-message.cpp
index ad032021..71e48792 100644
--- a/src/can/can-message.cpp
+++ b/src/can/can-message.cpp
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-#include "can-message.hpp"
+#include "can/can-message.hpp"
#include <cstring>
diff --git a/src/can/can-signals.cpp b/src/can/can-signals.cpp
index 07689a01..64980b04 100644
--- a/src/can/can-signals.cpp
+++ b/src/can/can-signals.cpp
@@ -15,13 +15,13 @@
* limitations under the License.
*/
-#include "can-signals.hpp"
+#include "can/can-signals.hpp"
#include <fnmatch.h>
-#include "signals.hpp"
-#include "obd2-signals.hpp"
-#include "can-decoder.hpp"
+#include "utils/signals.hpp"
+#include "can/can-decoder.hpp"
+#include "obd2/obd2-signals.hpp"
#include "low-can-binding.hpp"
std::vector<std::vector<CanMessageDefinition>> CAN_MESSAGES = {