Apollo  6.0
Open source self driving car software
ads_eps_command_56.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  Adsepscommand56* set_drive_enable(bool drive_enable);
44 
45  // config detail: {'name': 'AUTO_Target_Angle', 'offset': -2048.0,
46  // 'precision': 0.0625, 'len': 16, 'is_signed_var': False, 'physical_range':
47  // '[0|0]', 'bit': 23, 'type': 'double', 'order': 'motorola', 'physical_unit':
48  // ''}
49  Adsepscommand56* set_auto_target_angle(double auto_target_angle);
50 
51  // config detail: {'name': 'AUTO_DriverCmd_AliveCounter', 'offset': 0.0,
52  // 'precision': 1.0, 'len': 4, 'is_signed_var': False, 'physical_range':
53  // '[0|0]', 'bit': 51, 'type': 'int', 'order': 'motorola', 'physical_unit':
54  // ''}
56  int auto_drivercmd_alivecounter);
57 
58  // config detail: {'name': 'AUTO_DriverCmd_CheckSum', 'offset': 0.0,
59  // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'physical_range':
60  // '[0|0]', 'bit': 63, 'type': 'int', 'order': 'motorola', 'physical_unit':
61  // ''}
62  Adsepscommand56* set_auto_drivercmd_checksum(int auto_drivercmd_checksum);
63 
64  private:
65  // config detail: {'description': '0x0:disable ;0x1:enable', 'offset': 0.0,
66  // 'precision': 1.0, 'len': 1, 'name': 'Drive_Enable', 'is_signed_var': False,
67  // 'physical_range': '[0|0]', 'bit': 0, 'type': 'bool', 'order': 'motorola',
68  // 'physical_unit': ''}
69  void set_p_drive_enable(uint8_t* data, bool drive_enable);
70 
71  // config detail: {'name': 'AUTO_Target_Angle', 'offset': -2048.0,
72  // 'precision': 0.0625, 'len': 16, 'is_signed_var': False, 'physical_range':
73  // '[0|0]', 'bit': 23, 'type': 'double', 'order': 'motorola', 'physical_unit':
74  // ''}
75  void set_p_auto_target_angle(uint8_t* data, double auto_target_angle);
76 
77  // config detail: {'name': 'AUTO_DriverCmd_AliveCounter', 'offset': 0.0,
78  // 'precision': 1.0, 'len': 4, 'is_signed_var': False, 'physical_range':
79  // '[0|0]', 'bit': 51, 'type': 'int', 'order': 'motorola', 'physical_unit':
80  // ''}
81  void set_p_auto_drivercmd_alivecounter(uint8_t* data,
82  int auto_drivercmd_alivecounter);
83 
84  // config detail: {'name': 'AUTO_DriverCmd_CheckSum', 'offset': 0.0,
85  // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'physical_range':
86  // '[0|0]', 'bit': 63, 'type': 'int', 'order': 'motorola', 'physical_unit':
87  // ''}
88  void set_p_auto_drivercmd_checksum(uint8_t* data,
89  int auto_drivercmd_checksum);
90 
91  private:
92  bool drive_enable_;
93  double auto_target_angle_;
94  int auto_drivercmd_alivecounter_;
95  int auto_drivercmd_checksum_;
96 };
97 
98 } // namespace neolix_edu
99 } // namespace canbus
100 } // 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_eps_command_56.h:29
Adsepscommand56 * set_drive_enable(bool drive_enable)
void UpdateData(uint8_t *data) override
Adsepscommand56 * set_auto_drivercmd_checksum(int auto_drivercmd_checksum)
Definition: ads_eps_command_56.h:26
Adsepscommand56 * set_auto_target_angle(double auto_target_angle)
The class of ProtocolData.
Adsepscommand56 * set_auto_drivercmd_alivecounter(int auto_drivercmd_alivecounter)