Include diagnostic_message_t into can_message_set.
[apps/agl-service-can-low-level.git] / CAN-binder / low-can-binding / binding / configuration-generated.cpp
index c3cecc5..a97b9ee 100644 (file)
 #include "configuration.hpp"
-#include "can/can-decoder.hpp"
+#include "../can/can-decoder.hpp"
 
 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,
-                               {
-                               },
-                               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,
+       , can_message_set_{
+               can_message_set_t{0, "example", {
+                       {std::make_shared<can_message_definition_t>(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.rearright.open",
-                               55,
-                               4,
-                               1.00000f, 
-                               0, 
-                               0,
-                               0,
-                               frequency_clock_t(0.00000f),
-                               false,
-                               false,
-                               {
-                               },
-                               false,
-                               decoder_t::booleanDecoder,
-                               nullptr,
-                               false
-                       }
-               }
-       }
-       , diagnostic_messages_
-       {
+                                       {std::make_shared<can_signal_t>(
+                                       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> (
+                               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> (
+                               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> (
+                               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> (
+                               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
+                               })} // end can_signals entry
+                               } // end can_signals vector
+                       })} // end can_message_definition entry
+               }, // end can_message_definition vector
                {
-                       {
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                4,
                                "engine.load",
                                0,
@@ -128,8 +111,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                5,
                                "engine.coolant.temperature",
                                0,
@@ -139,8 +122,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                10,
                                "fuel.pressure",
                                0,
@@ -150,8 +133,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                11,
                                "intake.manifold.pressure",
                                0,
@@ -161,8 +144,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                12,
                                "engine.speed",
                                0,
@@ -172,8 +155,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                13,
                                "vehicle.speed",
                                0,
@@ -183,8 +166,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                15,
                                "intake.air.temperature",
                                0,
@@ -194,8 +177,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                16,
                                "mass.airflow",
                                0,
@@ -205,8 +188,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                17,
                                "throttle.position",
                                0,
@@ -216,8 +199,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                31,
                                "running.time",
                                0,
@@ -227,8 +210,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                45,
                                "EGR.error",
                                0,
@@ -238,8 +221,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                47,
                                "fuel.level",
                                0,
@@ -249,8 +232,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                51,
                                "barometric.pressure",
                                0,
@@ -260,8 +243,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                76,
                                "commanded.throttle.position",
                                0,
@@ -271,8 +254,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                82,
                                "ethanol.fuel.percentage",
                                0,
@@ -282,8 +265,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                90,
                                "accelerator.pedal.position",
                                0,
@@ -293,8 +276,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                91,
                                "hybrid.battery-pack.remaining.life",
                                0,
@@ -304,8 +287,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                92,
                                "engine.oil.temperature",
                                0,
@@ -315,8 +298,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                94,
                                "engine.fuel.rate",
                                0,
@@ -326,8 +309,8 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       },
-                       {
+                       })},
+                       {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
                                99,
                                "engine.torque",
                                0,
@@ -337,9 +320,10 @@ configuration_t::configuration_t()
                                decoder_t::decode_obd2_response,
                                nullptr,
                                true
-                       }
-               }
-       }
+                       })}
+               } // end diagnostic_messages_ vector
+       }// end can_message_set entry
+       } // end can_message_set vector
 {}
 
 const std::string configuration_t::get_diagnostic_bus() const