Apollo  6.0
Open source self driving car software
occupancy_rpt_415.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': 'REAR_SEATBELT_BUCKLED_IS_VALID', 'offset': 0.0,
36  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
37  // '[0|1]', 'bit': 13, 'type': 'bool', 'order': 'motorola', 'physical_unit':
38  // ''}
39  bool rear_seatbelt_buckled_is_valid(const std::uint8_t* bytes,
40  const int32_t length) const;
41 
42  // config detail: {'name': 'PASS_SEATBELT_BUCKLED_IS_VALID', 'offset': 0.0,
43  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
44  // '[0|1]', 'bit': 12, 'type': 'bool', 'order': 'motorola', 'physical_unit':
45  // ''}
46  bool pass_seatbelt_buckled_is_valid(const std::uint8_t* bytes,
47  const int32_t length) const;
48 
49  // config detail: {'name': 'DRIVER_SEATBELT_BUCKLED_IS_VALID', 'offset': 0.0,
50  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
51  // '[0|1]', 'bit': 11, 'type': 'bool', 'order': 'motorola', 'physical_unit':
52  // ''}
53  bool driver_seatbelt_buckled_is_valid(const std::uint8_t* bytes,
54  const int32_t length) const;
55 
56  // config detail: {'name': 'REAR_SEAT_OCCUPIED_IS_VALID', 'offset': 0.0,
57  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
58  // '[0|1]', 'bit': 10, 'type': 'bool', 'order': 'motorola', 'physical_unit':
59  // ''}
60  bool rear_seat_occupied_is_valid(const std::uint8_t* bytes,
61  const int32_t length) const;
62 
63  // config detail: {'name': 'PASS_SEAT_OCCUPIED_IS_VALID', 'offset': 0.0,
64  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
65  // '[0|1]', 'bit': 9, 'type': 'bool', 'order': 'motorola', 'physical_unit':
66  // ''}
67  bool pass_seat_occupied_is_valid(const std::uint8_t* bytes,
68  const int32_t length) const;
69 
70  // config detail: {'name': 'DRIVER_SEAT_OCCUPIED_IS_VALID', 'offset': 0.0,
71  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
72  // '[0|1]', 'bit': 8, 'type': 'bool', 'order': 'motorola', 'physical_unit':
73  // ''}
74  bool driver_seat_occupied_is_valid(const std::uint8_t* bytes,
75  const int32_t length) const;
76 
77  // config detail: {'name': 'REAR_SEATBELT_BUCKLED', 'offset': 0.0,
78  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
79  // '[0|1]', 'bit': 5, 'type': 'bool', 'order': 'motorola', 'physical_unit':
80  // ''}
81  bool rear_seatbelt_buckled(const std::uint8_t* bytes,
82  const int32_t length) const;
83 
84  // config detail: {'name': 'PASS_SEATBELT_BUCKLED', 'offset': 0.0,
85  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
86  // '[0|1]', 'bit': 4, 'type': 'bool', 'order': 'motorola', 'physical_unit':
87  // ''}
88  bool pass_seatbelt_buckled(const std::uint8_t* bytes,
89  const int32_t length) const;
90 
91  // config detail: {'name': 'DRIVER_SEATBELT_BUCKLED', 'offset': 0.0,
92  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
93  // '[0|1]', 'bit': 3, 'type': 'bool', 'order': 'motorola', 'physical_unit':
94  // ''}
95  bool driver_seatbelt_buckled(const std::uint8_t* bytes,
96  const int32_t length) const;
97 
98  // config detail: {'name': 'REAR_SEAT_OCCUPIED', 'offset': 0.0,
99  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
100  // '[0|1]', 'bit': 2, 'type': 'bool', 'order': 'motorola', 'physical_unit':
101  // ''}
102  bool rear_seat_occupied(const std::uint8_t* bytes,
103  const int32_t length) const;
104 
105  // config detail: {'name': 'PASS_SEAT_OCCUPIED', 'offset': 0.0,
106  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
107  // '[0|1]', 'bit': 1, 'type': 'bool', 'order': 'motorola', 'physical_unit':
108  // ''}
109  bool pass_seat_occupied(const std::uint8_t* bytes,
110  const int32_t length) const;
111 
112  // config detail: {'name': 'DRIVER_SEAT_OCCUPIED', 'offset': 0.0,
113  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
114  // '[0|1]', 'bit': 0, 'type': 'bool', 'order': 'motorola', 'physical_unit':
115  // ''}
116  bool driver_seat_occupied(const std::uint8_t* bytes,
117  const int32_t length) const;
118 };
119 
120 } // namespace lexus
121 } // namespace canbus
122 } // namespace apollo
Definition: occupancy_rpt_415.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
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override
static const int32_t ID
Definition: occupancy_rpt_415.h:29
The class of ProtocolData.