Apollo 10.0
自动驾驶开放平台
throttle_command_110.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2019 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
20#include "modules/canbus_vehicle/ch/proto/ch.pb.h"
22
23namespace apollo {
24namespace canbus {
25namespace ch {
26
28 ::apollo::canbus::Ch> {
29 public:
30 static const int32_t ID;
31
33
34 uint32_t GetPeriod() const override;
35
36 void UpdateData(uint8_t* data) override;
37
38 void Reset() override;
39
40 // config detail: {'bit': 0, 'description': 'throttle pedal enable
41 // bit(Command)', 'enum': {0: 'THROTTLE_PEDAL_EN_CTRL_DISABLE', 1:
42 // 'THROTTLE_PEDAL_EN_CTRL_ENABLE'}, 'is_signed_var': False, 'len': 8, 'name':
43 // 'THROTTLE_PEDAL_EN_CTRL', 'offset': 0.0, 'order': 'intel',
44 // 'physical_range': '[0|1]', 'physical_unit': '', 'precision': 1.0, 'type':
45 // 'enum'}
48
49 // config detail: {'bit': 8, 'description': 'Percentage of throttle
50 // pedal(Command)', 'is_signed_var': False, 'len': 8, 'name':
51 // 'THROTTLE_PEDAL_CMD', 'offset': 0.0, 'order': 'intel', 'physical_range':
52 // '[0|100]', 'physical_unit': '%', 'precision': 1.0, 'type': 'int'}
53 Throttlecommand110* set_throttle_pedal_cmd(int throttle_pedal_cmd);
54
55 private:
56 // config detail: {'bit': 0, 'description': 'throttle pedal enable
57 // bit(Command)', 'enum': {0: 'THROTTLE_PEDAL_EN_CTRL_DISABLE', 1:
58 // 'THROTTLE_PEDAL_EN_CTRL_ENABLE'}, 'is_signed_var': False, 'len': 8, 'name':
59 // 'THROTTLE_PEDAL_EN_CTRL', 'offset': 0.0, 'order': 'intel',
60 // 'physical_range': '[0|1]', 'physical_unit': '', 'precision': 1.0, 'type':
61 // 'enum'}
62 void set_p_throttle_pedal_en_ctrl(
63 uint8_t* data,
65
66 // config detail: {'bit': 8, 'description': 'Percentage of throttle
67 // pedal(Command)', 'is_signed_var': False, 'len': 8, 'name':
68 // 'THROTTLE_PEDAL_CMD', 'offset': 0.0, 'order': 'intel', 'physical_range':
69 // '[0|100]', 'physical_unit': '%', 'precision': 1.0, 'type': 'int'}
70 void set_p_throttle_pedal_cmd(uint8_t* data, int throttle_pedal_cmd);
71
72 private:
74 int throttle_pedal_cmd_;
75};
76
77} // namespace ch
78} // namespace canbus
79} // namespace apollo
Throttlecommand110 * set_throttle_pedal_cmd(int throttle_pedal_cmd)
Throttlecommand110 * set_throttle_pedal_en_ctrl(Throttle_command_110::Throttle_pedal_en_ctrlType throttle_pedal_en_ctrl)
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData