Apollo  6.0
Open source self driving car software
pas_1st_data_311.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2020 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 neolix_edu {
25 
27  ::apollo::canbus::ChassisDetail> {
28  public:
29  static const int32_t ID;
30  Pas1stdata311();
31  void Parse(const std::uint8_t* bytes, int32_t length,
32  ChassisDetail* chassis) const override;
33 
34  private:
35  // config detail: {'description': 'phy=int*2;0xFF:no obstacle', 'offset': 0.0,
36  // 'precision': 2.0, 'len': 8, 'name': 'PASDistance4', 'is_signed_var': False,
37  // 'physical_range': '[0|510]', 'bit': 39, 'type': 'double', 'order':
38  // 'motorola', 'physical_unit': 'cm'}
39  double pasdistance4(const std::uint8_t* bytes, const int32_t length) const;
40 
41  // config detail: {'description': 'phy=int*2;0xFF:no obstacle', 'offset': 0.0,
42  // 'precision': 2.0, 'len': 8, 'name': 'PASDistance3', 'is_signed_var': False,
43  // 'physical_range': '[0|510]', 'bit': 31, 'type': 'double', 'order':
44  // 'motorola', 'physical_unit': 'cm'}
45  double pasdistance3(const std::uint8_t* bytes, const int32_t length) const;
46 
47  // config detail: {'description': '0x0:Invalid;0x1:Valid', 'offset': 0.0,
48  // 'precision': 1.0, 'len': 1, 'name': 'PAS_F1_Status', 'is_signed_var':
49  // False, 'physical_range': '[0|1]', 'bit': 0, 'type': 'bool', 'order':
50  // 'motorola', 'physical_unit': 'bit'}
51  bool pas_f1_status(const std::uint8_t* bytes, const int32_t length) const;
52 
53  // config detail: {'description': '0x0:Invalid;0x1:Valid', 'offset': 0.0,
54  // 'precision': 1.0, 'len': 1, 'name': 'PAS_F2_Status', 'is_signed_var':
55  // False, 'physical_range': '[0|1]', 'bit': 1, 'type': 'bool', 'order':
56  // 'motorola', 'physical_unit': 'bit'}
57  bool pas_f2_status(const std::uint8_t* bytes, const int32_t length) const;
58 
59  // config detail: {'description': '0x0:Invalid;0x1:Valid', 'offset': 0.0,
60  // 'precision': 1.0, 'len': 1, 'name': 'PAS_F3_Status', 'is_signed_var':
61  // False, 'physical_range': '[0|1]', 'bit': 2, 'type': 'bool', 'order':
62  // 'motorola', 'physical_unit': 'bit'}
63  bool pas_f3_status(const std::uint8_t* bytes, const int32_t length) const;
64 
65  // config detail: {'description': '0x0:Invalid;0x1:Valid', 'offset': 0.0,
66  // 'precision': 1.0, 'len': 1, 'name': 'PAS_F4_Status', 'is_signed_var':
67  // False, 'physical_range': '[0|1]', 'bit': 3, 'type': 'bool', 'order':
68  // 'motorola', 'physical_unit': 'bit'}
69  bool pas_f4_status(const std::uint8_t* bytes, const int32_t length) const;
70 
71  // config detail: {'description': 'phy=int*2;0xFF:no obstacle', 'offset': 0.0,
72  // 'precision': 2.0, 'len': 8, 'name': 'PASDistance2', 'is_signed_var': False,
73  // 'physical_range': '[0|510]', 'bit': 23, 'type': 'double', 'order':
74  // 'motorola', 'physical_unit': 'cm'}
75  double pasdistance2(const std::uint8_t* bytes, const int32_t length) const;
76 
77  // config detail: {'name': 'PASDistance1', 'offset': 0.0, 'precision': 2.0,
78  // 'len': 8, 'is_signed_var': False, 'physical_range': '[0|510]', 'bit': 15,
79  // 'type': 'double', 'order': 'motorola', 'physical_unit': 'cm'}
80  double pasdistance1(const std::uint8_t* bytes, const int32_t length) const;
81 };
82 
83 } // namespace neolix_edu
84 } // namespace canbus
85 } // namespace apollo
Definition: pas_1st_data_311.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: pas_1st_data_311.h:29
The class of ProtocolData.