Apollo 10.0
自动驾驶开放平台
status_310.cc
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2019 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
18
19#include "glog/logging.h"
20
23
24namespace apollo {
25namespace canbus {
26namespace wey {
27
28using ::apollo::drivers::canbus::Byte;
29
31const int32_t Status310::ID = 0x310;
32
33void Status310::Parse(const std::uint8_t* bytes, int32_t length,
34 Wey* chassis) const {
35 chassis->mutable_status_310()->set_longitudeaccvalid(
36 longitudeaccvalid(bytes, length));
37 chassis->mutable_status_310()->set_lateralaccevalid(
38 lateralaccevalid(bytes, length));
39 chassis->mutable_status_310()->set_vehdynyawratevalid(
40 vehdynyawratevalid(bytes, length));
41 chassis->mutable_status_310()->set_flwheelspdvalid(
42 flwheelspdvalid(bytes, length));
43 chassis->mutable_status_310()->set_frwheelspdvalid(
44 frwheelspdvalid(bytes, length));
45 chassis->mutable_status_310()->set_rlwheelspdvalid(
46 rlwheelspdvalid(bytes, length));
47 chassis->mutable_status_310()->set_rrwheelspdvalid(
48 rrwheelspdvalid(bytes, length));
49 chassis->mutable_status_310()->set_vehiclespdvalid(
50 vehiclespdvalid(bytes, length));
51 chassis->mutable_status_310()->set_longitudedrivingmode(
52 longitudedrivingmode(bytes, length));
53 chassis->mutable_status_310()->set_engspdvalid(
54 engspdvalid(bytes, length));
55 chassis->mutable_status_310()->set_accepedaloverride(
56 accepedaloverride(bytes, length));
57 chassis->mutable_status_310()->set_brakepedalstatus(
58 brakepedalstatus(bytes, length));
59 chassis->mutable_status_310()->set_espbrakelightsts(
60 espbrakelightsts(bytes, length));
61 chassis->mutable_status_310()->set_epbswtpositionvalid(
62 epbswtpositionvalid(bytes, length));
63 chassis->mutable_status_310()->set_epbsts(
64 epbsts(bytes, length));
65 chassis->mutable_status_310()->set_currentgearvalid(
66 currentgearvalid(bytes, length));
67 chassis->mutable_status_310()->set_epstrqsnsrsts(
68 epstrqsnsrsts(bytes, length));
69 chassis->mutable_status_310()->set_eps_interferdetdvalid(
70 eps_interferdetdvalid(bytes, length));
71 chassis->mutable_status_310()->set_epshandsdetnsts(
72 epshandsdetnsts(bytes, length));
73 chassis->mutable_status_310()->set_eps_handsdetnstsvalid(
74 eps_handsdetnstsvalid(bytes, length));
75 chassis->mutable_status_310()->set_steerwheelanglesign(
76 steerwheelanglesign(bytes, length));
77 chassis->mutable_status_310()->set_steerwheelspdsign(
78 steerwheelspdsign(bytes, length));
79 chassis->mutable_status_310()->set_driverdoorsts(
80 driverdoorsts(bytes, length));
81 chassis->mutable_status_310()->set_rldoorsts(
82 rldoorsts(bytes, length));
83 chassis->mutable_status_310()->set_passengerdoorsts(
84 passengerdoorsts(bytes, length));
85 chassis->mutable_status_310()->set_rrdoorsts(
86 rrdoorsts(bytes, length));
87 chassis->mutable_status_310()->set_frontfoglmpsts(
88 frontfoglmpsts(bytes, length));
89 chassis->mutable_status_310()->set_rearfoglmpsts(
90 rearfoglmpsts(bytes, length));
91 chassis->mutable_status_310()->set_lowbeamsts(
92 lowbeamsts(bytes, length));
93 chassis->mutable_status_310()->set_highbeamsts(
94 highbeamsts(bytes, length));
95 chassis->mutable_status_310()->set_leftturnlampsts(
96 leftturnlampsts(bytes, length));
97 chassis->mutable_status_310()->set_rightturnlampsts(
98 rightturnlampsts(bytes, length));
99 chassis->mutable_status_310()->set_bcm_availsts(
100 bcm_availsts(bytes, length));
101 chassis->mutable_status_310()->set_brakelmpsts(
102 brakelmpsts(bytes, length));
103}
104
105// config detail: {'description': 'Longitude acceleration valid', 'enum':
106// {0: 'LONGITUDEACCVALID_INVALID', 1: 'LONGITUDEACCVALID_VALID'},
107// 'precision': 1.0, 'len': 1, 'name': 'longitudeaccvalid', 'is_signed_var':
108// False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 15, 'type': 'enum',
109// 'order': 'motorola', 'physical_unit': ''}
110Status_310::LongitudeaccvalidType Status310::longitudeaccvalid(
111 const std::uint8_t* bytes, int32_t length) const {
112 Byte t0(bytes + 1);
113 int32_t x = t0.get_byte(7, 1);
114
116 static_cast<Status_310::LongitudeaccvalidType>(x);
117 return ret;
118}
119
120// config detail: {'description': 'Indicates Lateral Signal State',
121// 'enum': {0: 'LATERALACCEVALID_INVALID', 1: 'LATERALACCEVALID_VALID'},
122// 'precision': 1.0, 'len': 1,'name':'lateralaccevalid','is_signed_var': False,
123// 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 7, 'type': 'enum',
124// 'order': 'motorola', 'physical_unit': ''}
125Status_310::LateralaccevalidType Status310::lateralaccevalid(
126 const std::uint8_t* bytes, int32_t length) const {
127 Byte t0(bytes + 0);
128 int32_t x = t0.get_byte(7, 1);
129
131 static_cast<Status_310::LateralaccevalidType>(x);
132 return ret;
133}
134
135// config detail: {'description': 'Vehicle yaw rate valid', 'enum':
136// {0: 'VEHDYNYAWRATEVALID_INVALID', 1: 'VEHDYNYAWRATEVALID_VALID'},
137// 'precision': 1.0, 'len': 1, 'name': 'vehdynyawratevalid', 'is_signed_var':
138// False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 6, 'type': 'enum',
139// 'order': 'motorola', 'physical_unit': ''}
140Status_310::VehdynyawratevalidType Status310::vehdynyawratevalid(
141 const std::uint8_t* bytes, int32_t length) const {
142 Byte t0(bytes + 0);
143 int32_t x = t0.get_byte(6, 1);
144
147 return ret;
148}
149
150// config detail: {'description': 'Front right wheel speed valid',
151// 'enum': {0: 'FLWHEELSPDVALID_INVALID', 1: 'FLWHEELSPDVALID_VALID'},
152// 'precision': 1.0, 'len': 1, 'name': 'flwheelspdvalid','is_signed_var':False,
153// 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 5, 'type': 'enum',
154// 'order': 'motorola', 'physical_unit': ''}
155Status_310::FlwheelspdvalidType Status310::flwheelspdvalid(
156 const std::uint8_t* bytes, int32_t length) const {
157 Byte t0(bytes + 0);
158 int32_t x = t0.get_byte(5, 1);
159
161 static_cast<Status_310::FlwheelspdvalidType>(x);
162 return ret;
163}
164
165// config detail: {'description': 'Front right wheel speed valid',
166// 'enum': {0: 'FRWHEELSPDVALID_INVALID', 1: 'FRWHEELSPDVALID_VALID'},
167// 'precision': 1.0, 'len': 1, 'name':'frwheelspdvalid','is_signed_var': False,
168// 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 53, 'type': 'enum',
169// 'order': 'motorola', 'physical_unit': ''}
170Status_310::FrwheelspdvalidType Status310::frwheelspdvalid(
171 const std::uint8_t* bytes, int32_t length) const {
172 Byte t0(bytes + 6);
173 int32_t x = t0.get_byte(5, 1);
174
176 static_cast<Status_310::FrwheelspdvalidType>(x);
177 return ret;
178}
179
180// config detail: {'description': 'Rear left wheel speed valid', 'enum':
181// {0: 'RLWHEELSPDVALID_INVALID', 1: 'RLWHEELSPDVALID_VALID'},'precision': 1.0,
182// 'len': 1, 'name': 'rlwheelspdvalid', 'is_signed_var': False, 'offset': 0.0,
183// 'physical_range': '[0|1]', 'bit': 3, 'type': 'enum', 'order': 'motorola',
184// 'physical_unit': ''}
185Status_310::RlwheelspdvalidType Status310::rlwheelspdvalid(
186 const std::uint8_t* bytes, int32_t length) const {
187 Byte t0(bytes + 0);
188 int32_t x = t0.get_byte(3, 1);
189
191 static_cast<Status_310::RlwheelspdvalidType>(x);
192 return ret;
193}
194
195// config detail: {'description': 'Rear right wheel speed valid', 'enum':
196// {0: 'RRWHEELSPDVALID_INVALID', 1: 'RRWHEELSPDVALID_VALID'},'precision': 1.0,
197// 'len': 1, 'name': 'rrwheelspdvalid', 'is_signed_var': False, 'offset': 0.0,
198// 'physical_range': '[0|1]', 'bit': 2, 'type': 'enum', 'order': 'motorola',
199// 'physical_unit': ''}
200Status_310::RrwheelspdvalidType Status310::rrwheelspdvalid(
201 const std::uint8_t* bytes, int32_t length) const {
202 Byte t0(bytes + 0);
203 int32_t x = t0.get_byte(2, 1);
204
206 static_cast<Status_310::RrwheelspdvalidType>(x);
207 return ret;
208}
209
210// config detail: {'description': 'Quality/fault information to current Vehicle
211// speed information', 'enum': {0: 'VEHICLESPDVALID_INVALID',
212// 1: 'VEHICLESPDVALID_VALID'}, 'precision': 1.0, 'len': 1, 'name':
213// 'vehiclespdvalid', 'is_signed_var': False, 'offset': 0.0, 'physical_range':
214// '[0|1]', 'bit': 0, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
215Status_310::VehiclespdvalidType Status310::vehiclespdvalid(
216 const std::uint8_t* bytes, int32_t length) const {
217 Byte t0(bytes + 0);
218 int32_t x = t0.get_byte(0, 1);
219
221 static_cast<Status_310::VehiclespdvalidType>(x);
222 return ret;
223}
224
225// config detail: {'description': 'This signal indicates if ECM control for ADS
226// torque request is active or not.', 'enum':
227// {0: 'LONGITUDEDRIVINGMODE_MANUALMODE',
228// 1: 'LONGITUDEDRIVINGMODE_AUTOMATICSTANDBY',
229// 2: 'LONGITUDEDRIVINGMODE_AUTOMATICACCELERATION',
230// 3: 'LONGITUDEDRIVINGMODE_AUTOMATICDECELERATION'}, 'precision': 1.0,'len': 2,
231// 'name': 'longitudedrivingmode', 'is_signed_var': False, 'offset': 0.0,
232// 'physical_range': '[0|3]', 'bit': 14, 'type': 'enum', 'order': 'motorola',
233// 'physical_unit': ''}
234Status_310::LongitudedrivingmodeType Status310::longitudedrivingmode(
235 const std::uint8_t* bytes, int32_t length) const {
236 Byte t0(bytes + 1);
237 int32_t x = t0.get_byte(5, 2);
238
241 return ret;
242}
243
244// config detail: {'description': 'Engine speed valid', 'enum':
245// {0: 'ENGSPDVALID_INVALID',1: 'ENGSPDVALID_VALID',2:'ENGSPDVALID_INIT_VALUE',
246// 3: 'ENGSPDVALID_RESERVED'},'precision': 1.0,'len': 2, 'name': 'engspdvalid',
247// 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|2]', 'bit': 12,
248// 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
249Status_310::EngspdvalidType Status310::engspdvalid(const std::uint8_t* bytes,
250 int32_t length) const {
251 Byte t0(bytes + 1);
252 int32_t x = t0.get_byte(3, 2);
253
255 return ret;
256}
257
258// config detail: {'description': 'Detect Acceleration Pedal Override', 'enum':
259// {0: 'ACCEPEDALOVERRIDE_NOT_OVERRIDE', 1: 'ACCEPEDALOVERRIDE_OVERRIDE'},
260// 'precision': 1.0, 'len': 1, 'name': 'accepedaloverride', 'is_signed_var':
261// False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 19, 'type': 'enum',
262// 'order': 'motorola', 'physical_unit': ''}
263Status_310::AccepedaloverrideType Status310::accepedaloverride(
264 const std::uint8_t* bytes, int32_t length) const {
265 Byte t0(bytes + 2);
266 int32_t x = t0.get_byte(3, 1);
267
269 static_cast<Status_310::AccepedaloverrideType>(x);
270 return ret;
271}
272
273// config detail: {'description': 'indicates the brake pedal is pressed or not
274// or incorrect for plausibility check.', 'enum':
275// {0: 'BRAKEPEDALSTATUS_NOT_PRESSED', 1: 'BRAKEPEDALSTATUS_PRESSED',
276// 2: 'BRAKEPEDALSTATUS_RESERVED1', 3: 'BRAKEPEDALSTATUS_ERROR'},
277// 'precision': 1.0, 'len': 2, 'name': 'brakepedalstatus',
278// 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|3]',
279// 'bit': 9, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
280Status_310::BrakepedalstatusType Status310::brakepedalstatus(
281 const std::uint8_t* bytes, int32_t length) const {
282 Byte t0(bytes + 1);
283 int32_t x = t0.get_byte(0, 2);
284
286 static_cast<Status_310::BrakepedalstatusType>(x);
287 return ret;
288}
289
290// config detail: {'description': 'Brake light lamp(on/off),come from ESP',
291// 'enum': {0: 'ESPBRAKELIGHTSTS_OFF', 1: 'ESPBRAKELIGHTSTS_ON'},
292// 'precision': 1.0, 'len': 1, 'name': 'espbrakelightsts', 'is_signed_var':
293// False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 29, 'type': 'enum',
294// 'order': 'motorola', 'physical_unit': ''}
295Status_310::EspbrakelightstsType Status310::espbrakelightsts(
296 const std::uint8_t* bytes, int32_t length) const {
297 Byte t0(bytes + 3);
298 int32_t x = t0.get_byte(5, 1);
299
301 static_cast<Status_310::EspbrakelightstsType>(x);
302 return ret;
303}
304
305// config detail: {'description': 'EPB switch position signal valid', 'enum':
306// {0: 'EPBSWTPOSITIONVALID_VALID', 1: 'EPBSWTPOSITIONVALID_NOT_VALID'},
307// 'precision': 1.0, 'len': 1, 'name': 'epbswtpositionvalid',
308// 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]',
309// 'bit': 20, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
310Status_310::EpbswtpositionvalidType Status310::epbswtpositionvalid(
311 const std::uint8_t* bytes, int32_t length) const {
312 Byte t0(bytes + 2);
313 int32_t x = t0.get_byte(4, 1);
314
317 return ret;
318}
319
320// config detail: {'description': 'EPB status', 'enum': {0: 'EPBSTS_RELEASED',
321// 1: 'EPBSTS_CLOSED', 2: 'EPBSTS_IN_PROGRESS', 3: 'EPBSTS_UNKNOWN'},
322// 'precision': 1.0, 'len': 2, 'name': 'epbsts', 'is_signed_var': False,
323// 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 18, 'type': 'enum',
324// 'order': 'motorola', 'physical_unit': ''}
325Status_310::EpbstsType Status310::epbsts(const std::uint8_t* bytes,
326 int32_t length) const {
327 Byte t0(bytes + 2);
328 int32_t x = t0.get_byte(1, 2);
329
331 return ret;
332}
333
334// config detail: {'description': 'Current gear valid', 'enum':
335// {0: 'CURRENTGEARVALID_INVALID', 1: 'CURRENTGEARVALID_VALID'},
336// 'precision': 1.0, 'len': 1, 'name': 'currentgearvalid', 'is_signed_var':
337// False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 25, 'type':
338// 'enum', 'order': 'motorola', 'physical_unit': ''}
339Status_310::CurrentgearvalidType Status310::currentgearvalid(
340 const std::uint8_t* bytes, int32_t length) const {
341 Byte t0(bytes + 3);
342 int32_t x = t0.get_byte(1, 1);
343
345 static_cast<Status_310::CurrentgearvalidType>(x);
346 return ret;
347}
348
349// config detail: {'description': 'EPS torque sensor status', 'enum':
350// {0: 'EPSTRQSNSRSTS_NORMAL', 1: 'EPSTRQSNSRSTS_ABNORMAL'}, 'precision': 1.0,
351// 'len': 1, 'name': 'epstrqsnsrsts', 'is_signed_var': False, 'offset': 0.0,
352// 'physical_range': '[0|1]', 'bit': 31, 'type': 'enum', 'order': 'motorola',
353// 'physical_unit': ''}
354Status_310::EpstrqsnsrstsType Status310::epstrqsnsrsts(
355 const std::uint8_t* bytes, int32_t length) const {
356 Byte t0(bytes + 3);
357 int32_t x = t0.get_byte(7, 1);
358
360 static_cast<Status_310::EpstrqsnsrstsType>(x);
361 return ret;
362}
363
364// config detail: {'description': 'Driver Steering Interference Detected
365// Validity', 'enum': {0: 'EPS_INTERFERDETDVALID_INVALID',
366// 1: 'EPS_INTERFERDETDVALID_VALID'}, 'precision': 1.0, 'len': 1,
367// 'name': 'eps_interferdetdvalid', 'is_signed_var': False, 'offset': 0.0,
368// 'physical_range': '[0|1]', 'bit': 38, 'type': 'enum', 'order': 'motorola',
369// 'physical_unit': ''}
370Status_310::Eps_interferdetdvalidType Status310::eps_interferdetdvalid(
371 const std::uint8_t* bytes, int32_t length) const {
372 Byte t0(bytes + 4);
373 int32_t x = t0.get_byte(6, 1);
374
377 return ret;
378}
379
380// config detail: {'description': 'Hands Off Steering Wheel Detection status',
381// 'enum': {0: 'EPSHANDSDETNSTS_HANDSOFF_NOT_DETECTED',
382// 1: 'EPSHANDSDETNSTS_HANDOFFF_DETECTED'}, 'precision': 1.0, 'len': 1,
383// 'name': 'epshandsdetnsts', 'is_signed_var': False, 'offset': 0.0,
384// 'physical_range': '[0|1]', 'bit': 27, 'type': 'enum', 'order': 'motorola',
385// 'physical_unit': ''}
386Status_310::EpshandsdetnstsType Status310::epshandsdetnsts(
387 const std::uint8_t* bytes, int32_t length) const {
388 Byte t0(bytes + 3);
389 int32_t x = t0.get_byte(3, 1);
390
392 static_cast<Status_310::EpshandsdetnstsType>(x);
393 return ret;
394}
395
396// config detail: {'description': 'Hands Off Steering Wheel Detection status
397// Validity', 'enum': {0: 'EPS_HANDSDETNSTSVALID_INVALID',
398// 1: 'EPS_HANDSDETNSTSVALID_VALID'}, 'precision': 1.0, 'len': 1, 'name':
399// 'eps_handsdetnstsvalid', 'is_signed_var': False, 'offset': 0.0,
400// 'physical_range': '[0|1]', 'bit': 34, 'type': 'enum', 'order': 'motorola',
401// 'physical_unit': ''}
402Status_310::Eps_handsdetnstsvalidType Status310::eps_handsdetnstsvalid(
403 const std::uint8_t* bytes, int32_t length) const {
404 Byte t0(bytes + 4);
405 int32_t x = t0.get_byte(2, 1);
406
409 return ret;
410}
411
412// config detail: {'description': 'sign of steering wheel angle', 'enum':
413// {0: 'STEERWHEELANGLESIGN_LEFT_POSITIVE',
414// 1: 'STEERWHEELANGLESIGN_RIGHT_NEGATIVE'}, 'precision': 1.0, 'len': 1,
415// 'name': 'steerwheelanglesign', 'is_signed_var': False, 'offset': 0.0,
416// 'physical_range': '[0|1]', 'bit': 32, 'type': 'enum', 'order': 'motorola',
417// 'physical_unit': ''}
418Status_310::SteerwheelanglesignType Status310::steerwheelanglesign(
419 const std::uint8_t* bytes, int32_t length) const {
420 Byte t0(bytes + 4);
421 int32_t x = t0.get_byte(0, 1);
422
425 return ret;
426}
427
428// config detail: {'description': 'sign of steering wheel speed ', 'enum':
429// {0: 'STEERWHEELSPDSIGN_LEFT_POSITIVE',1:'STEERWHEELSPDSIGN_RIGHT_NEGATIVE'},
430// 'precision': 1.0, 'len': 1, 'name': 'steerwheelspdsign', 'is_signed_var':
431// False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 40, 'type': 'enum',
432// 'order': 'motorola', 'physical_unit': ''}
433Status_310::SteerwheelspdsignType Status310::steerwheelspdsign(
434 const std::uint8_t* bytes, int32_t length) const {
435 Byte t0(bytes + 5);
436 int32_t x = t0.get_byte(0, 1);
437
439 static_cast<Status_310::SteerwheelspdsignType>(x);
440 return ret;
441}
442
443// config detail: {'description': 'Driver door status.', 'enum':
444// {0: 'DRIVERDOORSTS_CLOSED', 1: 'DRIVERDOORSTS_OPEN'}, 'precision': 1.0,
445// 'len': 1, 'name': 'driverdoorsts', 'is_signed_var': False, 'offset': 0.0,
446// 'physical_range': '[0|1]', 'bit': 47, 'type': 'enum', 'order': 'motorola',
447// 'physical_unit': ''}
448Status_310::DriverdoorstsType Status310::driverdoorsts(
449 const std::uint8_t* bytes, int32_t length) const {
450 Byte t0(bytes + 5);
451 int32_t x = t0.get_byte(7, 1);
452
454 static_cast<Status_310::DriverdoorstsType>(x);
455 return ret;
456}
457
458// config detail: {'description': 'Left rear door status', 'enum':
459// {0: 'RLDOORSTS_CLOSED', 1: 'RLDOORSTS_OPEN'}, 'precision': 1.0, 'len': 1,
460// 'name': 'rldoorsts', 'is_signed_var': False, 'offset': 0.0,
461// 'physical_range': '[0|1]', 'bit': 54, 'type': 'enum', 'order': 'motorola',
462// 'physical_unit': ''}
463Status_310::RldoorstsType Status310::rldoorsts(const std::uint8_t* bytes,
464 int32_t length) const {
465 Byte t0(bytes + 6);
466 int32_t x = t0.get_byte(6, 1);
467
469 return ret;
470}
471
472// config detail: {'description': 'Passenger door status.', 'enum':
473// {0: 'PASSENGERDOORSTS_CLOSED', 1: 'PASSENGERDOORSTS_OPEN'},'precision': 1.0,
474// 'len': 1, 'name': 'passengerdoorsts', 'is_signed_var': False, 'offset': 0.0,
475// 'physical_range': '[0|1]', 'bit': 45, 'type': 'enum', 'order': 'motorola',
476// 'physical_unit': ''}
477Status_310::PassengerdoorstsType Status310::passengerdoorsts(
478 const std::uint8_t* bytes, int32_t length) const {
479 Byte t0(bytes + 5);
480 int32_t x = t0.get_byte(5, 1);
481
483 static_cast<Status_310::PassengerdoorstsType>(x);
484 return ret;
485}
486
487// config detail: {'description': 'Right rear door status', 'enum':
488// {0: 'RRDOORSTS_CLOSED', 1: 'RRDOORSTS_OPEN'}, 'precision': 1.0, 'len': 1,
489// 'name': 'rrdoorsts', 'is_signed_var': False, 'offset': 0.0,'physical_range':
490// '[0|1]', 'bit': 44, 'type': 'enum', 'order': 'motorola', 'physical_unit':''}
491Status_310::RrdoorstsType Status310::rrdoorsts(const std::uint8_t* bytes,
492 int32_t length) const {
493 Byte t0(bytes + 5);
494 int32_t x = t0.get_byte(4, 1);
495
497 return ret;
498}
499
500// config detail: {'description': 'Front fog lamp status', 'enum':
501// {0: 'FRONTFOGLMPSTS_OFF', 1:'FRONTFOGLMPSTS_ON',2:'FRONTFOGLMPSTS_RESERVED',
502// 3: 'FRONTFOGLMPSTS_NOT_AVAILABLE'}, 'precision': 1.0, 'len': 2, 'name':
503// 'frontfoglmpsts', 'is_signed_var': False, 'offset': 0.0, 'physical_range':
504// '[0|3]', 'bit': 43, 'type': 'enum', 'order': 'motorola', 'physical_unit':''}
505Status_310::FrontfoglmpstsType Status310::frontfoglmpsts(
506 const std::uint8_t* bytes, int32_t length) const {
507 Byte t0(bytes + 5);
508 int32_t x = t0.get_byte(2, 2);
509
511 static_cast<Status_310::FrontfoglmpstsType>(x);
512 return ret;
513}
514
515// config detail: {'description': 'Rear fog lamp status', 'enum':
516// {0: 'REARFOGLMPSTS_OFF', 1: 'REARFOGLMPSTS_ON'}, 'precision': 1.0, 'len': 1,
517// 'name': 'rearfoglmpsts', 'is_signed_var': False, 'offset': 0.0,
518// 'physical_range': '[0|1]', 'bit': 51, 'type': 'enum', 'order': 'motorola',
519// 'physical_unit': ''}
520Status_310::RearfoglmpstsType Status310::rearfoglmpsts(
521 const std::uint8_t* bytes, int32_t length) const {
522 Byte t0(bytes + 6);
523 int32_t x = t0.get_byte(3, 1);
524
526 static_cast<Status_310::RearfoglmpstsType>(x);
527 return ret;
528}
529
530// config detail: {'description': 'Low beam status', 'enum':
531// {0: 'LOWBEAMSTS_OFF', 1: 'LOWBEAMSTS_ON'}, 'precision': 1.0, 'len': 1,
532// 'name': 'lowbeamsts', 'is_signed_var': False, 'offset': 0.0,
533// 'physical_range': '[0|1]', 'bit': 49, 'type': 'enum', 'order': 'motorola',
534// 'physical_unit': ''}
535Status_310::LowbeamstsType Status310::lowbeamsts(const std::uint8_t* bytes,
536 int32_t length) const {
537 Byte t0(bytes + 6);
538 int32_t x = t0.get_byte(1, 1);
539
541 return ret;
542}
543
544// config detail: {'description': 'High beam status', 'enum':
545// {0: 'HIGHBEAMSTS_OFF', 1: 'HIGHBEAMSTS_ON'}, 'precision': 1.0, 'len': 1,
546// 'name': 'highbeamsts', 'is_signed_var': False, 'offset': 0.0,
547// 'physical_range': '[0|1]', 'bit': 63, 'type': 'enum', 'order': 'motorola',
548// 'physical_unit': ''}
549Status_310::HighbeamstsType Status310::highbeamsts(const std::uint8_t* bytes,
550 int32_t length) const {
551 Byte t0(bytes + 7);
552 int32_t x = t0.get_byte(7, 1);
553
555 return ret;
556}
557
558// config detail: {'description': 'Left turn lamp status', 'enum':
559// {0: 'LEFTTURNLAMPSTS_OFF', 1: 'LEFTTURNLAMPSTS_ON'}, 'precision': 1.0,
560// 'len': 1, 'name': 'leftturnlampsts', 'is_signed_var': False, 'offset': 0.0,
561// 'physical_range': '[0|1]', 'bit': 62, 'type': 'enum', 'order': 'motorola',
562// 'physical_unit': ''}
563Status_310::LeftturnlampstsType Status310::leftturnlampsts(
564 const std::uint8_t* bytes, int32_t length) const {
565 Byte t0(bytes + 7);
566 int32_t x = t0.get_byte(6, 1);
567
569 static_cast<Status_310::LeftturnlampstsType>(x);
570 return ret;
571}
572
573// config detail: {'description': 'Right turn lamp status', 'enum':
574// {0: 'RIGHTTURNLAMPSTS_OFF', 1: 'RIGHTTURNLAMPSTS_ON'}, 'precision': 1.0,
575// 'len': 1, 'name': 'rightturnlampsts', 'is_signed_var': False, 'offset': 0.0,
576// 'physical_range': '[0|1]', 'bit': 60, 'type': 'enum', 'order': 'motorola',
577// 'physical_unit': ''}
578Status_310::RightturnlampstsType Status310::rightturnlampsts(
579 const std::uint8_t* bytes, int32_t length) const {
580 Byte t0(bytes + 7);
581 int32_t x = t0.get_byte(4, 1);
582
584 static_cast<Status_310::RightturnlampstsType>(x);
585 return ret;
586}
587
588// config detail: {'description': 'The work status of BCM', 'enum':
589// {0: 'BCM_AVAILSTS_MANUAL_MODE', 1: 'BCM_AVAILSTS_AUTONOMOUS_MODE',
590// 2: 'BCM_AVAILSTS_RESERVED1', 3: 'BCM_AVAILSTS_RESERVED2'}, 'precision': 1.0,
591// 'len': 2, 'name': 'bcm_availsts', 'is_signed_var': False, 'offset': 0.0,
592// 'physical_range': '[0|3]', 'bit': 58, 'type': 'enum', 'order': 'motorola',
593// 'physical_unit': ''}
594Status_310::Bcm_availstsType Status310::bcm_availsts(const std::uint8_t* bytes,
595 int32_t length) const {
596 Byte t0(bytes + 7);
597 int32_t x = t0.get_byte(1, 2);
598
600 static_cast<Status_310::Bcm_availstsType>(x);
601 return ret;
602}
603
604// config detail: {'description': 'Break Lamp status', 'enum':
605// {0: 'BRAKELMPSTS_OFF', 1: 'BRAKELMPSTS_ON'}, 'precision': 1.0, 'len': 1,
606// 'name': 'brakelmpsts', 'is_signed_var': False, 'offset': 0.0,
607// 'physical_range': '[0|1]', 'bit': 56, 'type': 'enum', 'order': 'motorola',
608// 'physical_unit': ''}
609Status_310::BrakelmpstsType Status310::brakelmpsts(const std::uint8_t* bytes,
610 int32_t length) const {
611 Byte t0(bytes + 7);
612 int32_t x = t0.get_byte(0, 1);
613
615 return ret;
616}
617} // namespace wey
618} // namespace canbus
619} // namespace apollo
Defines the Byte class.
void Parse(const std::uint8_t *bytes, int32_t length, Wey *chassis) const override
Definition status_310.cc:33
static const int32_t ID
Definition status_310.h:29
class register implement
Definition arena_queue.h:37