Apollo  6.0
Open source self driving car software
ads_brake_command_46.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;
30 
32 
33  uint32_t GetPeriod() const override;
34 
35  void UpdateData(uint8_t* data) override;
36 
37  void Reset() override;
38 
39  // config detail: {'description': '0x0:disable ;0x1:enable', 'offset': 0.0,
40  // 'precision': 1.0, 'len': 1, 'name': 'Drive_Enable', 'is_signed_var': False,
41  // 'physical_range': '[0|0]', 'bit': 0, 'type': 'bool', 'order': 'motorola',
42  // 'physical_unit': ''}
43  Adsbrakecommand46* set_drive_enable(bool drive_enable);
44 
45  // config detail: {'name': 'AUTO_Brake_Command', 'offset': 0.0,
46  // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'physical_range':
47  // '[0|0]', 'bit': 23, 'type': 'int', 'order': 'motorola', 'physical_unit':
48  // ''}
49  Adsbrakecommand46* set_auto_brake_command(int auto_brake_command);
50 
51  // config detail: {'description': '0x0:Release ;0x1:Apply ', 'offset': 0.0,
52  // 'precision': 1.0, 'len': 1, 'name': 'AUTO_Parking_Command',
53  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 24, 'type':
54  // 'bool', 'order': 'motorola', 'physical_unit': ''}
55  Adsbrakecommand46* set_auto_parking_command(bool auto_parking_command);
56 
57  // config detail: {'description': '0x0:off;0x1:on', 'offset': 0.0,
58  // 'precision': 1.0, 'len': 1, 'name': 'EPB_RampAuxiliaryCommand',
59  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 25, 'type':
60  // 'bool', 'order': 'motorola', 'physical_unit': ''}
62  bool epb_rampauxiliarycommand);
63 
64  // config detail: {'name': 'AUTO_DriverCmd_AliveCounter', 'offset': 0.0,
65  // 'precision': 1.0, 'len': 4, 'is_signed_var': False, 'physical_range':
66  // '[0|0]', 'bit': 51, 'type': 'int', 'order': 'motorola', 'physical_unit':
67  // ''}
69  int auto_drivercmd_alivecounter);
70 
71  // config detail: {'name': 'AUTO_DriverCmd_CheckSum', 'offset': 0.0,
72  // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'physical_range':
73  // '[0|0]', 'bit': 63, 'type': 'int', 'order': 'motorola', 'physical_unit':
74  // ''}
75  Adsbrakecommand46* set_auto_drivercmd_checksum(int auto_drivercmd_checksum);
76 
77  private:
78  // config detail: {'description': '0x0:disable ;0x1:enable', 'offset': 0.0,
79  // 'precision': 1.0, 'len': 1, 'name': 'Drive_Enable', 'is_signed_var': False,
80  // 'physical_range': '[0|0]', 'bit': 0, 'type': 'bool', 'order': 'motorola',
81  // 'physical_unit': ''}
82  void set_p_drive_enable(uint8_t* data, bool drive_enable);
83 
84  // config detail: {'name': 'AUTO_Brake_Command', 'offset': 0.0,
85  // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'physical_range':
86  // '[0|0]', 'bit': 23, 'type': 'int', 'order': 'motorola', 'physical_unit':
87  // ''}
88  void set_p_auto_brake_command(uint8_t* data, int auto_brake_command);
89 
90  // config detail: {'description': '0x0:Release ;0x1:Apply ', 'offset': 0.0,
91  // 'precision': 1.0, 'len': 1, 'name': 'AUTO_Parking_Command',
92  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 24, 'type':
93  // 'bool', 'order': 'motorola', 'physical_unit': ''}
94  void set_p_auto_parking_command(uint8_t* data, bool auto_parking_command);
95 
96  // config detail: {'description': '0x0:off;0x1:on', 'offset': 0.0,
97  // 'precision': 1.0, 'len': 1, 'name': 'EPB_RampAuxiliaryCommand',
98  // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 25, 'type':
99  // 'bool', 'order': 'motorola', 'physical_unit': ''}
100  void set_p_epb_rampauxiliarycommand(uint8_t* data,
101  bool epb_rampauxiliarycommand);
102 
103  // config detail: {'name': 'AUTO_DriverCmd_AliveCounter', 'offset': 0.0,
104  // 'precision': 1.0, 'len': 4, 'is_signed_var': False, 'physical_range':
105  // '[0|0]', 'bit': 51, 'type': 'int', 'order': 'motorola', 'physical_unit':
106  // ''}
107  void set_p_auto_drivercmd_alivecounter(uint8_t* data,
108  int auto_drivercmd_alivecounter);
109 
110  // config detail: {'name': 'AUTO_DriverCmd_CheckSum', 'offset': 0.0,
111  // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'physical_range':
112  // '[0|0]', 'bit': 63, 'type': 'int', 'order': 'motorola', 'physical_unit':
113  // ''}
114  void set_p_auto_drivercmd_checksum(uint8_t* data,
115  int auto_drivercmd_checksum);
116 
117  private:
118  bool drive_enable_;
119  int auto_brake_command_;
120  bool auto_parking_command_;
121  bool epb_rampauxiliarycommand_;
122  int auto_drivercmd_alivecounter_;
123  int auto_drivercmd_checksum_;
124 };
125 
126 } // namespace neolix_edu
127 } // namespace canbus
128 } // 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
static const int32_t ID
Definition: ads_brake_command_46.h:29
void UpdateData(uint8_t *data) override
Adsbrakecommand46 * set_drive_enable(bool drive_enable)
Adsbrakecommand46 * set_auto_drivercmd_alivecounter(int auto_drivercmd_alivecounter)
Adsbrakecommand46 * set_auto_parking_command(bool auto_parking_command)
Adsbrakecommand46 * set_auto_brake_command(int auto_brake_command)
Adsbrakecommand46 * set_epb_rampauxiliarycommand(bool epb_rampauxiliarycommand)
The class of ProtocolData.
Definition: ads_brake_command_46.h:26
Adsbrakecommand46 * set_auto_drivercmd_checksum(int auto_drivercmd_checksum)