aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-07-28 02:30:14 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-08-23 17:40:31 +0200
commit01715613f16113017529c51703f3e5d90918c4c5 (patch)
tree3de8f88c0bccb63e3f26aa2ad307a36835f98cf9
parentefa12f0b8d6a8e55d3245f0bfef7a3176758d34c (diff)
Change-Id: I2e8d89b09982c9f3770a5a3e10d281e0ad87651c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--conf.d/cmake/config.cmake2
-rw-r--r--low-can-binding/binding/low-can-hat.hpp1
-rw-r--r--low-can-binding/diagnostic/active-diagnostic-request.cpp41
-rw-r--r--low-can-binding/diagnostic/active-diagnostic-request.hpp4
4 files changed, 2 insertions, 46 deletions
diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake
index e1445537..441321d1 100644
--- a/conf.d/cmake/config.cmake
+++ b/conf.d/cmake/config.cmake
@@ -119,6 +119,8 @@ set(CXX_COMPILE_OPTIONS -pthread CACHE STRING "Compilation flags for C++ languag
# -D_FORTIFY_SOURCE=2
# CACHE STRING "Compilation flags for RELEASE build type.")
+add_definitions(-DAFB_BINDING_VERSION=2)
+
# Optional location for config.xml.in
# -----------------------------------
#set(WIDGET_ICON "\"${CMAKE_SOURCE_DIR}conf.d/wgt/${PROJECT_ICON}\"" CACHE PATH "Path to the widget icon")
diff --git a/low-can-binding/binding/low-can-hat.hpp b/low-can-binding/binding/low-can-hat.hpp
index 5722666c..248b62ce 100644
--- a/low-can-binding/binding/low-can-hat.hpp
+++ b/low-can-binding/binding/low-can-hat.hpp
@@ -24,7 +24,6 @@
#include <memory>
#include <systemd/sd-event.h>
-#define AFB_BINDING_VERSION 2
#include <afb/afb-binding>
class low_can_subscription_t;
diff --git a/low-can-binding/diagnostic/active-diagnostic-request.cpp b/low-can-binding/diagnostic/active-diagnostic-request.cpp
index a242147a..44ad47b4 100644
--- a/low-can-binding/diagnostic/active-diagnostic-request.cpp
+++ b/low-can-binding/diagnostic/active-diagnostic-request.cpp
@@ -26,47 +26,6 @@
std::string active_diagnostic_request_t::prefix_ = "diagnostic_messages";
-bool active_diagnostic_request_t::operator==(const active_diagnostic_request_t& b)
-{
- return (bus_ == b.bus_ && id_ == b.id_ && handle_ == b.handle_);
-}
-
-active_diagnostic_request_t& active_diagnostic_request_t::operator=(const active_diagnostic_request_t& adr)
-{
- if (this != &adr)
- {
- bus_ = adr.bus_;
- id_ = adr.id_;
- handle_ = adr.handle_;
- name_ = adr.name_;
- decoder_ = adr.decoder_;
- callback_ = adr.callback_;
- recurring_ = adr.recurring_;
- permanent_ = adr.permanent_;
- wait_for_multiple_responses_ = adr.wait_for_multiple_responses_;
- frequency_clock_ = adr.frequency_clock_;
- timeout_clock_ = adr.timeout_clock_;
- socket_ = adr.socket_;
- }
-
- return *this;
-}
-
-active_diagnostic_request_t::active_diagnostic_request_t()
- : bus_{nullptr},
- id_{0},
- handle_{nullptr},
- name_{""},
- decoder_{nullptr},
- callback_{nullptr},
- recurring_{false},
- permanent_{false},
- wait_for_multiple_responses_{false},
- frequency_clock_{frequency_clock_t()},
- timeout_clock_{frequency_clock_t()},
- socket_{}
-{}
-
active_diagnostic_request_t::active_diagnostic_request_t(const std::string& bus, uint32_t id,
const std::string& name,
bool wait_for_multiple_responses,
diff --git a/low-can-binding/diagnostic/active-diagnostic-request.hpp b/low-can-binding/diagnostic/active-diagnostic-request.hpp
index 8e5333b5..e32792a1 100644
--- a/low-can-binding/diagnostic/active-diagnostic-request.hpp
+++ b/low-can-binding/diagnostic/active-diagnostic-request.hpp
@@ -86,10 +86,6 @@ private:
///< this request was sent.
utils::socketcan_bcm_t socket_; ///< socket_ - A BCM socket setup to send cyclic message to CAN ID 7DF.
public:
- bool operator==(const active_diagnostic_request_t& b);
- active_diagnostic_request_t& operator=(const active_diagnostic_request_t& adr);
-
- active_diagnostic_request_t();
active_diagnostic_request_t(active_diagnostic_request_t&&) = default;
active_diagnostic_request_t(const std::string& bus, uint32_t id,
const std::string& name, bool wait_for_multiple_responses,