Apollo 10.0
自动驾驶开放平台
llc_motionfeedback1_20.h
浏览该文件的文档.
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 "gtest/gtest_prod.h"
20#include "modules/canbus_vehicle/transit/proto/transit.pb.h"
22
23namespace apollo {
24namespace canbus {
25namespace transit {
26
28 ::apollo::canbus::Transit> {
29 public:
30 static const int32_t ID;
32 void Parse(const std::uint8_t* bytes, int32_t length,
33 Transit* chassis) const override;
34 FRIEND_TEST(Motionfeedback1_20_test, General);
35
36 private:
37 // config detail: {'description': 'Current gear', 'enum': {0:
38 // 'LLC_FBK_GEAR_P_PARK', 1: 'LLC_FBK_GEAR_D_DRIVE', 2:
39 // 'LLC_FBK_GEAR_N_NEUTRAL', 3: 'LLC_FBK_GEAR_R_REVERSE'}, 'precision': 1.0,
40 // 'len': 3, 'name': 'LLC_FBK_Gear', 'is_signed_var': False, 'offset': 0.0,
41 // 'physical_range': '[0|3]', 'bit': 50, 'type': 'enum', 'order': 'intel',
42 // 'physical_unit': ''}
44 const std::uint8_t* bytes, const int32_t length) const;
45
46 // config detail: {'description': 'Parking brake applied', 'offset': 0.0,
47 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_ParkingBrake',
48 // 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 53, 'type':
49 // 'bool', 'order': 'intel', 'physical_unit': 'T/F'}
50 bool llc_fbk_parkingbrake(const std::uint8_t* bytes,
51 const int32_t length) const;
52
53 // config detail: {'description': 'Throttle position feedback', 'offset': 0.0,
54 // 'precision': 0.1, 'len': 10, 'name': 'LLC_FBK_ThrottlePosition',
55 // 'is_signed_var': False, 'physical_range': '[0|102.3]', 'bit': 38, 'type':
56 // 'double', 'order': 'intel', 'physical_unit': '%'}
57 double llc_fbk_throttleposition(const std::uint8_t* bytes,
58 const int32_t length) const;
59
60 // config detail: {'description': 'Rear brake pressure feedback', 'offset':
61 // 0.0, 'precision': 0.0556, 'len': 11, 'name': 'LLC_FBK_BrakePercentRear',
62 // 'is_signed_var': False, 'physical_range': '[0|113.8132]', 'bit': 27,
63 // 'type': 'double', 'order': 'intel', 'physical_unit': '%'}
64 double llc_fbk_brakepercentrear(const std::uint8_t* bytes,
65 const int32_t length) const;
66
67 // config detail: {'description': 'Front brake pressure feedback', 'offset':
68 // 0.0, 'precision': 0.0556, 'len': 11, 'name': 'LLC_FBK_BrakePercentFront',
69 // 'is_signed_var': False, 'physical_range': '[0|113.8132]', 'bit': 16,
70 // 'type': 'double', 'order': 'intel', 'physical_unit': '%'}
71 double llc_fbk_brakepercentfront(const std::uint8_t* bytes,
72 const int32_t length) const;
73
74 // config detail: {'description': 'Current steering control mode', 'enum': {0:
75 // 'LLC_FBK_STEERINGCONTROLMODE_NONE', 1: 'LLC_FBK_STEERINGCONTROLMODE_ANGLE',
76 // 2: 'LLC_FBK_STEERINGCONTROLMODE_RESERVED_CURVATURE', 3:
77 // 'LLC_FBK_STEERINGCONTROLMODE_RESERVED'}, 'precision': 1.0, 'len': 2,
78 // 'name': 'LLC_FBK_SteeringControlMode', 'is_signed_var': False, 'offset':
79 // 0.0, 'physical_range': '[0|3]', 'bit': 6, 'type': 'enum', 'order': 'intel',
80 // 'physical_unit': ''}
82 llc_fbk_steeringcontrolmode(const std::uint8_t* bytes,
83 const int32_t length) const;
84
85 // config detail: {'description': 'Motion feedback 1 heartbeat counter',
86 // 'offset': 0.0, 'precision': 1.0, 'len': 2, 'name':
87 // 'LLC_MotionFeedback1_Counter', 'is_signed_var': False, 'physical_range':
88 // '[0|3]', 'bit': 54, 'type': 'int', 'order': 'intel', 'physical_unit': ''}
89 int llc_motionfeedback1_counter(const std::uint8_t* bytes,
90 const int32_t length) const;
91
92 // config detail: {'description': 'Motion feedback 1 checksum', 'offset': 0.0,
93 // 'precision': 1.0, 'len': 8, 'name': 'LLC_MotionFeedback1_Checksum',
94 // 'is_signed_var': False, 'physical_range': '[0|255]', 'bit': 56, 'type':
95 // 'int', 'order': 'intel', 'physical_unit': ''}
96 int llc_motionfeedback1_checksum(const std::uint8_t* bytes,
97 const int32_t length) const;
98
99 // config detail: {'description': 'Autonomy command aligned with vehicle state
100 // according to calibration limits', 'offset': 0.0, 'precision': 1.0, 'len':
101 // 1, 'name': 'LLC_FBK_CommandAligned', 'is_signed_var': False,
102 // 'physical_range': '[0|1]', 'bit': 11, 'type': 'bool', 'order': 'intel',
103 // 'physical_unit': 'T/F'}
104 bool llc_fbk_commandaligned(const std::uint8_t* bytes,
105 const int32_t length) const;
106
107 // config detail: {'description': 'Estop is pressed', 'offset': 0.0,
108 // 'precision': 1.0, 'len': 1, 'name': 'LLC_FBK_EstopPressed',
109 // 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 10, 'type':
110 // 'bool', 'order': 'intel', 'physical_unit': 'T/F'}
111 bool llc_fbk_estoppressed(const std::uint8_t* bytes,
112 const int32_t length) const;
113
114 // config detail: {'description': 'Indicates that ADC is requesting autonomy
115 // mode', 'offset': 0.0, 'precision': 1.0, 'len': 1, 'name':
116 // 'LLC_FBK_AdcRequestAutonomy', 'is_signed_var': False, 'physical_range':
117 // '[0|1]', 'bit': 9, 'type': 'bool', 'order': 'intel', 'physical_unit':
118 // 'T/F'}
119 bool llc_fbk_adcrequestautonomy(const std::uint8_t* bytes,
120 const int32_t length) const;
121
122 // config detail: {'description': 'Indicates that LLC is ready to allow
123 // autonomy mode', 'offset': 0.0, 'precision': 1.0, 'len': 1, 'name':
124 // 'LLC_FBK_allowAutonomy', 'is_signed_var': False, 'physical_range': '[0|1]',
125 // 'bit': 8, 'type': 'bool', 'order': 'intel', 'physical_unit': 'T/F'}
126 bool llc_fbk_allowautonomy(const std::uint8_t* bytes,
127 const int32_t length) const;
128
129 // config detail: {'description': 'Report current longitudinal control mode',
130 // 'enum': {0: 'LLC_FBK_LONGITUDINALCONTROLMODE_NONE', 1:
131 // 'LLC_FBK_LONGITUDINALCONTROLMODE_RESERVED_VELOCITY_AND_ACCELERATION', 2:
132 // 'LLC_FBK_LONGITUDINALCONTROLMODE_RESERVED_FORCE', 3:
133 // 'LLC_FBK_LONGITUDINALCONTROLMODE_DIRECT_THROTTLE_BRAKE'}, 'precision': 1.0,
134 // 'len': 2, 'name': 'LLC_FBK_LongitudinalControlMode', 'is_signed_var':
135 // False, 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 4, 'type': 'enum',
136 // 'order': 'intel', 'physical_unit': ''}
138 llc_fbk_longitudinalcontrolmode(const std::uint8_t* bytes,
139 const int32_t length) const;
140
141 // config detail: {'description': 'Current Autonomy State', 'enum': {0:
142 // 'LLC_FBK_STATE_RESERVED0', 1: 'LLC_FBK_STATE_AUTONOMY_NOT_ALLOWED', 2:
143 // 'LLC_FBK_STATE_AUTONOMY_ALLOWED', 3: 'LLC_FBK_STATE_AUTONOMY_REQUESTED', 4:
144 // 'LLC_FBK_STATE_AUTONOMY', 5: 'LLC_FBK_STATE_RESERVED1', 6:
145 // 'LLC_FBK_STATE_RESERVED2', 7: 'LLC_FBK_STATE_RESERVED3', 8:
146 // 'LLC_FBK_STATE_RESERVED4', 9: 'LLC_FBK_STATE_RESERVED5', 10:
147 // 'LLC_FBK_STATE_RESERVED6', 11: 'LLC_FBK_STATE_RESERVED7', 12:
148 // 'LLC_FBK_STATE_RESERVED8', 13: 'LLC_FBK_STATE_DISENGAGE_REQUESTED', 14:
149 // 'LLC_FBK_STATE_DISENGAGED', 15: 'LLC_FBK_STATE_FAULT'}, 'precision': 1.0,
150 // 'len': 4, 'name': 'LLC_FBK_State', 'is_signed_var': False, 'offset': 0.0,
151 // 'physical_range': '[0|15]', 'bit': 0, 'type': 'enum', 'order': 'intel',
152 // 'physical_unit': ''}
154 const std::uint8_t* bytes, const int32_t length) const;
155};
156
157} // namespace transit
158} // namespace canbus
159} // namespace apollo
void Parse(const std::uint8_t *bytes, int32_t length, Transit *chassis) const override
FRIEND_TEST(Motionfeedback1_20_test, General)
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData