Include diagnostic_message_t into can_message_set.
[apps/agl-service-can-low-level.git] / CAN-binder / low-can-binding / binding / configuration-generated.cpp
1 #include "configuration.hpp"
2 #include "../can/can-decoder.hpp"
3
4 configuration_t::configuration_t()
5         :can_bus_manager_{utils::config_parser_t{"/etc/dev-mapping.conf"}}
6         , can_message_set_{
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,
9                                 {
10                                         {std::make_shared<can_signal_t>(
11                                         can_signal_t{
12                                                 "doors.coffer.open",
13                                                 56,
14                                                 1,
15                                                 1.00000f,
16                                                 0, 
17                                                 0,
18                                                 0,
19                                                 frequency_clock_t(0.00000f),
20                                                 false,
21                                                 false,
22                                                 {},
23                                                 false,
24                                                 decoder_t::booleanDecoder,
25                                                 nullptr,
26                                                 false
27                                         })},
28                                 {std::make_shared<can_signal_t> (
29                                 can_signal_t{
30                                         "doors.driver.open",
31                                         46,
32                                         1,
33                                         1.00000f,
34                                         0, 
35                                         0,
36                                         0,
37                                         frequency_clock_t(0.00000f),
38                                         false,
39                                         false,
40                                         {},
41                                         false,
42                                         decoder_t::booleanDecoder,
43                                         nullptr,
44                                         false
45                                 })},
46                                 {std::make_shared<can_signal_t> (
47                                 can_signal_t{
48                                         "doors.passenger.open",
49                                         47,
50                                         1,
51                                         1.00000f,
52                                         0, 
53                                         0,
54                                         0,
55                                         frequency_clock_t(0.00000f),
56                                         false,
57                                         false,
58                                         {},
59                                         false,
60                                         decoder_t::booleanDecoder,
61                                         nullptr,
62                                         false
63                                 })},
64                                 {std::make_shared<can_signal_t> (
65                                 can_signal_t{
66                                         "doors.rearleft.open",
67                                         54,
68                                         1,
69                                         1.00000f, 
70                                         0, 
71                                         0,
72                                         0,
73                                         frequency_clock_t(0.00000f),
74                                         false,
75                                         false,
76                                         {},
77                                         false,
78                                         decoder_t::booleanDecoder,
79                                         nullptr,
80                                         false
81                                 })},
82                                 {std::make_shared<can_signal_t> (
83                                 can_signal_t{
84                                         "doors.rearright.open",
85                                         55,
86                                         4,
87                                         1.00000f, 
88                                         0, 
89                                         0,
90                                         0,
91                                         frequency_clock_t(0.00000f),
92                                         false,
93                                         false,
94                                         {},
95                                         false,
96                                         decoder_t::booleanDecoder,
97                                         nullptr,
98                                         false
99                                 })} // end can_signals entry
100                                 } // end can_signals vector
101                         })} // end can_message_definition entry
102                 }, // end can_message_definition vector
103                 {
104                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
105                                 4,
106                                 "engine.load",
107                                 0,
108                                 0,
109                                 UNIT::INVALID,
110                                 5.00000f,
111                                 decoder_t::decode_obd2_response,
112                                 nullptr,
113                                 true
114                         })},
115                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
116                                 5,
117                                 "engine.coolant.temperature",
118                                 0,
119                                 0,
120                                 UNIT::INVALID,
121                                 1.00000f,
122                                 decoder_t::decode_obd2_response,
123                                 nullptr,
124                                 true
125                         })},
126                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
127                                 10,
128                                 "fuel.pressure",
129                                 0,
130                                 0,
131                                 UNIT::INVALID,
132                                 1.00000f,
133                                 decoder_t::decode_obd2_response,
134                                 nullptr,
135                                 true
136                         })},
137                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
138                                 11,
139                                 "intake.manifold.pressure",
140                                 0,
141                                 0,
142                                 UNIT::INVALID,
143                                 1.00000f,
144                                 decoder_t::decode_obd2_response,
145                                 nullptr,
146                                 true
147                         })},
148                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
149                                 12,
150                                 "engine.speed",
151                                 0,
152                                 0,
153                                 UNIT::INVALID,
154                                 5.00000f,
155                                 decoder_t::decode_obd2_response,
156                                 nullptr,
157                                 true
158                         })},
159                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
160                                 13,
161                                 "vehicle.speed",
162                                 0,
163                                 0,
164                                 UNIT::INVALID,
165                                 5.00000f,
166                                 decoder_t::decode_obd2_response,
167                                 nullptr,
168                                 true
169                         })},
170                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
171                                 15,
172                                 "intake.air.temperature",
173                                 0,
174                                 0,
175                                 UNIT::INVALID,
176                                 1.00000f,
177                                 decoder_t::decode_obd2_response,
178                                 nullptr,
179                                 true
180                         })},
181                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
182                                 16,
183                                 "mass.airflow",
184                                 0,
185                                 0,
186                                 UNIT::INVALID,
187                                 5.00000f,
188                                 decoder_t::decode_obd2_response,
189                                 nullptr,
190                                 true
191                         })},
192                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
193                                 17,
194                                 "throttle.position",
195                                 0,
196                                 0,
197                                 UNIT::INVALID,
198                                 5.00000f,
199                                 decoder_t::decode_obd2_response,
200                                 nullptr,
201                                 true
202                         })},
203                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
204                                 31,
205                                 "running.time",
206                                 0,
207                                 0,
208                                 UNIT::INVALID,
209                                 1.00000f,
210                                 decoder_t::decode_obd2_response,
211                                 nullptr,
212                                 true
213                         })},
214                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
215                                 45,
216                                 "EGR.error",
217                                 0,
218                                 0,
219                                 UNIT::INVALID,
220                                 0.00000f,
221                                 decoder_t::decode_obd2_response,
222                                 nullptr,
223                                 true
224                         })},
225                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
226                                 47,
227                                 "fuel.level",
228                                 0,
229                                 0,
230                                 UNIT::INVALID,
231                                 1.00000f,
232                                 decoder_t::decode_obd2_response,
233                                 nullptr,
234                                 true
235                         })},
236                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
237                                 51,
238                                 "barometric.pressure",
239                                 0,
240                                 0,
241                                 UNIT::INVALID,
242                                 1.00000f,
243                                 decoder_t::decode_obd2_response,
244                                 nullptr,
245                                 true
246                         })},
247                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
248                                 76,
249                                 "commanded.throttle.position",
250                                 0,
251                                 0,
252                                 UNIT::INVALID,
253                                 1.00000f,
254                                 decoder_t::decode_obd2_response,
255                                 nullptr,
256                                 true
257                         })},
258                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
259                                 82,
260                                 "ethanol.fuel.percentage",
261                                 0,
262                                 0,
263                                 UNIT::INVALID,
264                                 1.00000f,
265                                 decoder_t::decode_obd2_response,
266                                 nullptr,
267                                 true
268                         })},
269                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
270                                 90,
271                                 "accelerator.pedal.position",
272                                 0,
273                                 0,
274                                 UNIT::INVALID,
275                                 5.00000f,
276                                 decoder_t::decode_obd2_response,
277                                 nullptr,
278                                 true
279                         })},
280                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
281                                 91,
282                                 "hybrid.battery-pack.remaining.life",
283                                 0,
284                                 0,
285                                 UNIT::INVALID,
286                                 5.00000f,
287                                 decoder_t::decode_obd2_response,
288                                 nullptr,
289                                 true
290                         })},
291                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
292                                 92,
293                                 "engine.oil.temperature",
294                                 0,
295                                 0,
296                                 UNIT::INVALID,
297                                 1.00000f,
298                                 decoder_t::decode_obd2_response,
299                                 nullptr,
300                                 true
301                         })},
302                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
303                                 94,
304                                 "engine.fuel.rate",
305                                 0,
306                                 0,
307                                 UNIT::INVALID,
308                                 1.00000f,
309                                 decoder_t::decode_obd2_response,
310                                 nullptr,
311                                 true
312                         })},
313                         {std::make_shared<diagnostic_message_t>(diagnostic_message_t{
314                                 99,
315                                 "engine.torque",
316                                 0,
317                                 0,
318                                 UNIT::INVALID,
319                                 1.00000f,
320                                 decoder_t::decode_obd2_response,
321                                 nullptr,
322                                 true
323                         })}
324                 } // end diagnostic_messages_ vector
325         }// end can_message_set entry
326         } // end can_message_set vector
327 {}
328
329 const std::string configuration_t::get_diagnostic_bus() const
330 {
331         return "can0";
332 }