Apollo  6.0
Open source self driving car software
door_rpt_417.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;
30  Doorrpt417();
31  void Parse(const std::uint8_t* bytes, int32_t length,
32  ChassisDetail* chassis) const override;
33 
34  private:
35  // config detail: {'name': 'FUEL_DOOR_OPEN_IS_VALID', 'offset': 0.0,
36  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
37  // '[0|1]', 'bit': 14, 'type': 'bool', 'order': 'motorola', 'physical_unit':
38  // ''}
39  bool fuel_door_open_is_valid(const std::uint8_t* bytes,
40  const int32_t length) const;
41 
42  // config detail: {'name': 'TRUNK_OPEN_IS_VALID', 'offset': 0.0,
43  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
44  // '[0|1]', 'bit': 13, 'type': 'bool', 'order': 'motorola', 'physical_unit':
45  // ''}
46  bool trunk_open_is_valid(const std::uint8_t* bytes,
47  const int32_t length) const;
48 
49  // config detail: {'name': 'HOOD_OPEN_IS_VALID', 'offset': 0.0,
50  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
51  // '[0|1]', 'bit': 12, 'type': 'bool', 'order': 'motorola', 'physical_unit':
52  // ''}
53  bool hood_open_is_valid(const std::uint8_t* bytes,
54  const int32_t length) const;
55 
56  // config detail: {'name': 'REAR_PASS_DOOR_OPEN_IS_VALID', 'offset': 0.0,
57  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
58  // '[0|1]', 'bit': 11, 'type': 'bool', 'order': 'motorola', 'physical_unit':
59  // ''}
60  bool rear_pass_door_open_is_valid(const std::uint8_t* bytes,
61  const int32_t length) const;
62 
63  // config detail: {'name': 'REAR_DRIVER_DOOR_OPEN_IS_VALID', 'offset': 0.0,
64  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
65  // '[0|1]', 'bit': 10, 'type': 'bool', 'order': 'motorola', 'physical_unit':
66  // ''}
67  bool rear_driver_door_open_is_valid(const std::uint8_t* bytes,
68  const int32_t length) const;
69 
70  // config detail: {'name': 'PASS_DOOR_OPEN_IS_VALID', 'offset': 0.0,
71  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
72  // '[0|1]', 'bit': 9, 'type': 'bool', 'order': 'motorola', 'physical_unit':
73  // ''}
74  bool pass_door_open_is_valid(const std::uint8_t* bytes,
75  const int32_t length) const;
76 
77  // config detail: {'name': 'DRIVER_DOOR_OPEN_IS_VALID', 'offset': 0.0,
78  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
79  // '[0|1]', 'bit': 8, 'type': 'bool', 'order': 'motorola', 'physical_unit':
80  // ''}
81  bool driver_door_open_is_valid(const std::uint8_t* bytes,
82  const int32_t length) const;
83 
84  // config detail: {'name': 'FUEL_DOOR_OPEN', 'offset': 0.0, 'precision': 1.0,
85  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 6,
86  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
87  bool fuel_door_open(const std::uint8_t* bytes, const int32_t length) const;
88 
89  // config detail: {'name': 'TRUNK_OPEN', 'offset': 0.0, 'precision': 1.0,
90  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 5,
91  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
92  bool trunk_open(const std::uint8_t* bytes, const int32_t length) const;
93 
94  // config detail: {'name': 'HOOD_OPEN', 'offset': 0.0, 'precision': 1.0,
95  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 4,
96  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
97  bool hood_open(const std::uint8_t* bytes, const int32_t length) const;
98 
99  // config detail: {'name': 'REAR_PASS_DOOR_OPEN', 'offset': 0.0,
100  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
101  // '[0|1]', 'bit': 3, 'type': 'bool', 'order': 'motorola', 'physical_unit':
102  // ''}
103  bool rear_pass_door_open(const std::uint8_t* bytes,
104  const int32_t length) const;
105 
106  // config detail: {'name': 'REAR_DRIVER_DOOR_OPEN', 'offset': 0.0,
107  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
108  // '[0|1]', 'bit': 2, 'type': 'bool', 'order': 'motorola', 'physical_unit':
109  // ''}
110  bool rear_driver_door_open(const std::uint8_t* bytes,
111  const int32_t length) const;
112 
113  // config detail: {'name': 'PASS_DOOR_OPEN', 'offset': 0.0, 'precision': 1.0,
114  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 1,
115  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
116  bool pass_door_open(const std::uint8_t* bytes, const int32_t length) const;
117 
118  // config detail: {'name': 'DRIVER_DOOR_OPEN', 'offset': 0.0,
119  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
120  // '[0|1]', 'bit': 0, 'type': 'bool', 'order': 'motorola', 'physical_unit':
121  // ''}
122  bool driver_door_open(const std::uint8_t* bytes, const int32_t length) const;
123 };
124 
125 } // namespace lexus
126 } // namespace canbus
127 } // namespace apollo
Definition: door_rpt_417.h:26
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
The class of ProtocolData.
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override
static const int32_t ID
Definition: door_rpt_417.h:29