Apollo 10.0
自动驾驶开放平台
accel_cmd_100.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 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/lexus/proto/lexus.pb.h"
21
22namespace apollo {
23namespace canbus {
24namespace lexus {
25
27 ::apollo::canbus::Lexus> {
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: {'name': 'IGNORE_OVERRIDES', 'offset': 0.0,
40 // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
41 // '[0|1]', 'bit': 1, 'type': 'bool', 'order': 'motorola', 'physical_unit':
42 // ''}
43 Accelcmd100* set_ignore_overrides(bool ignore_overrides);
44
45 // config detail: {'name': 'ENABLE', 'offset': 0.0, 'precision': 1.0, 'len':
46 // 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 0, 'type':
47 // 'bool', 'order': 'motorola', 'physical_unit': ''}
48 Accelcmd100* set_enable(bool enable);
49
50 // config detail: {'name': 'CLEAR_OVERRIDE', 'offset': 0.0, 'precision': 1.0,
51 // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 2,
52 // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
53 Accelcmd100* set_clear_override(bool clear_override);
54
55 // config detail: {'name': 'CLEAR_FAULTS', 'offset': 0.0, 'precision': 1.0,
56 // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 3,
57 // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
58 Accelcmd100* set_clear_faults(bool clear_faults);
59
60 // config detail: {'name': 'ACCEL_CMD', 'offset': 0.0, 'precision': 0.001,
61 // 'len': 16, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 15,
62 // 'type': 'double', 'order': 'motorola', 'physical_unit': ''}
63 Accelcmd100* set_accel_cmd(double accel_cmd);
64
65 private:
66 // config detail: {'name': 'IGNORE_OVERRIDES', 'offset': 0.0,
67 // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
68 // '[0|1]', 'bit': 1, 'type': 'bool', 'order': 'motorola', 'physical_unit':
69 // ''}
70 void set_p_ignore_overrides(uint8_t* data, bool ignore_overrides);
71
72 // config detail: {'name': 'ENABLE', 'offset': 0.0, 'precision': 1.0, 'len':
73 // 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 0, 'type':
74 // 'bool', 'order': 'motorola', 'physical_unit': ''}
75 void set_p_enable(uint8_t* data, bool enable);
76
77 // config detail: {'name': 'CLEAR_OVERRIDE', 'offset': 0.0, 'precision': 1.0,
78 // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 2,
79 // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
80 void set_p_clear_override(uint8_t* data, bool clear_override);
81
82 // config detail: {'name': 'CLEAR_FAULTS', 'offset': 0.0, 'precision': 1.0,
83 // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 3,
84 // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
85 void set_p_clear_faults(uint8_t* data, bool clear_faults);
86
87 // config detail: {'name': 'ACCEL_CMD', 'offset': 0.0, 'precision': 0.001,
88 // 'len': 16, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 15,
89 // 'type': 'double', 'order': 'motorola', 'physical_unit': ''}
90 void set_p_accel_cmd(uint8_t* data, double accel_cmd);
91
92 private:
93 bool ignore_overrides_;
94 bool enable_;
95 bool clear_override_;
96 bool clear_faults_;
97 double accel_cmd_;
98};
99
100} // namespace lexus
101} // namespace canbus
102} // namespace apollo
Accelcmd100 * set_ignore_overrides(bool ignore_overrides)
Accelcmd100 * set_accel_cmd(double accel_cmd)
uint32_t GetPeriod() const override
Accelcmd100 * set_enable(bool enable)
Accelcmd100 * set_clear_override(bool clear_override)
void UpdateData(uint8_t *data) override
Accelcmd100 * set_clear_faults(bool clear_faults)
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData