aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-10 02:03:02 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:10:40 +0100
commitdd915dd5b0088034ce1fb57e187f114c1e1d769d (patch)
tree7bdacb75d414783bd9b357a968c15e1a0759248f /src
parent04f14d0017e94177c6afdf4f5b7df71f25fbc18e (diff)
Adding needed getter for diagnostic manager. Useful
to determine if both object use the same CAN bus device Change-Id: I97dbf807198a420c305c8fbbd2cb4bfcdda4c294 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r--src/can/can-bus-dev.cpp5
-rw-r--r--src/can/can-bus-dev.hpp2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/can/can-bus-dev.cpp b/src/can/can-bus-dev.cpp
index 3f3dc1c4..32a8906b 100644
--- a/src/can/can-bus-dev.cpp
+++ b/src/can/can-bus-dev.cpp
@@ -38,6 +38,11 @@ can_bus_dev_t::can_bus_dev_t(const std::string& dev_name)
{
}
+std::string can_bus_dev_t::get_device_name() const
+{
+ return device_name_;
+}
+
/// @brief Open the can socket and returning it
/// @return -1 if something wrong.
int can_bus_dev_t::open()
diff --git a/src/can/can-bus-dev.hpp b/src/can/can-bus-dev.hpp
index 3a1f5371..5907c587 100644
--- a/src/can/can-bus-dev.hpp
+++ b/src/can/can-bus-dev.hpp
@@ -48,6 +48,8 @@ private:
public:
can_bus_dev_t(const std::string& dev_name);
+ std::string get_device_name() const;
+
int open();
int close();