From 44d7237fde80af222939445055a94a0e50e82935 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 18 Apr 2017 20:23:14 +0200 Subject: Use a system INI configuration file to get devices mapping Instead of specifying a JSON configuration file with CAN devices name, it uses a mapping configuration file that map a high level device names to a real low level names. File path is to be specified into the generated source code which is /etc/dev-mapping.conf for now. Configuration file uses INI file format and is parsed using inih library cpp wrapper. Change-Id: Ibde104e76cd78a6cc86f6eec4f66c274b7567d43 Signed-off-by: Romain Forlot --- CAN-binder/low-can-binding/configuration-generated.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'CAN-binder/low-can-binding/configuration-generated.cpp') diff --git a/CAN-binder/low-can-binding/configuration-generated.cpp b/CAN-binder/low-can-binding/configuration-generated.cpp index 2e965703..98227cb5 100644 --- a/CAN-binder/low-can-binding/configuration-generated.cpp +++ b/CAN-binder/low-can-binding/configuration-generated.cpp @@ -2,7 +2,8 @@ #include "can/can-decoder.hpp" configuration_t::configuration_t() - : can_message_set_{{0, "example", 0, 1, 5, 0, 20}} + : can_bus_manager_(utils::config_parser_t("/etc/dev-mapping.conf")) + , can_message_set_{{0, "example", 0, 1, 5, 0, 20}} , can_message_definition_ { { @@ -346,5 +347,3 @@ const std::string configuration_t::get_diagnostic_bus() const { return "can0"; } - - -- cgit 1.2.3-korg