Apollo  6.0
Open source self driving car software
aeb_systemstate_11.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': '0x00:read only;0x01:brake enable',
36  // 'offset': 0.0, 'precision': 1.0, 'len': 2, 'name': 'AEB_State',
37  // 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 1, 'type': 'int',
38  // 'order': 'motorola', 'physical_unit': ''}
39  int aeb_state(const std::uint8_t* bytes, const int32_t length) const;
40 
41  // config detail: {'description': '0x00:off;0x01:on', 'offset': 0.0,
42  // 'precision': 1.0, 'len': 1, 'name': 'AEB_BrakeState', 'is_signed_var':
43  // False, 'physical_range': '[0|1]', 'bit': 2, 'type': 'bool', 'order':
44  // 'motorola', 'physical_unit': ''}
45  bool aeb_brakestate(const std::uint8_t* bytes, const int32_t length) const;
46 
47  // config detail: {'description': '0x0:Nomal;0x1:Level 1;0x2:Level 2;0x3:Level
48  // 3;0x4:Level 4;0x5:Level 5;0x6:Reserved;0x7:Reserved', 'offset': 0.0,
49  // 'precision': 1.0, 'len': 3, 'name': 'FaultRank', 'is_signed_var': False,
50  // 'physical_range': '[0|5]', 'bit': 10, 'type': 'int', 'order': 'motorola',
51  // 'physical_unit': ''}
52  int faultrank(const std::uint8_t* bytes, const int32_t length) const;
53 
54  // config detail: {'name': 'CurrentTemperature', 'offset': -40.0,
55  // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'physical_range':
56  // '[0|120]', 'bit': 23, 'type': 'int', 'order': 'motorola', 'physical_unit':
57  // ''}
58  int currenttemperature(const std::uint8_t* bytes, const int32_t length) const;
59 
60  // config detail: {'description': '0x0:Normal;0x1:ActivateBrake', 'offset':
61  // 0.0, 'precision': 1.0, 'len': 1, 'name': 'PAS_F1_Stop', 'is_signed_var':
62  // False, 'physical_range': '[0|1]', 'bit': 24, 'type': 'bool', 'order':
63  // 'motorola', 'physical_unit': ''}
64  bool pas_f1_stop(const std::uint8_t* bytes, const int32_t length) const;
65 
66  // config detail: {'description': '0x0:Normal;0x1:ActivateBrake', 'offset':
67  // 0.0, 'precision': 1.0, 'len': 1, 'name': 'PAS_F2_Stop', 'is_signed_var':
68  // False, 'physical_range': '[0|1]', 'bit': 25, 'type': 'bool', 'order':
69  // 'motorola', 'physical_unit': ''}
70  bool pas_f2_stop(const std::uint8_t* bytes, const int32_t length) const;
71 
72  // config detail: {'description': '0x0:Normal;0x1:ActivateBrake', 'offset':
73  // 0.0, 'precision': 1.0, 'len': 1, 'name': 'PAS_F3_Stop', 'is_signed_var':
74  // False, 'physical_range': '[0|1]', 'bit': 26, 'type': 'bool', 'order':
75  // 'motorola', 'physical_unit': ''}
76  bool pas_f3_stop(const std::uint8_t* bytes, const int32_t length) const;
77 
78  // config detail: {'description': '0x0:Normal;0x1:ActivateBrake', 'offset':
79  // 0.0, 'precision': 1.0, 'len': 1, 'name': 'PAS_F4_Stop', 'is_signed_var':
80  // False, 'physical_range': '[0|1]', 'bit': 27, 'type': 'bool', 'order':
81  // 'motorola', 'physical_unit': ''}
82  bool pas_f4_stop(const std::uint8_t* bytes, const int32_t length) const;
83 
84  // config detail: {'description': '0x0:Normal;0x1:ActivateBrake', 'offset':
85  // 0.0, 'precision': 1.0, 'len': 1, 'name': 'PAS_B1_Stop', 'is_signed_var':
86  // False, 'physical_range': '[0|1]', 'bit': 28, 'type': 'bool', 'order':
87  // 'motorola', 'physical_unit': ''}
88  bool pas_b1_stop(const std::uint8_t* bytes, const int32_t length) const;
89 
90  // config detail: {'description': '0x0:Normal;0x1:ActivateBrake', 'offset':
91  // 0.0, 'precision': 1.0, 'len': 1, 'name': 'PAS_B2_Stop', 'is_signed_var':
92  // False, 'physical_range': '[0|1]', 'bit': 29, 'type': 'bool', 'order':
93  // 'motorola', 'physical_unit': ''}
94  bool pas_b2_stop(const std::uint8_t* bytes, const int32_t length) const;
95 
96  // config detail: {'description': '0x0:Normal;0x1:ActivateBrake', 'offset':
97  // 0.0, 'precision': 1.0, 'len': 1, 'name': 'PAS_B3_Stop', 'is_signed_var':
98  // False, 'physical_range': '[0|1]', 'bit': 30, 'type': 'bool', 'order':
99  // 'motorola', 'physical_unit': ''}
100  bool pas_b3_stop(const std::uint8_t* bytes, const int32_t length) const;
101 
102  // config detail: {'description': '0x0:Normal;0x1:ActivateBrake', 'offset':
103  // 0.0, 'precision': 1.0, 'len': 1, 'name': 'PAS_B4_Stop', 'is_signed_var':
104  // False, 'physical_range': '[0|1]', 'bit': 31, 'type': 'bool', 'order':
105  // 'motorola', 'physical_unit': ''}
106  bool pas_b4_stop(const std::uint8_t* bytes, const int32_t length) const;
107 
108  // config detail: {'name': 'AEB_LiveCounter_Rear', 'offset': 0.0,
109  // 'precision': 1.0, 'len': 4, 'is_signed_var': False, 'physical_range':
110  // '[0|15]', 'bit': 51, 'type': 'int', 'order': 'motorola', 'physical_unit':
111  // ''}
112  int aeb_livecounter_rear(const std::uint8_t* bytes,
113  const int32_t length) const;
114 
115  // config detail: {'name': 'AEB_Cheksum', 'offset': 0.0, 'precision': 1.0,
116  // 'len': 8, 'is_signed_var': False, 'physical_range': '[0|255]', 'bit': 63,
117  // 'type': 'int', 'order': 'motorola', 'physical_unit': 'bit'}
118  int aeb_cheksum(const std::uint8_t* bytes, const int32_t length) const;
119 };
120 
121 } // namespace neolix_edu
122 } // namespace canbus
123 } // namespace apollo
Definition: aeb_systemstate_11.h:26
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
static const int32_t ID
Definition: aeb_systemstate_11.h:29
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override
The class of ProtocolData.