Apollo  6.0
Open source self driving car software
brake_aux_rpt_304.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': 'BRAKE_ON_OFF_IS_VALID', 'offset': 0.0,
36  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
37  // '[0|1]', 'bit': 60, 'type': 'bool', 'order': 'motorola', 'physical_unit':
38  // ''}
39  bool brake_on_off_is_valid(const std::uint8_t* bytes,
40  const int32_t length) const;
41 
42  // config detail: {'name': 'BRAKE_ON_OFF', 'offset': 0.0, 'precision': 1.0,
43  // 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 49,
44  // 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
45  bool brake_on_off(const std::uint8_t* bytes, const int32_t length) const;
46 
47  // config detail: {'name': 'USER_INTERACTION_IS_VALID', 'offset': 0.0,
48  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
49  // '[0|1]', 'bit': 59, 'type': 'bool', 'order': 'motorola', 'physical_unit':
50  // ''}
51  bool user_interaction_is_valid(const std::uint8_t* bytes,
52  const int32_t length) const;
53 
54  // config detail: {'name': 'USER_INTERACTION', 'offset': 0.0,
55  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
56  // '[0|1]', 'bit': 48, 'type': 'bool', 'order': 'motorola', 'physical_unit':
57  // ''}
58  bool user_interaction(const std::uint8_t* bytes, const int32_t length) const;
59 
60  // config detail: {'name': 'RAW_BRAKE_PRESSURE_IS_VALID', 'offset': 0.0,
61  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
62  // '[0|1]', 'bit': 58, 'type': 'bool', 'order': 'motorola', 'physical_unit':
63  // ''}
64  bool raw_brake_pressure_is_valid(const std::uint8_t* bytes,
65  const int32_t length) const;
66 
67  // config detail: {'name': 'RAW_BRAKE_PRESSURE', 'offset': 0.0,
68  // 'precision': 1.0, 'len': 16, 'is_signed_var': True, 'physical_range':
69  // '[-32.768|32.767]', 'bit': 39, 'type': 'double', 'order': 'motorola',
70  // 'physical_unit': ''}
71  double raw_brake_pressure(const std::uint8_t* bytes,
72  const int32_t length) const;
73 
74  // config detail: {'name': 'RAW_PEDAL_FORCE_IS_VALID', 'offset': 0.0,
75  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
76  // '[0|1]', 'bit': 57, 'type': 'bool', 'order': 'motorola', 'physical_unit':
77  // ''}
78  bool raw_pedal_force_is_valid(const std::uint8_t* bytes,
79  const int32_t length) const;
80 
81  // config detail: {'name': 'RAW_PEDAL_FORCE', 'offset': 0.0, 'precision': 1.0,
82  // 'len': 16, 'is_signed_var': True, 'physical_range': '[-32.768|32.767]',
83  // 'bit': 23, 'type': 'double', 'order': 'motorola', 'physical_unit': ''}
84  double raw_pedal_force(const std::uint8_t* bytes, const int32_t length) const;
85 
86  // config detail: {'name': 'RAW_PEDAL_POS_IS_VALID', 'offset': 0.0,
87  // 'precision': 1.0, 'len': 1, 'is_signed_var': False, 'physical_range':
88  // '[0|1]', 'bit': 56, 'type': 'bool', 'order': 'motorola', 'physical_unit':
89  // ''}
90  bool raw_pedal_pos_is_valid(const std::uint8_t* bytes,
91  const int32_t length) const;
92 
93  // config detail: {'name': 'RAW_PEDAL_POS', 'offset': 0.0, 'precision': 1.0,
94  // 'len': 16, 'is_signed_var': True, 'physical_range': '[-32.768|32.767]',
95  // 'bit': 7, 'type': 'double', 'order': 'motorola', 'physical_unit': ''}
96  double raw_pedal_pos(const std::uint8_t* bytes, const int32_t length) const;
97 };
98 
99 } // namespace lexus
100 } // namespace canbus
101 } // 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
Definition: brake_aux_rpt_304.h:26
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override
static const int32_t ID
Definition: brake_aux_rpt_304.h:29
The class of ProtocolData.