Apollo  6.0
Open source self driving car software
aeb_frontwheelspeed_353.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2020 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 neolix_edu {
25 
27  ::apollo::canbus::ChassisDetail> {
28  public:
29  static const int32_t ID;
31  void Parse(const std::uint8_t* bytes, int32_t length,
32  ChassisDetail* chassis) const override;
33 
34  private:
35  // config detail: {'description': '0x0:Invalid;0x1:Valid', 'offset': 0.0,
36  // 'precision': 1.0, 'len': 1, 'name': 'VehicleSpeedValid', 'is_signed_var':
37  // False, 'physical_range': '[0.0|1.0]', 'bit': 7, 'type': 'bool', 'order':
38  // 'motorola', 'physical_unit': 'bit'}
39  bool vehiclespeedvalid(const std::uint8_t* bytes, const int32_t length) const;
40 
41  // config detail: {'name': 'VehicleSpeed', 'offset': 0.0, 'precision':
42  // 0.05625, 'len': 13, 'is_signed_var': False, 'physical_range':
43  // '[0.0|460.69]', 'bit': 4, 'type': 'double', 'order': 'motorola',
44  // 'physical_unit': 'Km/h'}
45  double vehiclespeed(const std::uint8_t* bytes, const int32_t length) const;
46 
47  // config detail: {'description': '0x0:Invalid;0x1:D;0x2:N;0x3:R', 'offset':
48  // 0.0, 'precision': 1.0, 'len': 2, 'name': 'VehicleRealDirect',
49  // 'is_signed_var': False, 'physical_range': '[0.0|3.0]', 'bit': 6, 'type':
50  // 'double', 'order': 'motorola', 'physical_unit': 'bit'}
51  double vehiclerealdirect(const std::uint8_t* bytes,
52  const int32_t length) const;
53 
54  // config detail: {'description': '0x0:Invalid;0x1:Valid', 'offset': 0.0,
55  // 'precision': 1.0, 'len': 1, 'name': 'WheelSpeed_FL_Valid', 'is_signed_var':
56  // False, 'physical_range': '[0.0|1.0]', 'bit': 23, 'type': 'bool', 'order':
57  // 'motorola', 'physical_unit': 'bit'}
58  bool wheelspeed_fl_valid(const std::uint8_t* bytes,
59  const int32_t length) const;
60 
61  // config detail: {'name': 'WheelSpeed_FL', 'offset': 0.0, 'precision': 0.01,
62  // 'len': 15, 'is_signed_var': False, 'physical_range': '[0.0|327.67]', 'bit':
63  // 22, 'type': 'double', 'order': 'motorola', 'physical_unit': 'km/h'}
64  double wheelspeed_fl(const std::uint8_t* bytes, const int32_t length) const;
65 
66  // config detail: {'description': '0x0:Invalid;0x1:Valid', 'offset': 0.0,
67  // 'precision': 1.0, 'len': 1, 'name': 'WheelSpeed_FR_Valid', 'is_signed_var':
68  // False, 'physical_range': '[0.0|1.0]', 'bit': 39, 'type': 'bool', 'order':
69  // 'motorola', 'physical_unit': 'bit'}
70  bool wheelspeed_fr_valid(const std::uint8_t* bytes,
71  const int32_t length) const;
72 
73  // config detail: {'name': 'WheelSpeed_FR', 'offset': 0.0, 'precision': 0.01,
74  // 'len': 15, 'is_signed_var': False, 'physical_range': '[0.0|327.67]', 'bit':
75  // 38, 'type': 'double', 'order': 'motorola', 'physical_unit': 'km/h'}
76  double wheelspeed_fr(const std::uint8_t* bytes, const int32_t length) const;
77 
78  // config detail: {'description': '0x0:Invalid;0x1:D;0x2:N;0x3:R', 'offset':
79  // 0.0, 'precision': 1.0, 'len': 2, 'name': 'WheelSpeed_FL_Direct',
80  // 'is_signed_var': False, 'physical_range': '[0.0|3.0]', 'bit': 53, 'type':
81  // 'double', 'order': 'motorola', 'physical_unit': 'bit'}
82  double wheelspeed_fl_direct(const std::uint8_t* bytes,
83  const int32_t length) const;
84 
85  // config detail: {'description': '0x0:Invalid;0x1:D;0x2:N;0x3:R', 'offset':
86  // 0.0, 'precision': 1.0, 'len': 2, 'name': 'WheelSpeed_FR_Direct',
87  // 'is_signed_var': False, 'physical_range': '[0.0|3.0]', 'bit': 55, 'type':
88  // 'double', 'order': 'motorola', 'physical_unit': 'bit'}
89  double wheelspeed_fr_direct(const std::uint8_t* bytes,
90  const int32_t length) const;
91 
92  // config detail: {'name': 'AliveCounter_Front', 'offset': 0.0,
93  // 'precision': 1.0, 'len': 4, 'is_signed_var': False, 'physical_range':
94  // '[0.0|15.0]', 'bit': 51, 'type': 'double', 'order': 'motorola',
95  // 'physical_unit': ''}
96  double alivecounter_front(const std::uint8_t* bytes,
97  const int32_t length) const;
98 
99  // config detail: {'name': 'Checksum_Front', 'offset': 0.0, 'precision': 1.0,
100  // 'len': 8, 'is_signed_var': False, 'physical_range': '[0.0|255.0]', 'bit':
101  // 63, 'type': 'double', 'order': 'motorola', 'physical_unit': ''}
102  double checksum_front(const std::uint8_t* bytes, const int32_t length) const;
103 };
104 
105 } // namespace neolix_edu
106 } // namespace canbus
107 } // namespace apollo
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: aeb_frontwheelspeed_353.h:26
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override
The class of ProtocolData.
static const int32_t ID
Definition: aeb_frontwheelspeed_353.h:29