1 #include "configuration.hpp"
2 #include "../can/can-decoder.hpp"
4 configuration_t::configuration_t()
5 :can_bus_manager_{utils::config_parser_t{"/etc/dev-mapping.conf"}}
7 can_message_set_t{0, "example", {
8 {std::make_shared<can_message_definition_t>(can_message_definition_t{"can0", 0x620, can_message_format_t::STANDARD, frequency_clock_t(0.00000f), true,
10 {std::make_shared<can_signal_t>(
19 frequency_clock_t(0.00000f),
24 decoder_t::booleanDecoder,
28 {std::make_shared<can_signal_t> (
37 frequency_clock_t(0.00000f),
42 decoder_t::booleanDecoder,
46 {std::make_shared<can_signal_t> (
48 "doors.passenger.open",
55 frequency_clock_t(0.00000f),
60 decoder_t::booleanDecoder,
64 {std::make_shared<can_signal_t> (
66 "doors.rearleft.open",
73 frequency_clock_t(0.00000f),
78 decoder_t::booleanDecoder,
82 {std::make_shared<can_signal_t> (
84 "doors.rearright.open",
91 frequency_clock_t(0.00000f),
96 decoder_t::booleanDecoder,
99 })} // end can_signals entry
100 } // end can_signals vector
101 })} // end can_message_definition entry
102 }, // end can_message_definition vector
104 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
111 decoder_t::decode_obd2_response,
115 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
117 "engine.coolant.temperature",
122 decoder_t::decode_obd2_response,
126 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
133 decoder_t::decode_obd2_response,
137 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
139 "intake.manifold.pressure",
144 decoder_t::decode_obd2_response,
148 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
155 decoder_t::decode_obd2_response,
159 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
166 decoder_t::decode_obd2_response,
170 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
172 "intake.air.temperature",
177 decoder_t::decode_obd2_response,
181 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
188 decoder_t::decode_obd2_response,
192 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
199 decoder_t::decode_obd2_response,
203 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
210 decoder_t::decode_obd2_response,
214 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
221 decoder_t::decode_obd2_response,
225 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
232 decoder_t::decode_obd2_response,
236 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
238 "barometric.pressure",
243 decoder_t::decode_obd2_response,
247 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
249 "commanded.throttle.position",
254 decoder_t::decode_obd2_response,
258 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
260 "ethanol.fuel.percentage",
265 decoder_t::decode_obd2_response,
269 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
271 "accelerator.pedal.position",
276 decoder_t::decode_obd2_response,
280 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
282 "hybrid.battery-pack.remaining.life",
287 decoder_t::decode_obd2_response,
291 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
293 "engine.oil.temperature",
298 decoder_t::decode_obd2_response,
302 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
309 decoder_t::decode_obd2_response,
313 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
320 decoder_t::decode_obd2_response,
324 } // end diagnostic_messages_ vector
325 }// end can_message_set entry
326 } // end can_message_set vector
329 const std::string configuration_t::get_diagnostic_bus() const