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"
20
#include "
modules/drivers/canbus/can_comm/protocol_data.h
"
21
22
namespace
apollo
{
23
namespace
canbus {
24
namespace
devkit {
25
26
class
Steeringreport502
:
public
::apollo::drivers::canbus::ProtocolData
<
27
::apollo::canbus::Devkit> {
28
public
:
29
static
const
int32_t
ID
;
30
Steeringreport502
();
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'}
72
Steering_report_502::Steer_en_stateType
steer_en_state(
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
apollo::canbus::devkit::Steeringreport502
Definition
steering_report_502.h:27
apollo::canbus::devkit::Steeringreport502::Steeringreport502
Steeringreport502()
Definition
steering_report_502.cc:29
apollo::canbus::devkit::Steeringreport502::ID
static const int32_t ID
Definition
steering_report_502.h:29
apollo::canbus::devkit::Steeringreport502::Parse
void Parse(const std::uint8_t *bytes, int32_t length, Devkit *chassis) const override
Definition
steering_report_502.cc:32
apollo::drivers::canbus::ProtocolData
This is the base class of protocol data.
Definition
protocol_data.h:44
apollo
class register implement
Definition
arena_queue.h:37
protocol_data.h
The class of ProtocolData
apollo::canbus::Devkit
Definition
devkit.proto:463
apollo::canbus::Steering_report_502::Steer_flt2Type
Steer_flt2Type
Definition
demo.proto:199
apollo::canbus::Steering_report_502::Steer_en_stateType
Steer_en_stateType
Definition
demo.proto:207
apollo::canbus::Steering_report_502::Steer_flt1Type
Steer_flt1Type
Definition
demo.proto:203
modules
canbus_vehicle
devkit
protocol
steering_report_502.h