aboutsummaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/configuration-generated.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-04-18 20:23:14 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-04-18 20:23:14 +0200
commit44d7237fde80af222939445055a94a0e50e82935 (patch)
treea65cd2e82fc70ddeed4fbf3b2cd05c4b025c8f90 /CAN-binder/low-can-binding/configuration-generated.cpp
parent3642f8f2545f22f2e574bbd820e67229516e9149 (diff)
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 <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/configuration-generated.cpp')
-rw-r--r--CAN-binder/low-can-binding/configuration-generated.cpp5
1 files changed, 2 insertions, 3 deletions
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";
}
-
-