Apollo 10.0
自动驾驶开放平台
llc_motionfeedback2_21.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
35 FRIEND_TEST(llc_motionfeedback2_21Test, motion_fdk);
36
37 private:
38 // config detail: {'name': 'LLC_FBK_VehicleSpeed', 'offset': 0.0, 'precision':
39 // 0.01, 'len': 16, 'is_signed_var': False, 'physical_range': '[0|655.35]',
40 // 'bit': 32, 'type': 'double', 'order': 'intel', 'physical_unit': 'm/s'}
41 double llc_fbk_vehiclespeed(const std::uint8_t* bytes,
42 const int32_t length) const;
43
44 // config detail: {'description': 'Motion feedback 2 heartbeat counter',
45 // 'offset': 0.0, 'precision': 1.0, 'len': 2, 'name':
46 // 'LLC_MotionFeedback2_Counter', 'is_signed_var': False, 'physical_range':
47 // '[0|3]', 'bit': 54, 'type': 'int', 'order': 'intel', 'physical_unit': ''}
48 int llc_motionfeedback2_counter(const std::uint8_t* bytes,
49 const int32_t length) const;
50
51 // config detail: {'description': 'Motion feedback 2 checksum', 'offset': 0.0,
52 // 'precision': 1.0, 'len': 8, 'name': 'LLC_MotionFeedback2_Checksum',
53 // 'is_signed_var': False, 'physical_range': '[0|255]', 'bit': 56, 'type':
54 // 'int', 'order': 'intel', 'physical_unit': ''}
55 int llc_motionfeedback2_checksum(const std::uint8_t* bytes,
56 const int32_t length) const;
57
58 // config detail: {'description': 'Steer wheel angle feedback from SbW motor
59 // (? rate)', 'offset': 0.0, 'precision': 0.05, 'len': 16, 'name':
60 // 'LLC_FBK_SteeringRate', 'is_signed_var': True, 'physical_range':
61 // '[-1638.4|1638.3]', 'bit': 16, 'type': 'double', 'order': 'intel',
62 // 'physical_unit': 'deg/s'}
63 double llc_fbk_steeringrate(const std::uint8_t* bytes,
64 const int32_t length) const;
65
66 // config detail: {'description': 'Steering angle feedback', 'offset': 0.0,
67 // 'precision': 0.05, 'len': 16, 'name': 'LLC_FBK_SteeringAngle',
68 // 'is_signed_var': True, 'physical_range': '[-1638.4|1638.35]', 'bit': 0,
69 // 'type': 'double', 'order': 'intel', 'physical_unit': 'deg'}
70 double llc_fbk_steeringangle(const std::uint8_t* bytes,
71 const int32_t length) const;
72};
73
74} // namespace transit
75} // namespace canbus
76} // namespace apollo
void Parse(const std::uint8_t *bytes, int32_t length, Transit *chassis) const override
FRIEND_TEST(llc_motionfeedback2_21Test, motion_fdk)
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData