Apollo 10.0
自动驾驶开放平台
pas_1st_data_311.h
浏览该文件的文档.
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_vehicle/neolix_edu/proto/neolix_edu.pb.h"
21
22namespace apollo {
23namespace canbus {
24namespace neolix_edu {
25
27 ::apollo::canbus::Neolix_edu> {
28 public:
29 static const int32_t ID;
31 void Parse(const std::uint8_t* bytes, int32_t length,
32 Neolix_edu* 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
void Parse(const std::uint8_t *bytes, int32_t length, Neolix_edu *chassis) const override
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData