Apollo  6.0
Open source self driving car software
vcu_brake_report_47.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:disable;0x1:enable', 'offset': 0.0,
36  // 'precision': 1.0, 'len': 1, 'name': 'Brake_Enable_Resp', 'is_signed_var':
37  // False, 'physical_range': '[0|0]', 'bit': 0, 'type': 'bool', 'order':
38  // 'motorola', 'physical_unit': ''}
39  bool brake_enable_resp(const std::uint8_t* bytes, const int32_t length) const;
40 
41  // config detail: {'description': '0x0:Standby;0x1:auto drive;0x2:net
42  // drive;0x3:remote control;0x4:emergency brake;0x5~0x7:Reserved', 'enum': {0:
43  // 'CONTROL_MODE_RESP_STANDBY', 1: 'CONTROL_MODE_RESP_AUTO_DRIVE', 2:
44  // 'CONTROL_MODE_RESP_NET_DRIVE', 3: 'CONTROL_MODE_RESP_REMOTE_CONTROL', 4:
45  // 'CONTROL_MODE_RESP_EMERGENCY_BRAKE'}, 'precision': 1.0, 'len': 3, 'name':
46  // 'Control_Mode_Resp', 'is_signed_var': False, 'offset': 0.0,
47  // 'physical_range': '[0|7]', 'bit': 6, 'type': 'enum', 'order': 'motorola',
48  // 'physical_unit': 'bit'}
49  Vcu_brake_report_47::Control_mode_respType control_mode_resp(
50  const std::uint8_t* bytes, const int32_t length) const;
51 
52  // config detail: {'description': '0x0:disable;0x1:enable', 'offset': 0.0,
53  // 'precision': 1.0, 'len': 1, 'name': 'VCU_Real_Brake_Valid',
54  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 7, 'type':
55  // 'bool', 'order': 'motorola', 'physical_unit': ''}
56  bool vcu_real_brake_valid(const std::uint8_t* bytes,
57  const int32_t length) const;
58 
59  // config detail: {'name': 'VCU_Real_Brake', 'offset': 0.0, 'precision': 1.0,
60  // 'len': 8, 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 15,
61  // 'type': 'int', 'order': 'motorola', 'physical_unit': ''}
62  int vcu_real_brake(const std::uint8_t* bytes, const int32_t length) const;
63 
64  // config detail: {'description':
65  // '0x0:EPB_Released;0x1:EPB_Applied;0x2:EPB_Releasing;0x3:EPB_Fault;0x4:EPB_Applying',
66  // 'offset': 0.0, 'precision': 1.0, 'len': 3, 'name':
67  // 'VCU_Real_Parking_Status', 'is_signed_var': False, 'physical_range':
68  // '[0|0]', 'bit': 18, 'type': 'int', 'order': 'motorola', 'physical_unit':
69  // ''}
70  int vcu_real_parking_status(const std::uint8_t* bytes,
71  const int32_t length) const;
72 
73  // config detail: {'description': '0x0:disable;0x1:enable', 'offset': 0.0,
74  // 'precision': 1.0, 'len': 1, 'name': 'VCU_Real_Parking_Valid',
75  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 19, 'type':
76  // 'bool', 'order': 'motorola', 'physical_unit': ''}
77  bool vcu_real_parking_valid(const std::uint8_t* bytes,
78  const int32_t length) const;
79 
80  // config detail: {'description': '0x0:off;0x1:on', 'offset': 0.0,
81  // 'precision': 1.0, 'len': 1, 'name': 'RampAuxiliaryIndication',
82  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 20, 'type':
83  // 'bool', 'order': 'motorola', 'physical_unit': ''}
84  bool rampauxiliaryindication(const std::uint8_t* bytes,
85  const int32_t length) const;
86 
87  // config detail: {'name': 'VehicleSlope', 'offset': 0.0, 'precision':
88  // 0.1758125, 'len': 8, 'is_signed_var': False, 'physical_range': '[0|45]',
89  // 'bit': 31, 'type': 'double', 'order': 'motorola', 'physical_unit':
90  // '\xc2\xb0'}
91  double vehicleslope(const std::uint8_t* bytes, const int32_t length) const;
92 
93  // config detail: {'name': 'VCU_BrakeRept_AliveCounter', 'offset': 0.0,
94  // 'precision': 1.0, 'len': 4, 'is_signed_var': False, 'physical_range':
95  // '[0|0]', 'bit': 51, 'type': 'int', 'order': 'motorola', 'physical_unit':
96  // ''}
97  int vcu_brakerept_alivecounter(const std::uint8_t* bytes,
98  const int32_t length) const;
99 
100  // config detail: {'name': 'VCU_BrakeRept_CheckSum', 'offset': 0.0,
101  // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'physical_range':
102  // '[0|0]', 'bit': 63, 'type': 'int', 'order': 'motorola', 'physical_unit':
103  // ''}
104  int vcu_brakerept_checksum(const std::uint8_t* bytes,
105  const int32_t length) const;
106 };
107 
108 } // namespace neolix_edu
109 } // namespace canbus
110 } // namespace apollo
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override
static const int32_t ID
Definition: vcu_brake_report_47.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
The class of ProtocolData.
Definition: vcu_brake_report_47.h:26