Apollo 10.0
自动驾驶开放平台
steering_report_502.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/devkit/proto/devkit.pb.h"
21
22namespace apollo {
23namespace canbus {
24namespace devkit {
25
27 ::apollo::canbus::Devkit> {
28 public:
29 static const int32_t ID;
31 void Parse(const std::uint8_t* bytes, int32_t length,
32 Devkit* chassis) const override;
33
34 private:
35 // config detail: {'bit': 47, 'is_signed_var': False, 'len': 16, 'name':
36 // 'Steer_ANGLE_Rear_Actual', 'offset': -500.0, 'order': 'motorola',
37 // 'physical_range': '[-500|500]', 'physical_unit': 'deg', 'precision': 1.0,
38 // 'type': 'int'}
39 int steer_angle_rear_actual(const std::uint8_t* bytes,
40 const int32_t length) const;
41
42 // config detail: {'bit': 63, 'is_signed_var': False, 'len': 8, 'name':
43 // 'Steer_ANGLE_SPD_Actual', 'offset': 0.0, 'order': 'motorola',
44 // 'physical_range': '[0|0]', 'physical_unit': 'deg/s', 'precision': 1.0,
45 // 'type': 'int'}
46 int steer_angle_spd_actual(const std::uint8_t* bytes,
47 const int32_t length) const;
48
49 // config detail: {'bit': 23, 'description': 'Steer system communication
50 // fault', 'enum': {0: 'STEER_FLT2_NO_FAULT', 1:
51 // 'STEER_FLT2_STEER_SYSTEM_COMUNICATION_FAULT'}, 'is_signed_var': False,
52 // 'len': 8, 'name': 'Steer_FLT2', 'offset': 0.0, 'order': 'motorola',
53 // 'physical_range': '[0|255]', 'physical_unit': '', 'precision': 1.0, 'type':
54 // 'enum'}
55 Steering_report_502::Steer_flt2Type steer_flt2(const std::uint8_t* bytes,
56 const int32_t length) const;
57
58 // config detail: {'bit': 15, 'description': 'Steer system hardware fault',
59 // 'enum': {0: 'STEER_FLT1_NO_FAULT', 1:
60 // 'STEER_FLT1_STEER_SYSTEM_HARDWARE_FAULT'}, 'is_signed_var': False, 'len':
61 // 8, 'name': 'Steer_FLT1', 'offset': 0.0, 'order': 'motorola',
62 // 'physical_range': '[0|255]', 'physical_unit': '', 'precision': 1.0, 'type':
63 // 'enum'}
64 Steering_report_502::Steer_flt1Type steer_flt1(const std::uint8_t* bytes,
65 const int32_t length) const;
66
67 // config detail: {'bit': 1, 'enum': {0: 'STEER_EN_STATE_MANUAL', 1:
68 // 'STEER_EN_STATE_AUTO', 2: 'STEER_EN_STATE_TAKEOVER', 3:
69 // 'STEER_EN_STATE_STANDBY'}, 'is_signed_var': False, 'len': 2, 'name':
70 // 'Steer_EN_state', 'offset': 0.0, 'order': 'motorola', 'physical_range':
71 // '[0|2]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
73 const std::uint8_t* bytes, const int32_t length) const;
74
75 // config detail: {'bit': 31, 'is_signed_var': False, 'len': 16, 'name':
76 // 'Steer_ANGLE_Actual', 'offset': -500.0, 'order': 'motorola',
77 // 'physical_range': '[-500|500]', 'physical_unit': 'deg', 'precision': 1.0,
78 // 'type': 'int'}
79 int steer_angle_actual(const std::uint8_t* bytes, const int32_t length) const;
80};
81
82} // namespace devkit
83} // namespace canbus
84} // namespace apollo
void Parse(const std::uint8_t *bytes, int32_t length, Devkit *chassis) const override
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData