Apollo  6.0
Open source self driving car software
status_310.h
Go to the documentation of this file.
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 
17 #pragma once
18 
19 #include "modules/canbus/proto/chassis_detail.pb.h"
21 
22 namespace apollo {
23 namespace canbus {
24 namespace wey {
25 
27  ::apollo::canbus::ChassisDetail> {
28  public:
29  static const int32_t ID;
30  Status310();
31  void Parse(const std::uint8_t* bytes, int32_t length,
32  ChassisDetail* chassis) const override;
33 
34  private:
35  // config detail: {'description': 'Longitude acceleration valid', 'enum':
36  // {0: 'LONGITUDEACCVALID_INVALID', 1: 'LONGITUDEACCVALID_VALID'},
37  // 'precision': 1.0, 'len': 1, 'name': 'LongitudeAccValid', 'is_signed_var':
38  // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 15, 'type': 'enum',
39  // 'order': 'motorola', 'physical_unit': ''}
40  Status_310::LongitudeaccvalidType longitudeaccvalid(
41  const std::uint8_t* bytes, const int32_t length) const;
42 
43  // config detail: {'description': 'Indicates Lateral Signal State', 'enum':
44  // {0: 'LATERALACCEVALID_INVALID', 1: 'LATERALACCEVALID_VALID'},
45  // 'precision': 1.0, 'len': 1, 'name': 'LateralAcceValid', 'is_signed_var':
46  // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 7, 'type': 'enum',
47  // 'order': 'motorola', 'physical_unit': ''}
48  Status_310::LateralaccevalidType lateralaccevalid(const std::uint8_t* bytes,
49  const int32_t length) const;
50 
51  // config detail: {'description': 'Vehicle yaw rate valid', 'enum':
52  // {0: 'VEHDYNYAWRATEVALID_INVALID', 1: 'VEHDYNYAWRATEVALID_VALID'},
53  // 'precision': 1.0, 'len': 1, 'name': 'VehDynYawRateValid', 'is_signed_var':
54  // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 6, 'type': 'enum',
55  // 'order': 'motorola', 'physical_unit': ''}
56  Status_310::VehdynyawratevalidType vehdynyawratevalid(
57  const std::uint8_t* bytes, const int32_t length) const;
58 
59  // config detail: {'description': 'Front right wheel speed valid', 'enum':
60  // {0: 'FLWHEELSPDVALID_INVALID', 1:'FLWHEELSPDVALID_VALID'},'precision':1.0,
61  // 'len': 1, 'name': 'FLWheelSpdValid', 'is_signed_var': False, 'offset':0.0,
62  // 'physical_range': '[0|1]', 'bit': 5, 'type': 'enum', 'order': 'motorola',
63  // 'physical_unit': ''}
64  Status_310::FlwheelspdvalidType flwheelspdvalid(const std::uint8_t* bytes,
65  const int32_t length) const;
66 
67  // config detail: {'description': 'Front right wheel speed valid', 'enum':
68  // {0: 'FRWHEELSPDVALID_INVALID', 1:'FRWHEELSPDVALID_VALID'},'precision':1.0,
69  // 'len': 1, 'name': 'FRWheelSpdValid', 'is_signed_var': False, 'offset':0.0,
70  // 'physical_range': '[0|1]', 'bit': 53, 'type': 'enum', 'order': 'motorola',
71  // 'physical_unit': ''}
72  Status_310::FrwheelspdvalidType frwheelspdvalid(const std::uint8_t* bytes,
73  const int32_t length) const;
74 
75  // config detail: {'description': 'Rear left wheel speed valid', 'enum':
76  // {0: 'RLWHEELSPDVALID_INVALID', 1: 'RLWHEELSPDVALID_VALID'}, 'precision':
77  // 1.0, 'len': 1, 'name': 'RLWheelSpdValid', 'is_signed_var': False,
78  // 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 3, 'type': 'enum',
79  // 'order': 'motorola', 'physical_unit': ''}
80  Status_310::RlwheelspdvalidType rlwheelspdvalid(const std::uint8_t* bytes,
81  const int32_t length) const;
82 
83  // config detail: {'description': 'Rear right wheel speed valid', 'enum':
84  // {0: 'RRWHEELSPDVALID_INVALID', 1: 'RRWHEELSPDVALID_VALID'}, 'precision':
85  // 1.0, 'len': 1, 'name': 'RRWheelSpdValid', 'is_signed_var': False,
86  // 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 2, 'type': 'enum',
87  // 'order': 'motorola', 'physical_unit': ''}
88  Status_310::RrwheelspdvalidType rrwheelspdvalid(const std::uint8_t* bytes,
89  const int32_t length) const;
90 
91  // config detail: {'description': 'Quality/fault information to current
92  // Vehicle speed information', 'enum': {0: 'VEHICLESPDVALID_INVALID',
93  // 1: 'VEHICLESPDVALID_VALID'}, 'precision': 1.0, 'len': 1, 'name':
94  // 'VehicleSpdValid', 'is_signed_var': False, 'offset': 0.0,'physical_range':
95  // '[0|1]', 'bit': 0, 'type': 'enum', 'order':'motorola','physical_unit': ''}
96  Status_310::VehiclespdvalidType vehiclespdvalid(const std::uint8_t* bytes,
97  const int32_t length) const;
98 
99  // config detail: {'description': 'This signal indicates if ECM control for
100  // ADS torque request is active or not.', 'enum':
101  // {0: 'LONGITUDEDRIVINGMODE_MANUALMODE',
102  // 1: 'LONGITUDEDRIVINGMODE_AUTOMATICSTANDBY',
103  // 2: 'LONGITUDEDRIVINGMODE_AUTOMATICACCELERATION',
104  // 3: 'LONGITUDEDRIVINGMODE_AUTOMATICDECELERATION'}, 'precision': 1.0,
105  // 'len': 2, 'name': 'LongitudeDrivingMode', 'is_signed_var': False,
106  // 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 14, 'type': 'enum',
107  // 'order': 'motorola', 'physical_unit': ''}
108  Status_310::LongitudedrivingmodeType longitudedrivingmode(
109  const std::uint8_t* bytes, const int32_t length) const;
110 
111  // config detail: {'description': 'Engine speed valid', 'enum':
112  // {0: 'ENGSPDVALID_INVALID', 1: 'ENGSPDVALID_VALID',
113  // 2: 'ENGSPDVALID_INIT_VALUE', 3: 'ENGSPDVALID_RESERVED'}, 'precision': 1.0,
114  // 'len': 2, 'name': 'EngSpdValid', 'is_signed_var': False, 'offset': 0.0,
115  // 'physical_range': '[0|2]', 'bit': 12, 'type': 'enum', 'order': 'motorola',
116  // 'physical_unit': ''}
117  Status_310::EngspdvalidType engspdvalid(const std::uint8_t* bytes,
118  const int32_t length) const;
119 
120  // config detail:{'description': 'Detect Acceleration Pedal Override','enum':
121  // {0: 'ACCEPEDALOVERRIDE_NOT_OVERRIDE', 1: 'ACCEPEDALOVERRIDE_OVERRIDE'},
122  // 'precision': 1.0, 'len': 1, 'name': 'AccePedalOverride', 'is_signed_var':
123  // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 19, 'type':'enum',
124  // 'order': 'motorola', 'physical_unit': ''}
125  Status_310::AccepedaloverrideType accepedaloverride(
126  const std::uint8_t* bytes, const int32_t length) const;
127 
128  // config detail: {'description': 'indicates the brake pedal is pressed or
129  // not or incorrect for plausibility check.', 'enum':
130  // {0: 'BRAKEPEDALSTATUS_NOT_PRESSED', 1: 'BRAKEPEDALSTATUS_PRESSED',
131  // 2: 'BRAKEPEDALSTATUS_RESERVED1', 3: 'BRAKEPEDALSTATUS_ERROR'},
132  // 'precision': 1.0, 'len': 2, 'name': 'BrakePedalStatus', 'is_signed_var':
133  // False, 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 9, 'type': 'enum',
134  // 'order': 'motorola', 'physical_unit': ''}
135  Status_310::BrakepedalstatusType brakepedalstatus(const std::uint8_t* bytes,
136  const int32_t length) const;
137 
138  // config detail: {'description': 'Brake light lamp(on/off),come from ESP',
139  // 'enum': {0: 'ESPBRAKELIGHTSTS_OFF', 1: 'ESPBRAKELIGHTSTS_ON'},'precision':
140  // 1.0, 'len': 1, 'name': 'ESPBrakeLightSts', 'is_signed_var': False,
141  // 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 29, 'type': 'enum',
142  // 'order': 'motorola', 'physical_unit': ''}
143  Status_310::EspbrakelightstsType espbrakelightsts(const std::uint8_t* bytes,
144  const int32_t length) const;
145 
146  // config detail: {'description': 'EPB switch position signal valid', 'enum':
147  // {0: 'EPBSWTPOSITIONVALID_VALID', 1: 'EPBSWTPOSITIONVALID_NOT_VALID'},
148  // 'precision': 1.0, 'len': 1, 'name': 'EPBSwtPositionValid', 'is_signed_var':
149  // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 20, 'type': 'enum',
150  // 'order': 'motorola', 'physical_unit': ''}
151  Status_310::EpbswtpositionvalidType epbswtpositionvalid(
152  const std::uint8_t* bytes, const int32_t length) const;
153 
154  // config detail: {'description': 'EPB status', 'enum': {0:'EPBSTS_RELEASED',
155  // 1: 'EPBSTS_CLOSED', 2: 'EPBSTS_IN_PROGRESS', 3: 'EPBSTS_UNKNOWN'},
156  // 'precision': 1.0, 'len': 2, 'name': 'EPBSts', 'is_signed_var': False,
157  // 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 18, 'type': 'enum',
158  // 'order': 'motorola', 'physical_unit': ''}
159  Status_310::EpbstsType epbsts(const std::uint8_t* bytes,
160  const int32_t length) const;
161 
162  // config detail: {'description': 'Current gear valid', 'enum':
163  // {0: 'CURRENTGEARVALID_INVALID', 1: 'CURRENTGEARVALID_VALID'},
164  // 'precision': 1.0, 'len': 1, 'name': 'CurrentGearValid', 'is_signed_var':
165  // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 25,'type': 'enum',
166  // 'order': 'motorola', 'physical_unit': ''}
167  Status_310::CurrentgearvalidType currentgearvalid(const std::uint8_t* bytes,
168  const int32_t length) const;
169 
170  // config detail: {'description': 'EPS torque sensor status', 'enum':
171  // {0: 'EPSTRQSNSRSTS_NORMAL', 1: 'EPSTRQSNSRSTS_ABNORMAL'}, 'precision':1.0,
172  // 'len': 1, 'name': 'EPSTrqSnsrSts', 'is_signed_var': False, 'offset': 0.0,
173  // 'physical_range': '[0|1]', 'bit': 31, 'type': 'enum', 'order': 'motorola',
174  // 'physical_unit': ''}
175  Status_310::EpstrqsnsrstsType epstrqsnsrsts(const std::uint8_t* bytes,
176  const int32_t length) const;
177 
178  // config detail: {'description': 'Driver Steering Interference Detected
179  // Validity', 'enum': {0: 'EPS_INTERFERDETDVALID_INVALID',
180  // 1: 'EPS_INTERFERDETDVALID_VALID'}, 'precision': 1.0, 'len': 1, 'name':
181  // 'EPS_InterferDetdValid', 'is_signed_var': False, 'offset': 0.0,
182  // 'physical_range': '[0|1]', 'bit': 38, 'type': 'enum',
183  // 'order': 'motorola', 'physical_unit': ''}
184  Status_310::Eps_interferdetdvalidType eps_interferdetdvalid(
185  const std::uint8_t* bytes, const int32_t length) const;
186 
187  // config detail: {'description': 'Hands Off Steering Wheel Detection status',
188  // 'enum': {0: 'EPSHANDSDETNSTS_HANDSOFF_NOT_DETECTED',
189  // 1: 'EPSHANDSDETNSTS_HANDOFFF_DETECTED'}, 'precision': 1.0, 'len': 1,
190  // 'name': 'EPSHandsDetnSts', 'is_signed_var': False, 'offset': 0.0,
191  // 'physical_range': '[0|1]', 'bit': 27, 'type': 'enum', 'order': 'motorola',
192  // 'physical_unit': ''}
193  Status_310::EpshandsdetnstsType epshandsdetnsts(const std::uint8_t* bytes,
194  const int32_t length) const;
195 
196  // config detail: {'description': 'Hands Off Steering Wheel Detection status
197  // Validity', 'enum': {0: 'EPS_HANDSDETNSTSVALID_INVALID',
198  // 1: 'EPS_HANDSDETNSTSVALID_VALID'}, 'precision': 1.0, 'len': 1, 'name':
199  // 'EPS_HandsDetnStsValid', 'is_signed_var': False, 'offset': 0.0,
200  // 'physical_range': '[0|1]', 'bit': 34, 'type': 'enum', 'order': 'motorola',
201  // 'physical_unit': ''}
202  Status_310::Eps_handsdetnstsvalidType eps_handsdetnstsvalid(
203  const std::uint8_t* bytes, const int32_t length) const;
204 
205  // config detail: {'description': 'sign of steering wheel angle', 'enum':
206  // {0: 'STEERWHEELANGLESIGN_LEFT_POSITIVE',
207  // 1: 'STEERWHEELANGLESIGN_RIGHT_NEGATIVE'}, 'precision': 1.0, 'len': 1,
208  // 'name': 'SteerWheelAngleSign', 'is_signed_var': False, 'offset': 0.0,
209  // 'physical_range': '[0|1]', 'bit': 32, 'type': 'enum', 'order': 'motorola',
210  // 'physical_unit': ''}
211  Status_310::SteerwheelanglesignType steerwheelanglesign(
212  const std::uint8_t* bytes, const int32_t length) const;
213 
214  // config detail: {'description': 'sign of steering wheel speed ', 'enum':
215  // {0: 'STEERWHEELSPDSIGN_LEFT_POSITIVE',
216  // 1: 'STEERWHEELSPDSIGN_RIGHT_NEGATIVE'}, 'precision': 1.0, 'len': 1,
217  // 'name': 'SteerWheelSpdSign', 'is_signed_var': False, 'offset': 0.0,
218  // 'physical_range': '[0|1]', 'bit': 40, 'type': 'enum', 'order': 'motorola',
219  // 'physical_unit': ''}
220  Status_310::SteerwheelspdsignType steerwheelspdsign(
221  const std::uint8_t* bytes, const int32_t length) const;
222 
223  // config detail: {'description': 'Driver door status.', 'enum':
224  // {0: 'DRIVERDOORSTS_CLOSED', 1: 'DRIVERDOORSTS_OPEN'}, 'precision': 1.0,
225  // 'len': 1, 'name': 'DriverDoorSts', 'is_signed_var': False, 'offset': 0.0,
226  // 'physical_range': '[0|1]', 'bit': 47, 'type': 'enum', 'order': 'motorola',
227  // 'physical_unit': ''}
228  Status_310::DriverdoorstsType driverdoorsts(const std::uint8_t* bytes,
229  const int32_t length) const;
230 
231  // config detail: {'description': 'Left rear door status', 'enum':
232  // {0: 'RLDOORSTS_CLOSED', 1: 'RLDOORSTS_OPEN'}, 'precision': 1.0, 'len': 1,
233  // 'name': 'RLDoorSts', 'is_signed_var': False, 'offset': 0.0,
234  // 'physical_range': '[0|1]', 'bit': 54, 'type': 'enum', 'order': 'motorola',
235  // 'physical_unit': ''}
236  Status_310::RldoorstsType rldoorsts(const std::uint8_t* bytes,
237  const int32_t length) const;
238 
239  // config detail: {'description': 'Passenger door status.', 'enum':
240  // {0: 'PASSENGERDOORSTS_CLOSED',1:'PASSENGERDOORSTS_OPEN'},'precision': 1.0,
241  // 'len': 1, 'name': 'PassengerDoorSts','is_signed_var': False,'offset': 0.0,
242  // 'physical_range': '[0|1]', 'bit': 45, 'type': 'enum', 'order': 'motorola',
243  // 'physical_unit': ''}
244  Status_310::PassengerdoorstsType passengerdoorsts(const std::uint8_t* bytes,
245  const int32_t length) const;
246 
247  // config detail: {'description': 'Right rear door status', 'enum':
248  // {0: 'RRDOORSTS_CLOSED', 1: 'RRDOORSTS_OPEN'}, 'precision': 1.0, 'len': 1,
249  // 'name': 'RRDoorSts', 'is_signed_var': False, 'offset': 0.0,
250  // 'physical_range': '[0|1]', 'bit': 44, 'type': 'enum', 'order': 'motorola',
251  // 'physical_unit': ''}
252  Status_310::RrdoorstsType rrdoorsts(const std::uint8_t* bytes,
253  const int32_t length) const;
254 
255  // config detail: {'description': 'Front fog lamp status', 'enum':
256  // {0: 'FRONTFOGLMPSTS_OFF', 1: 'FRONTFOGLMPSTS_ON',
257  // 2: 'FRONTFOGLMPSTS_RESERVED', 3: 'FRONTFOGLMPSTS_NOT_AVAILABLE'},
258  // 'precision': 1.0, 'len': 2, 'name':'FrontFogLmpSts','is_signed_var':False,
259  // 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 43, 'type': 'enum',
260  // 'order': 'motorola', 'physical_unit': ''}
261  Status_310::FrontfoglmpstsType frontfoglmpsts(const std::uint8_t* bytes,
262  const int32_t length) const;
263 
264  // config detail: {'description': 'Rear fog lamp status', 'enum':
265  // {0: 'REARFOGLMPSTS_OFF', 1: 'REARFOGLMPSTS_ON'}, 'precision':1.0,'len': 1,
266  // 'name': 'RearFogLmpSts', 'is_signed_var': False, 'offset': 0.0,
267  // 'physical_range': '[0|1]', 'bit': 51, 'type': 'enum', 'order': 'motorola',
268  // 'physical_unit': ''}
269  Status_310::RearfoglmpstsType rearfoglmpsts(const std::uint8_t* bytes,
270  const int32_t length) const;
271 
272  // config detail: {'description': 'Low beam status', 'enum':
273  // {0: 'LOWBEAMSTS_OFF', 1: 'LOWBEAMSTS_ON'}, 'precision': 1.0, 'len': 1,
274  // 'name': 'LowBeamSts', 'is_signed_var': False, 'offset': 0.0,
275  // 'physical_range': '[0|1]', 'bit': 49, 'type': 'enum', 'order': 'motorola',
276  // 'physical_unit': ''}
277  Status_310::LowbeamstsType lowbeamsts(const std::uint8_t* bytes,
278  const int32_t length) const;
279 
280  // config detail: {'description': 'High beam status', 'enum':
281  // {0: 'HIGHBEAMSTS_OFF', 1: 'HIGHBEAMSTS_ON'}, 'precision': 1.0, 'len': 1,
282  // 'name': 'HighBeamSts', 'is_signed_var': False, 'offset': 0.0,
283  // 'physical_range': '[0|1]', 'bit': 63, 'type': 'enum', 'order': 'motorola',
284  // 'physical_unit': ''}
285  Status_310::HighbeamstsType highbeamsts(const std::uint8_t* bytes,
286  const int32_t length) const;
287 
288  // config detail: {'description': 'Left turn lamp status', 'enum':
289  // {0: 'LEFTTURNLAMPSTS_OFF', 1: 'LEFTTURNLAMPSTS_ON'}, 'precision': 1.0,
290  // 'len': 1, 'name': 'LeftTurnLampSts', 'is_signed_var': False, 'offset':0.0,
291  // 'physical_range': '[0|1]', 'bit': 62, 'type': 'enum', 'order': 'motorola',
292  // 'physical_unit': ''}
293  Status_310::LeftturnlampstsType leftturnlampsts(const std::uint8_t* bytes,
294  const int32_t length) const;
295 
296  // config detail: {'description': 'Right turn lamp status', 'enum':
297  // {0: 'RIGHTTURNLAMPSTS_OFF', 1: 'RIGHTTURNLAMPSTS_ON'}, 'precision': 1.0,
298  // 'len': 1, 'name': 'RightTurnLampSts', 'is_signed_var':False,'offset': 0.0,
299  // 'physical_range': '[0|1]', 'bit': 60, 'type': 'enum', 'order': 'motorola',
300  // 'physical_unit': ''}
301  Status_310::RightturnlampstsType rightturnlampsts(const std::uint8_t* bytes,
302  const int32_t length) const;
303 
304  // config detail: {'description': 'The work status of BCM', 'enum':
305  // {0: 'BCM_AVAILSTS_MANUAL_MODE', 1: 'BCM_AVAILSTS_AUTONOMOUS_MODE',
306  // 2: 'BCM_AVAILSTS_RESERVED1', 3: 'BCM_AVAILSTS_RESERVED2'},'precision':1.0,
307  // 'len': 2, 'name': 'BCM_AvailSts', 'is_signed_var': False, 'offset': 0.0,
308  // 'physical_range': '[0|3]', 'bit': 58, 'type': 'enum', 'order': 'motorola',
309  // 'physical_unit': ''}
310  Status_310::Bcm_availstsType bcm_availsts(const std::uint8_t* bytes,
311  const int32_t length) const;
312 
313  // config detail: {'description': 'Break Lamp status', 'enum':
314  // {0: 'BRAKELMPSTS_OFF', 1: 'BRAKELMPSTS_ON'}, 'precision': 1.0, 'len': 1,
315  // 'name': 'BrakeLmpSts', 'is_signed_var': False, 'offset': 0.0,
316  // 'physical_range': '[0|1]', 'bit': 56, 'type': 'enum', 'order': 'motorola',
317  // 'physical_unit': ''}
318  Status_310::BrakelmpstsType brakelmpsts(const std::uint8_t* bytes,
319  const int32_t length) const;
320 };
321 
322 } // namespace wey
323 } // namespace canbus
324 } // namespace apollo
static const int32_t ID
Definition: status_310.h:29
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
This is the base class of protocol data.
Definition: protocol_data.h:44
Definition: status_310.h:26
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override
The class of ProtocolData.