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,
104 , diagnostic_messages_
107 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
114 decoder_t::decode_obd2_response,
118 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
120 "engine.coolant.temperature",
125 decoder_t::decode_obd2_response,
129 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
136 decoder_t::decode_obd2_response,
140 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
142 "intake.manifold.pressure",
147 decoder_t::decode_obd2_response,
151 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
158 decoder_t::decode_obd2_response,
162 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
169 decoder_t::decode_obd2_response,
173 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
175 "intake.air.temperature",
180 decoder_t::decode_obd2_response,
184 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
191 decoder_t::decode_obd2_response,
195 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
202 decoder_t::decode_obd2_response,
206 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
213 decoder_t::decode_obd2_response,
217 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
224 decoder_t::decode_obd2_response,
228 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
235 decoder_t::decode_obd2_response,
239 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
241 "barometric.pressure",
246 decoder_t::decode_obd2_response,
250 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
252 "commanded.throttle.position",
257 decoder_t::decode_obd2_response,
261 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
263 "ethanol.fuel.percentage",
268 decoder_t::decode_obd2_response,
272 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
274 "accelerator.pedal.position",
279 decoder_t::decode_obd2_response,
283 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
285 "hybrid.battery-pack.remaining.life",
290 decoder_t::decode_obd2_response,
294 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
296 "engine.oil.temperature",
301 decoder_t::decode_obd2_response,
305 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
312 decoder_t::decode_obd2_response,
316 {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
323 decoder_t::decode_obd2_response,
331 const std::string configuration_t::get_diagnostic_bus() const