aboutsummaryrefslogtreecommitdiffstats
path: root/src/can/can-bus-dev.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-13 14:58:22 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:15:55 +0100
commitf0d7a6523955ee94a32ec4b62e2a207b23f62316 (patch)
tree1856801bfd7f2718689888ccc488643dc99e436a /src/can/can-bus-dev.cpp
parentb606db2b74d5c92d33a126071062c9eb2a548beb (diff)
Get decoding diagnostic request from decoding thread of can_bus_t
Decoding divided in 2 subfunctions dedicated to decode either pure CAN messages or diagnostic (obd2) message. About now, a diagnostic request has a name then it will be pushed on the event_queue as a SimpleMessage. Without name full details of diagnostic response will be pushed as diagnostic response. This behavior follows the one from OpenXC. Change-Id: I255f3f6487fa9511ea47c74606014995a7b0f720 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/can/can-bus-dev.cpp')
-rw-r--r--src/can/can-bus-dev.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/can/can-bus-dev.cpp b/src/can/can-bus-dev.cpp
index 5c8673c8..a574b42d 100644
--- a/src/can/can-bus-dev.cpp
+++ b/src/can/can-bus-dev.cpp
@@ -42,6 +42,11 @@ std::string can_bus_dev_t::get_device_name() const
return device_name_;
}
+uint32_t can_bus_dev_t::get_address() const
+{
+ return address_;
+}
+
/// @brief Open the can socket and returning it
/// @return -1 if something wrong.
int can_bus_dev_t::open()