Apollo  6.0
Open source self driving car software
dash_controls_left_rpt_20c.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 
27  ::apollo::canbus::ChassisDetail> {
28  public:
29  static const int32_t ID;
31  void Parse(const std::uint8_t* bytes, int32_t length,
32  ChassisDetail* chassis) const override;
33 
34  private:
35  // config detail: {'name': 'OUTPUT_VALUE', 'enum': {0:
36  // 'OUTPUT_VALUE_DASH_CONTROL_NONE', 1: 'OUTPUT_VALUE_DASH_CONTROL_OK', 2:
37  // 'OUTPUT_VALUE_DASH_CONTROL_LEFT', 3: 'OUTPUT_VALUE_DASH_CONTROL_RIGHT', 4:
38  // 'OUTPUT_VALUE_DASH_CONTROL_UP', 5: 'OUTPUT_VALUE_DASH_CONTROL_DOWN'},
39  // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'offset': 0.0,
40  // 'physical_range': '[0|255]', 'bit': 31, 'type': 'enum', 'order':
41  // 'motorola', 'physical_unit': ''}
42  Dash_controls_left_rpt_20c::Output_valueType output_value(
43  const std::uint8_t* bytes, const int32_t length) const;
44 
45  // config detail: {'name': 'COMMANDED_VALUE', 'enum': {0:
46  // 'COMMANDED_VALUE_DASH_CONTROL_NONE', 1: 'COMMANDED_VALUE_DASH_CONTROL_OK',
47  // 2: 'COMMANDED_VALUE_DASH_CONTROL_LEFT', 3:
48  // 'COMMANDED_VALUE_DASH_CONTROL_RIGHT', 4: 'COMMANDED_VALUE_DASH_CONTROL_UP',
49  // 5: 'COMMANDED_VALUE_DASH_CONTROL_DOWN'}, 'precision': 1.0, 'len': 8,
50  // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|255]', 'bit':
51  // 23, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
52  Dash_controls_left_rpt_20c::Commanded_valueType commanded_value(
53  const std::uint8_t* bytes, const int32_t length) const;
54 
55  // config detail: {'name': 'MANUAL_INPUT', 'enum': {0:
56  // 'MANUAL_INPUT_DASH_CONTROL_NONE', 1: 'MANUAL_INPUT_DASH_CONTROL_OK', 2:
57  // 'MANUAL_INPUT_DASH_CONTROL_LEFT', 3: 'MANUAL_INPUT_DASH_CONTROL_RIGHT', 4:
58  // 'MANUAL_INPUT_DASH_CONTROL_UP', 5: 'MANUAL_INPUT_DASH_CONTROL_DOWN'},
59  // 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'offset': 0.0,
60  // 'physical_range': '[0|255]', 'bit': 15, 'type': 'enum', 'order':
61  // 'motorola', 'physical_unit': ''}
62  Dash_controls_left_rpt_20c::Manual_inputType manual_input(
63  const std::uint8_t* bytes, const int32_t length) const;
64 
65  // config detail: {'name': 'VEHICLE_FAULT', 'offset': 0.0, 'precision': 1.0,
66  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 6,
67  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
68  bool vehicle_fault(const std::uint8_t* bytes, const int32_t length) const;
69 
70  // config detail: {'name': 'PACMOD_FAULT', 'offset': 0.0, 'precision': 1.0,
71  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 5,
72  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
73  bool pacmod_fault(const std::uint8_t* bytes, const int32_t length) const;
74 
75  // config detail: {'name': 'OVERRIDE_ACTIVE', 'offset': 0.0, 'precision': 1.0,
76  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 1,
77  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
78  bool override_active(const std::uint8_t* bytes, const int32_t length) const;
79 
80  // config detail: {'name': 'OUTPUT_REPORTED_FAULT', 'offset': 0.0,
81  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
82  // '[0|1]', 'bit': 4, 'type': 'bool', 'order': 'motorola', 'physical_unit':
83  // ''}
84  bool output_reported_fault(const std::uint8_t* bytes,
85  const int32_t length) const;
86 
87  // config detail: {'name': 'INPUT_OUTPUT_FAULT', 'offset': 0.0,
88  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
89  // '[0|1]', 'bit': 3, 'type': 'bool', 'order': 'motorola', 'physical_unit':
90  // ''}
91  bool input_output_fault(const std::uint8_t* bytes,
92  const int32_t length) const;
93 
94  // config detail: {'name': 'ENABLED', 'offset': 0.0, 'precision': 1.0, 'len':
95  // 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 0, 'type':
96  // 'bool', 'order': 'motorola', 'physical_unit': ''}
97  bool enabled(const std::uint8_t* bytes, const int32_t length) const;
98 
99  // config detail: {'name': 'COMMAND_OUTPUT_FAULT', 'offset': 0.0,
100  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
101  // '[0|1]', 'bit': 2, 'type': 'bool', 'order': 'motorola', 'physical_unit':
102  // ''}
103  bool command_output_fault(const std::uint8_t* bytes,
104  const int32_t length) const;
105 };
106 
107 } // namespace lexus
108 } // namespace canbus
109 } // 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
static const int32_t ID
Definition: dash_controls_left_rpt_20c.h:29
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override
Definition: dash_controls_left_rpt_20c.h:26
The class of ProtocolData.