Apollo  6.0
Open source self driving car software
cruise_control_buttons_cmd_108.h
Go to the documentation of this file.
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/proto/chassis_detail.pb.h"
21 
22 namespace apollo {
23 namespace canbus {
24 namespace lexus {
25 
28  ::apollo::canbus::ChassisDetail> {
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: {'name': 'CRUISE_CONTROL_BUTTON', 'enum': {0:
41  // 'CRUISE_CONTROL_BUTTON_CRUISE_CONTROL_NONE', 1:
42  // 'CRUISE_CONTROL_BUTTON_CRUISE_CONTROL_CNCL', 2:
43  // 'CRUISE_CONTROL_BUTTON_CRUISE_CONTROL_ACC_FURTHER', 3:
44  // 'CRUISE_CONTROL_BUTTON_CRUISE_CONTROL_ACC_CLOSER', 4:
45  // 'CRUISE_CONTROL_BUTTON_CRUISE_CONTROL_SET_DEC', 5:
46  // 'CRUISE_CONTROL_BUTTON_CRUISE_CONTROL_RES_INC', 6:
47  // 'CRUISE_CONTROL_BUTTON_CRUISE_CONTROL_ON_OFF'}, 'precision': 1.0, 'len': 8,
48  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|255]', 'bit':
49  // 15, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
51  Cruise_control_buttons_cmd_108::Cruise_control_buttonType
52  cruise_control_button);
53 
54  // config detail: {'name': 'IGNORE_OVERRIDES', 'offset': 0.0,
55  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
56  // '[0|1]', 'bit': 1, 'type': 'bool', 'order': 'motorola', 'physical_unit':
57  // ''}
58  Cruisecontrolbuttonscmd108* set_ignore_overrides(bool ignore_overrides);
59 
60  // config detail: {'name': 'CLEAR_OVERRIDE', 'offset': 0.0, 'precision': 1.0,
61  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 2,
62  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
63  Cruisecontrolbuttonscmd108* set_clear_override(bool clear_override);
64 
65  // config detail: {'name': 'ENABLE', 'offset': 0.0, 'precision': 1.0, 'len':
66  // 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 0, 'type':
67  // 'bool', 'order': 'motorola', 'physical_unit': ''}
69 
70  // config detail: {'name': 'CLEAR_FAULTS', 'offset': 0.0, 'precision': 1.0,
71  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 3,
72  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
73  Cruisecontrolbuttonscmd108* set_clear_faults(bool clear_faults);
74 
75  private:
76  // config detail: {'name': 'CRUISE_CONTROL_BUTTON', 'enum': {0:
77  // 'CRUISE_CONTROL_BUTTON_CRUISE_CONTROL_NONE', 1:
78  // 'CRUISE_CONTROL_BUTTON_CRUISE_CONTROL_CNCL', 2:
79  // 'CRUISE_CONTROL_BUTTON_CRUISE_CONTROL_ACC_FURTHER', 3:
80  // 'CRUISE_CONTROL_BUTTON_CRUISE_CONTROL_ACC_CLOSER', 4:
81  // 'CRUISE_CONTROL_BUTTON_CRUISE_CONTROL_SET_DEC', 5:
82  // 'CRUISE_CONTROL_BUTTON_CRUISE_CONTROL_RES_INC', 6:
83  // 'CRUISE_CONTROL_BUTTON_CRUISE_CONTROL_ON_OFF'}, 'precision': 1.0, 'len': 8,
84  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|255]', 'bit':
85  // 15, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
86  void set_p_cruise_control_button(
87  uint8_t* data, Cruise_control_buttons_cmd_108::Cruise_control_buttonType
88  cruise_control_button);
89 
90  // config detail: {'name': 'IGNORE_OVERRIDES', 'offset': 0.0,
91  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
92  // '[0|1]', 'bit': 1, 'type': 'bool', 'order': 'motorola', 'physical_unit':
93  // ''}
94  void set_p_ignore_overrides(uint8_t* data, bool ignore_overrides);
95 
96  // config detail: {'name': 'CLEAR_OVERRIDE', 'offset': 0.0, 'precision': 1.0,
97  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 2,
98  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
99  void set_p_clear_override(uint8_t* data, bool clear_override);
100 
101  // config detail: {'name': 'ENABLE', 'offset': 0.0, 'precision': 1.0, 'len':
102  // 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 0, 'type':
103  // 'bool', 'order': 'motorola', 'physical_unit': ''}
104  void set_p_enable(uint8_t* data, bool enable);
105 
106  // config detail: {'name': 'CLEAR_FAULTS', 'offset': 0.0, 'precision': 1.0,
107  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 3,
108  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
109  void set_p_clear_faults(uint8_t* data, bool clear_faults);
110 
111  private:
112  Cruise_control_buttons_cmd_108::Cruise_control_buttonType
113  cruise_control_button_;
114  bool ignore_overrides_;
115  bool clear_override_;
116  bool enable_;
117  bool clear_faults_;
118 };
119 
120 } // namespace lexus
121 } // namespace canbus
122 } // 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
Cruisecontrolbuttonscmd108 * set_clear_override(bool clear_override)
static const int32_t ID
Definition: cruise_control_buttons_cmd_108.h:30
Cruisecontrolbuttonscmd108 * set_enable(bool enable)
Definition: cruise_control_buttons_cmd_108.h:26
Cruisecontrolbuttonscmd108 * set_cruise_control_button(Cruise_control_buttons_cmd_108::Cruise_control_buttonType cruise_control_button)
The class of ProtocolData.
Cruisecontrolbuttonscmd108 * set_ignore_overrides(bool ignore_overrides)
Cruisecontrolbuttonscmd108 * set_clear_faults(bool clear_faults)