From d253ada94487232ccd33b68a69fd44ff7840fab7 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Wed, 10 May 2017 18:39:25 +0200 Subject: Use a tree instead of separated object lists. WIP Now we respect JSON description file, which is can_message_set contains can_message_definition which contains can_signals. Diagnostic messages aren't processed for now. Change-Id: I94aaf5eded14dd84395bd4fd749df58dee5f533e Signed-off-by: Romain Forlot --- .../binding/configuration-generated.cpp | 206 ++++++++++----------- 1 file changed, 96 insertions(+), 110 deletions(-) (limited to 'CAN-binder/low-can-binding/binding/configuration-generated.cpp') diff --git a/CAN-binder/low-can-binding/binding/configuration-generated.cpp b/CAN-binder/low-can-binding/binding/configuration-generated.cpp index c96a103a..3ab911a9 100644 --- a/CAN-binder/low-can-binding/binding/configuration-generated.cpp +++ b/CAN-binder/low-can-binding/binding/configuration-generated.cpp @@ -3,117 +3,103 @@ configuration_t::configuration_t() :can_bus_manager_{utils::config_parser_t{"/etc/dev-mapping.conf"}} - , can_message_set_{{0, "example", 0, 1, 5, 0, 20}} - , can_message_definition_ - { - { - can_message_definition_t{0, "can0", 0x620, can_message_format_t::STANDARD, frequency_clock_t(0.00000f), true} - } - } - , can_signals_ - { - { - { - 0, - 0, - "doors.coffer.open", - 56, - 1, - 1.00000f, - 0, - 0, - 0, - frequency_clock_t(0.00000f), - false, - false, - { - }, - false, - decoder_t::booleanDecoder, - nullptr, - false - }, - { - 0, - 0, - "doors.driver.open", - 46, - 1, - 1.00000f, - 0, - 0, - 0, - frequency_clock_t(0.00000f), - false, - false, + , can_message_set_{ + can_message_set_t{0, "example", 0, 1, 5, 0, 20, { + {std::make_shared(can_message_definition_t{"can0", 0x620, can_message_format_t::STANDARD, frequency_clock_t(0.00000f), true, { - }, - false, - decoder_t::booleanDecoder, - nullptr, - false - }, - { - 0, - 0, - "doors.passenger.open", - 47, - 1, - 1.00000f, - 0, - 0, - 0, - frequency_clock_t(0.00000f), - false, - false, - { - }, - false, - decoder_t::booleanDecoder, - nullptr, - false - }, - { - 0, - 0, - "doors.rearleft.open", - 54, - 1, - 1.00000f, - 0, - 0, - 0, - frequency_clock_t(0.00000f), - false, - false, - { - }, - false, - decoder_t::booleanDecoder, - nullptr, - false - }, - { - 0, - 0, - "doors.rearright.open", - 55, - 4, - 1.00000f, - 0, - 0, - 0, - frequency_clock_t(0.00000f), - false, - false, - { - }, - false, - decoder_t::booleanDecoder, - nullptr, - false - } - } + {std::make_shared( + can_signal_t{ + "doors.coffer.open", + 56, + 1, + 1.00000f, + 0, + 0, + 0, + frequency_clock_t(0.00000f), + false, + false, + {}, + false, + decoder_t::booleanDecoder, + nullptr, + false + })}, + {std::make_shared ( + can_signal_t{ + "doors.driver.open", + 46, + 1, + 1.00000f, + 0, + 0, + 0, + frequency_clock_t(0.00000f), + false, + false, + {}, + false, + decoder_t::booleanDecoder, + nullptr, + false + })}, + {std::make_shared ( + can_signal_t{ + "doors.passenger.open", + 47, + 1, + 1.00000f, + 0, + 0, + 0, + frequency_clock_t(0.00000f), + false, + false, + {}, + false, + decoder_t::booleanDecoder, + nullptr, + false + })}, + {std::make_shared ( + can_signal_t{ + "doors.rearleft.open", + 54, + 1, + 1.00000f, + 0, + 0, + 0, + frequency_clock_t(0.00000f), + false, + false, + {}, + false, + decoder_t::booleanDecoder, + nullptr, + false + })}, + {std::make_shared ( + can_signal_t{ + "doors.rearright.open", + 55, + 4, + 1.00000f, + 0, + 0, + 0, + frequency_clock_t(0.00000f), + false, + false, + {}, + false, + decoder_t::booleanDecoder, + nullptr, + false + })} + } + })} + }} } , diagnostic_messages_ { -- cgit 1.2.3-korg