Apollo  6.0
Open source self driving car software
cruise_control_buttons_rpt_208.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;
32  void Parse(const std::uint8_t* bytes, int32_t length,
33  ChassisDetail* chassis) const override;
34 
35  private:
36  // config detail: {'name': 'OUTPUT_VALUE', 'enum': {0:
37  // 'OUTPUT_VALUE_CRUISE_CONTROL_NONE', 1: 'OUTPUT_VALUE_CRUISE_CONTROL_CNCL',
38  // 2: 'OUTPUT_VALUE_CRUISE_CONTROL_ACC_FURTHER', 3:
39  // 'OUTPUT_VALUE_CRUISE_CONTROL_ACC_CLOSER', 4:
40  // 'OUTPUT_VALUE_CRUISE_CONTROL_SET_DEC', 5:
41  // 'OUTPUT_VALUE_CRUISE_CONTROL_RES_INC', 6:
42  // 'OUTPUT_VALUE_CRUISE_CONTROL_ON_OFF'}, 'precision': 1.0, 'len': 8,
43  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|255]', 'bit':
44  // 31, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
45  Cruise_control_buttons_rpt_208::Output_valueType output_value(
46  const std::uint8_t* bytes, const int32_t length) const;
47 
48  // config detail: {'name': 'MANUAL_INPUT', 'enum': {0:
49  // 'MANUAL_INPUT_CRUISE_CONTROL_NONE', 1: 'MANUAL_INPUT_CRUISE_CONTROL_CNCL',
50  // 2: 'MANUAL_INPUT_CRUISE_CONTROL_ACC_FURTHER', 3:
51  // 'MANUAL_INPUT_CRUISE_CONTROL_ACC_CLOSER', 4:
52  // 'MANUAL_INPUT_CRUISE_CONTROL_SET_DEC', 5:
53  // 'MANUAL_INPUT_CRUISE_CONTROL_RES_INC', 6:
54  // 'MANUAL_INPUT_CRUISE_CONTROL_ON_OFF'}, 'precision': 1.0, 'len': 8,
55  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|255]', 'bit':
56  // 15, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
57  Cruise_control_buttons_rpt_208::Manual_inputType manual_input(
58  const std::uint8_t* bytes, const int32_t length) const;
59 
60  // config detail: {'name': 'COMMANDED_VALUE', 'enum': {0:
61  // 'COMMANDED_VALUE_CRUISE_CONTROL_NONE', 1:
62  // 'COMMANDED_VALUE_CRUISE_CONTROL_CNCL', 2:
63  // 'COMMANDED_VALUE_CRUISE_CONTROL_ACC_FURTHER', 3:
64  // 'COMMANDED_VALUE_CRUISE_CONTROL_ACC_CLOSER', 4:
65  // 'COMMANDED_VALUE_CRUISE_CONTROL_SET_DEC', 5:
66  // 'COMMANDED_VALUE_CRUISE_CONTROL_RES_INC', 6:
67  // 'COMMANDED_VALUE_CRUISE_CONTROL_ON_OFF'}, 'precision': 1.0, 'len': 8,
68  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|255]', 'bit':
69  // 23, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
70  Cruise_control_buttons_rpt_208::Commanded_valueType commanded_value(
71  const std::uint8_t* bytes, const int32_t length) const;
72 
73  // config detail: {'name': 'VEHICLE_FAULT', 'offset': 0.0, 'precision': 1.0,
74  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 6,
75  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
76  bool vehicle_fault(const std::uint8_t* bytes, const int32_t length) const;
77 
78  // config detail: {'name': 'PACMOD_FAULT', 'offset': 0.0, 'precision': 1.0,
79  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 5,
80  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
81  bool pacmod_fault(const std::uint8_t* bytes, const int32_t length) const;
82 
83  // config detail: {'name': 'OVERRIDE_ACTIVE', 'offset': 0.0, 'precision': 1.0,
84  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 1,
85  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
86  bool override_active(const std::uint8_t* bytes, const int32_t length) const;
87 
88  // config detail: {'name': 'OUTPUT_REPORTED_FAULT', 'offset': 0.0,
89  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
90  // '[0|1]', 'bit': 4, 'type': 'bool', 'order': 'motorola', 'physical_unit':
91  // ''}
92  bool output_reported_fault(const std::uint8_t* bytes,
93  const int32_t length) const;
94 
95  // config detail: {'name': 'INPUT_OUTPUT_FAULT', 'offset': 0.0,
96  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
97  // '[0|1]', 'bit': 3, 'type': 'bool', 'order': 'motorola', 'physical_unit':
98  // ''}
99  bool input_output_fault(const std::uint8_t* bytes,
100  const int32_t length) const;
101 
102  // config detail: {'name': 'ENABLED', 'offset': 0.0, 'precision': 1.0, 'len':
103  // 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 0, 'type':
104  // 'bool', 'order': 'motorola', 'physical_unit': ''}
105  bool enabled(const std::uint8_t* bytes, const int32_t length) const;
106 
107  // config detail: {'name': 'COMMAND_OUTPUT_FAULT', 'offset': 0.0,
108  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
109  // '[0|1]', 'bit': 2, 'type': 'bool', 'order': 'motorola', 'physical_unit':
110  // ''}
111  bool command_output_fault(const std::uint8_t* bytes,
112  const int32_t length) const;
113 };
114 
115 } // namespace lexus
116 } // namespace canbus
117 } // namespace apollo
static const int32_t ID
Definition: cruise_control_buttons_rpt_208.h:30
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
Definition: cruise_control_buttons_rpt_208.h:26
The class of ProtocolData.
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override