aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-02 23:23:55 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-02 23:23:55 +0100
commitd572196852895f42e90b79b4ba5346b5d8c48f87 (patch)
tree126ff0fd5234a3dc58b66512daecd8f0b75f9b20 /src
parent87e9e640972e2833490b56c0a87897c7529b0f87 (diff)
Clean up uneeded members and functions
Change-Id: Idc9ebe9cfc6e348c378c1489971600b8f125e6e1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r--src/can-bus.cpp8
-rw-r--r--src/can-bus.hpp4
2 files changed, 0 insertions, 12 deletions
diff --git a/src/can-bus.cpp b/src/can-bus.cpp
index a3dd2d4d..76f6e45b 100644
--- a/src/can-bus.cpp
+++ b/src/can-bus.cpp
@@ -245,7 +245,6 @@ can_message_t can_bus_t::next_can_message()
return can_msg;
}
- has_can_message_ = false;
return can_msg;
}
@@ -254,11 +253,6 @@ void can_bus_t::push_new_can_message(const can_message_t& can_msg)
can_message_q_.push(can_msg);
}
-bool can_bus_t::has_can_message()
-{
- return has_can_message_;
-}
-
openxc_VehicleMessage can_bus_t::next_vehicle_message()
{
openxc_VehicleMessage v_msg;
@@ -271,14 +265,12 @@ openxc_VehicleMessage can_bus_t::next_vehicle_message()
return v_msg;
}
- has_vehicle_message_ = false;
return v_msg;
}
void can_bus_t::push_new_vehicle_message(const openxc_VehicleMessage& v_msg)
{
vehicle_message_q_.push(v_msg);
- has_vehicle_message_ = true;
}
std::map<std::string, std::shared_ptr<can_bus_dev_t>> can_bus_t::get_can_devices()
diff --git a/src/can-bus.hpp b/src/can-bus.hpp
index 41d3f36a..f7cb3121 100644
--- a/src/can-bus.hpp
+++ b/src/can-bus.hpp
@@ -75,12 +75,10 @@ class can_bus_t {
std::condition_variable new_can_message_; /*!< condition_variable use to wait until there is a new CAN message to read*/
std::mutex can_message_mutex_; /*!< mutex protecting the can_message_q_ queue.*/
- bool has_can_message_; /*!< boolean members that control whether or not there is can_message into the queue */
std::queue <can_message_t> can_message_q_; /*!< queue that'll store can_message_t to decoded */
std::condition_variable new_decoded_can_message_; /*!< condition_variable use to wait until there is a new vehicle message to read from the queue vehicle_message_q_*/
std::mutex decoded_can_message_mutex_; /*!< mutex protecting the vehicle_message_q_ queue.*/
- bool has_vehicle_message_; /*!< boolean members that control whether or not there is openxc_VehicleMessage into the queue */
std::queue <openxc_VehicleMessage> vehicle_message_q_; /*!< queue that'll store openxc_VehicleMessage to pushed */
std::map<std::string, std::shared_ptr<can_bus_dev_t>> can_devices_m_; /*!< Can device map containing all can_bus_dev_t objects initialized during init_can_dev function*/
@@ -169,8 +167,6 @@ class can_bus_t {
*/
std::condition_variable& get_new_can_message();
- bool has_can_message();
-
/**
* @brief Return first openxc_VehicleMessage on the queue
*