From 452ab62dae573efc3a2d5a5d97c2f10fca5f502d Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 16 May 2017 15:14:42 +0200 Subject: Be able to return index or can bus name. Use a vector of string pair that map index on vector and pair map logical bus name with linux device name. Change-Id: I627e6f715f7466d835d8729e21d9e4198111c1fb Signed-off-by: Romain Forlot --- CAN-binder/low-can-binding/utils/config-parser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'CAN-binder/low-can-binding/utils/config-parser.cpp') diff --git a/CAN-binder/low-can-binding/utils/config-parser.cpp b/CAN-binder/low-can-binding/utils/config-parser.cpp index 9c81afb..6f69916 100644 --- a/CAN-binder/low-can-binding/utils/config-parser.cpp +++ b/CAN-binder/low-can-binding/utils/config-parser.cpp @@ -47,14 +47,14 @@ namespace utils /// have to test the returned value. /// /// @return A const vector with string of linux CAN devices. - const std::vector config_parser_t::get_devices_name() + const std::vector > config_parser_t::get_devices_name() { - std::vector devices_name; + std::vector > devices_name; std::map bus_mapping = config_content_.get_keys("CANbus-mapping"); for(const auto& busIt : bus_mapping ) { - devices_name.push_back(busIt.second); + devices_name.push_back(std::make_pair(busIt.first, busIt.second)); } return devices_name; -- cgit 1.2.3-korg