Apollo  6.0
Open source self driving car software
vcu_vehicle_fault_response_201.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 
28  ::apollo::canbus::ChassisDetail> {
29  public:
30  static const int32_t ID;
32  void Parse(const std::uint8_t* bytes, int32_t length,
33  ChassisDetail* chassis) const override;
34 
35  private:
36  // config detail: {'description': '0x0: no error;0x1: level 1 error;0x2: level
37  // 2 error;0x3: level 3 error;0x4: level 4 error;0x5: level 5 error',
38  // 'offset': 0.0, 'precision': 1.0, 'len': 4, 'name':
39  // 'Vehicle_Error_IndicationsVCU', 'is_signed_var': False, 'physical_range':
40  // '[0|0]', 'bit': 3, 'type': 'int', 'order': 'motorola', 'physical_unit': ''}
41  int vehicle_error_indicationsvcu(const std::uint8_t* bytes,
42  const int32_t length) const;
43 
44  // config detail: {'description': '0x0: no error;0x1: level 1 error;0x2: level
45  // 2 error;0x3: level 3 error;0x4: level 4 error;0x5: level 5 error',
46  // 'offset': 0.0, 'precision': 1.0, 'len': 4, 'name': 'Brake_System_ErrorEHB',
47  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 7, 'type': 'int',
48  // 'order': 'motorola', 'physical_unit': ''}
49  int brake_system_errorehb(const std::uint8_t* bytes,
50  const int32_t length) const;
51 
52  // config detail: {'description': '0x0: no error;0x1: level 1 error;0x2: level
53  // 2 error;0x3: level 3 error;0x4: level 4 error;0x5: level 5 error',
54  // 'offset': 0.0, 'precision': 1.0, 'len': 4, 'name': 'EPS_Error',
55  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 11, 'type':
56  // 'int', 'order': 'motorola', 'physical_unit': ''}
57  int eps_error(const std::uint8_t* bytes, const int32_t length) const;
58 
59  // config detail: {'description': '0x0: no error;0x1: level 1 error;0x2: level
60  // 2 error;0x3: level 3 error;0x4: level 4 error;0x5: level 5 error',
61  // 'offset': 0.0, 'precision': 1.0, 'len': 4, 'name': 'Motor_Error',
62  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 15, 'type':
63  // 'int', 'order': 'motorola', 'physical_unit': ''}
64  int motor_error(const std::uint8_t* bytes, const int32_t length) const;
65 
66  // config detail: {'description': '0x0: no error;0x1: level 1 error;0x2: level
67  // 2 error;0x3: level 3 error;0x4: level 4 error;0x5: level 5 error',
68  // 'offset': 0.0, 'precision': 1.0, 'len': 4, 'name': 'EPB_Error',
69  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 19, 'type':
70  // 'int', 'order': 'motorola', 'physical_unit': ''}
71  int epb_error(const std::uint8_t* bytes, const int32_t length) const;
72 
73  // config detail: {'description': '0x0: no error;0x1: level 1 error;0x2: level
74  // 2 error;0x3: level 3 error;0x4: level 4 error;0x5: level 5 error',
75  // 'offset': 0.0, 'precision': 1.0, 'len': 4, 'name':
76  // 'High_Voltage_Battery_ErrorBCU', 'is_signed_var': False, 'physical_range':
77  // '[0|0]', 'bit': 23, 'type': 'int', 'order': 'motorola', 'physical_unit':
78  // ''}
79  int high_voltage_battery_errorbcu(const std::uint8_t* bytes,
80  const int32_t length) const;
81 
82  // config detail: {'description': '0x0:Normal;0x1:Failure', 'offset': 0.0,
83  // 'precision': 1.0, 'len': 1, 'name': 'AutoMode_Exit_Reason_LossCommuni',
84  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 32, 'type':
85  // 'bool', 'order': 'motorola', 'physical_unit': ''}
86  bool automode_exit_reason_losscommuni(const std::uint8_t* bytes,
87  const int32_t length) const;
88 
89  // config detail: {'description': '0x0:Normal;0x1:Failure', 'offset': 0.0,
90  // 'precision': 1.0, 'len': 1, 'name': 'AutoMode_Exit_Reason_ReqSignalNo',
91  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 33, 'type':
92  // 'bool', 'order': 'motorola', 'physical_unit': ''}
93  bool automode_exit_reason_reqsignalno(const std::uint8_t* bytes,
94  const int32_t length) const;
95 
96  // config detail: {'description': '0x0:Normal;0x1:Failure', 'offset': 0.0,
97  // 'precision': 1.0, 'len': 1, 'name': 'AutoMode_Exit_Reason_Low_Power',
98  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 34, 'type':
99  // 'bool', 'order': 'motorola', 'physical_unit': ''}
100  bool automode_exit_reason_low_power(const std::uint8_t* bytes,
101  const int32_t length) const;
102 
103  // config detail: {'description': '0x0:Normal;0x1:Failure', 'offset': 0.0,
104  // 'precision': 1.0, 'len': 1, 'name': 'AutoMode_Exit_Reason_HighVolt',
105  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 35, 'type':
106  // 'bool', 'order': 'motorola', 'physical_unit': ''}
107  bool automode_exit_reason_highvolt(const std::uint8_t* bytes,
108  const int32_t length) const;
109 
110  // config detail: {'description': '0x0:Normal;0x1:Failure', 'offset': 0.0,
111  // 'precision': 1.0, 'len': 1, 'name': 'AutoMode_Exit_Reason_Vehicle_Flt',
112  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 36, 'type':
113  // 'bool', 'order': 'motorola', 'physical_unit': ''}
114  bool automode_exit_reason_vehicle_flt(const std::uint8_t* bytes,
115  const int32_t length) const;
116 
117  // config detail: {'description': '0x0:Normal;0x1:Failure', 'offset': 0.0,
118  // 'precision': 1.0, 'len': 1, 'name': 'AutoMode_Exit_Reason_Press_Emerg',
119  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 37, 'type':
120  // 'bool', 'order': 'motorola', 'physical_unit': ''}
121  bool automode_exit_reason_press_emerg(const std::uint8_t* bytes,
122  const int32_t length) const;
123 
124  // config detail: {'description': '0x0:Normal;0x1:Failure', 'offset': 0.0,
125  // 'precision': 1.0, 'len': 1, 'name': 'AutoMode_Exit_Reason_Press_Remot',
126  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 38, 'type':
127  // 'bool', 'order': 'motorola', 'physical_unit': ''}
128  bool automode_exit_reason_press_remot(const std::uint8_t* bytes,
129  const int32_t length) const;
130 
131  // config detail: {'description': '0x0:Normal;0x1:Failure', 'offset': 0.0,
132  // 'precision': 1.0, 'len': 1, 'name': 'AutoMode_Exit_Reason_PDU_Control',
133  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 39, 'type':
134  // 'bool', 'order': 'motorola', 'physical_unit': ''}
135  bool automode_exit_reason_pdu_control(const std::uint8_t* bytes,
136  const int32_t length) const;
137 
138  // config detail: {'name': 'VCU_FaultRept_AliveCounter', 'offset': 0.0,
139  // 'precision': 1.0, 'len': 4, 'is_signed_var': False, 'physical_range':
140  // '[0|0]', 'bit': 51, 'type': 'int', 'order': 'motorola', 'physical_unit':
141  // ''}
142  int vcu_faultrept_alivecounter(const std::uint8_t* bytes,
143  const int32_t length) const;
144 
145  // config detail: {'name': 'VCU_FaultRept_CheckSum', 'offset': 0.0,
146  // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'physical_range':
147  // '[0|0]', 'bit': 63, 'type': 'int', 'order': 'motorola', 'physical_unit':
148  // ''}
149  int vcu_faultrept_checksum(const std::uint8_t* bytes,
150  const int32_t length) const;
151 };
152 
153 } // namespace neolix_edu
154 } // namespace canbus
155 } // namespace apollo
static const int32_t ID
Definition: vcu_vehicle_fault_response_201.h:30
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
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override
Definition: vcu_vehicle_fault_response_201.h:26
The class of ProtocolData.