Apollo  6.0
Open source self driving car software
llc_motioncommandfeedback1_22.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 "gtest/gtest_prod.h"
20 #include "modules/canbus/proto/chassis_detail.pb.h"
22 
23 namespace apollo {
24 namespace canbus {
25 namespace transit {
26 
29  ::apollo::canbus::ChassisDetail> {
30  public:
31  static const int32_t ID;
33  void Parse(const std::uint8_t* bytes, int32_t length,
34  ChassisDetail* chassis) const override;
35  FRIEND_TEST(Motioncommandfeedback1_22_test, General);
36 
37  private:
38  // config detail: {'description': 'Steering angle setpoint (after limits)',
39  // 'offset': 0.0, 'precision': 0.05, 'len': 16, 'name':
40  // 'LLC_FBK_SteeringAngleSetpoint', 'is_signed_var': True, 'physical_range':
41  // '[-1638.4|1638.35]', 'bit': 21, 'type': 'double', 'order': 'intel',
42  // 'physical_unit': 'deg'}
43  double llc_fbk_steeringanglesetpoint(const std::uint8_t* bytes,
44  const int32_t length) const;
45 
46  // config detail: {'description': 'Current throttle setpoint (after limits)',
47  // 'offset': 0.0, 'precision': 0.1, 'len': 10, 'name':
48  // 'LLC_FBK_ThrottleSetpoint', 'is_signed_var': False, 'physical_range':
49  // '[0|102.3]', 'bit': 11, 'type': 'double', 'order': 'intel',
50  // 'physical_unit': '%'}
51  double llc_fbk_throttlesetpoint(const std::uint8_t* bytes,
52  const int32_t length) const;
53 
54  // config detail: {'description': 'Front brake pressure setpoint (after
55  // limits)', 'offset': 0.0, 'precision': 0.0556, 'len': 11, 'name':
56  // 'LLC_FBK_BrakePercentSetpoint', 'is_signed_var': False, 'physical_range':
57  // '[0|113.8132]', 'bit': 0, 'type': 'double', 'order': 'intel',
58  // 'physical_unit': '%'}
59  double llc_fbk_brakepercentsetpoint(const std::uint8_t* bytes,
60  const int32_t length) const;
61 
62  // config detail: {'description': 'Motion command feedback 2 heartbeat
63  // counter', 'offset': 0.0, 'precision': 1.0, 'len': 2, 'name':
64  // 'LLC_MotionCommandFeedback1_Count', 'is_signed_var': False,
65  // 'physical_range': '[0|3]', 'bit': 54, 'type': 'int', 'order': 'intel',
66  // 'physical_unit': ''}
67  int llc_motioncommandfeedback1_count(const std::uint8_t* bytes,
68  const int32_t length) const;
69 
70  // config detail: {'description': 'Motion command feedback 1 checksum',
71  // 'offset': 0.0, 'precision': 1.0, 'len': 8, 'name':
72  // 'LLC_MotionCommandFeedback1_Check', 'is_signed_var': False,
73  // 'physical_range': '[0|255]', 'bit': 56, 'type': 'int', 'order': 'intel',
74  // 'physical_unit': ''}
75  int llc_motioncommandfeedback1_check(const std::uint8_t* bytes,
76  const int32_t length) const;
77 };
78 
79 } // namespace transit
80 } // namespace canbus
81 } // 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
FRIEND_TEST(Motioncommandfeedback1_22_test, General)
static const int32_t ID
Definition: llc_motioncommandfeedback1_22.h:31
Definition: llc_motioncommandfeedback1_22.h:27
void Parse(const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis) const override
The class of ProtocolData.