Apollo 10.0
自动驾驶开放平台
ads_brake_command_46.h
浏览该文件的文档.
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_vehicle/neolix_edu/proto/neolix_edu.pb.h"
20
22
23namespace apollo {
24namespace canbus {
25namespace neolix_edu {
26
28 ::apollo::canbus::Neolix_edu> {
29 public:
30 static const int32_t ID;
31
33
34 uint32_t GetPeriod() const override;
35
36 void Parse(const std::uint8_t* bytes, int32_t length,
37 Neolix_edu* chassis) const override;
38
39 void UpdateData(uint8_t* data) override;
40
41 void Reset() override;
42
43 // config detail: {'description': '0x0:disable ;0x1:enable', 'offset': 0.0,
44 // 'precision': 1.0, 'len': 1, 'name': 'Drive_Enable', 'is_signed_var': False,
45 // 'physical_range': '[0|0]', 'bit': 0, 'type': 'bool', 'order': 'motorola',
46 // 'physical_unit': ''}
47 Adsbrakecommand46* set_drive_enable(bool drive_enable);
48
49 // config detail: {'name': 'AUTO_Brake_Command', 'offset': 0.0,
50 // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'physical_range':
51 // '[0|0]', 'bit': 23, 'type': 'int', 'order': 'motorola', 'physical_unit':
52 // ''}
53 Adsbrakecommand46* set_auto_brake_command(int auto_brake_command);
54
55 // config detail: {'description': '0x0:Release ;0x1:Apply ', 'offset': 0.0,
56 // 'precision': 1.0, 'len': 1, 'name': 'AUTO_Parking_Command',
57 // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 24, 'type':
58 // 'bool', 'order': 'motorola', 'physical_unit': ''}
59 Adsbrakecommand46* set_auto_parking_command(bool auto_parking_command);
60
61 // config detail: {'description': '0x0:off;0x1:on', 'offset': 0.0,
62 // 'precision': 1.0, 'len': 1, 'name': 'EPB_RampAuxiliaryCommand',
63 // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 25, 'type':
64 // 'bool', 'order': 'motorola', 'physical_unit': ''}
66 bool epb_rampauxiliarycommand);
67
68 // config detail: {'name': 'AUTO_DriverCmd_AliveCounter', 'offset': 0.0,
69 // 'precision': 1.0, 'len': 4, 'is_signed_var': False, 'physical_range':
70 // '[0|0]', 'bit': 51, 'type': 'int', 'order': 'motorola', 'physical_unit':
71 // ''}
73 int auto_drivercmd_alivecounter);
74
75 // config detail: {'name': 'AUTO_DriverCmd_CheckSum', 'offset': 0.0,
76 // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'physical_range':
77 // '[0|0]', 'bit': 63, 'type': 'int', 'order': 'motorola', 'physical_unit':
78 // ''}
79 Adsbrakecommand46* set_auto_drivercmd_checksum(int auto_drivercmd_checksum);
80
81 private:
82 // config detail: {'description': '0x0:disable ;0x1:enable', 'offset': 0.0,
83 // 'precision': 1.0, 'len': 1, 'name': 'Drive_Enable', 'is_signed_var': False,
84 // 'physical_range': '[0|0]', 'bit': 0, 'type': 'bool', 'order': 'motorola',
85 // 'physical_unit': ''}
86 void set_p_drive_enable(uint8_t* data, bool drive_enable);
87
88 // config detail: {'name': 'AUTO_Brake_Command', 'offset': 0.0,
89 // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'physical_range':
90 // '[0|0]', 'bit': 23, 'type': 'int', 'order': 'motorola', 'physical_unit':
91 // ''}
92 void set_p_auto_brake_command(uint8_t* data, int auto_brake_command);
93
94 // config detail: {'description': '0x0:Release ;0x1:Apply ', 'offset': 0.0,
95 // 'precision': 1.0, 'len': 1, 'name': 'AUTO_Parking_Command',
96 // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 24, 'type':
97 // 'bool', 'order': 'motorola', 'physical_unit': ''}
98 void set_p_auto_parking_command(uint8_t* data, bool auto_parking_command);
99
100 // config detail: {'description': '0x0:off;0x1:on', 'offset': 0.0,
101 // 'precision': 1.0, 'len': 1, 'name': 'EPB_RampAuxiliaryCommand',
102 // 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 25, 'type':
103 // 'bool', 'order': 'motorola', 'physical_unit': ''}
104 void set_p_epb_rampauxiliarycommand(uint8_t* data,
105 bool epb_rampauxiliarycommand);
106
107 // config detail: {'name': 'AUTO_DriverCmd_AliveCounter', 'offset': 0.0,
108 // 'precision': 1.0, 'len': 4, 'is_signed_var': False, 'physical_range':
109 // '[0|0]', 'bit': 51, 'type': 'int', 'order': 'motorola', 'physical_unit':
110 // ''}
111 void set_p_auto_drivercmd_alivecounter(uint8_t* data,
112 int auto_drivercmd_alivecounter);
113
114 // config detail: {'name': 'AUTO_DriverCmd_CheckSum', 'offset': 0.0,
115 // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'physical_range':
116 // '[0|0]', 'bit': 63, 'type': 'int', 'order': 'motorola', 'physical_unit':
117 // ''}
118 void set_p_auto_drivercmd_checksum(uint8_t* data,
119 int auto_drivercmd_checksum);
120
121 bool drive_enable(const std::uint8_t* bytes, const int32_t length) const;
122
123 bool auto_parking_command(const std::uint8_t* bytes, int32_t length) const;
124
125 int32_t auto_brake_command(const std::uint8_t* bytes, int32_t length) const;
126
127 private:
128 bool drive_enable_;
129 int auto_brake_command_;
130 bool auto_parking_command_;
131 bool epb_rampauxiliarycommand_;
132 int auto_drivercmd_alivecounter_;
133 int auto_drivercmd_checksum_;
134};
135
136} // namespace neolix_edu
137} // namespace canbus
138} // namespace apollo
Adsbrakecommand46 * set_auto_drivercmd_alivecounter(int auto_drivercmd_alivecounter)
Adsbrakecommand46 * set_auto_brake_command(int auto_brake_command)
Adsbrakecommand46 * set_epb_rampauxiliarycommand(bool epb_rampauxiliarycommand)
Adsbrakecommand46 * set_drive_enable(bool drive_enable)
Adsbrakecommand46 * set_auto_parking_command(bool auto_parking_command)
void Parse(const std::uint8_t *bytes, int32_t length, Neolix_edu *chassis) const override
Adsbrakecommand46 * set_auto_drivercmd_checksum(int auto_drivercmd_checksum)
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData