Apollo
10.0
自动驾驶开放平台
vcu_report_505.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
21
#include "
modules/drivers/canbus/can_comm/protocol_data.h
"
22
23
namespace
apollo
{
24
namespace
canbus {
25
namespace
devkit {
26
27
class
Vcureport505
:
public
::apollo::drivers::canbus::ProtocolData
<
28
::apollo::canbus::Devkit> {
29
public
:
30
static
const
int32_t
ID
;
31
Vcureport505
();
32
void
Parse
(
const
std::uint8_t* bytes, int32_t length,
33
Devkit
* chassis)
const override
;
34
35
private
:
36
// config detail: {'bit': 10, 'enum': {0:
37
// 'STEER_MODE_STS_STANDARD_STEER_MODE', 1:
38
// 'STEER_MODE_STS_NON_DIRECTION_STEER_MODE', 2:
39
// 'STEER_MODE_STS_SYNC_DIRECTION_STEER_MODE'}, 'is_signed_var': False, 'len':
40
// 3, 'name': 'Steer_Mode_STS', 'offset': 0.0, 'order': 'motorola',
41
// 'physical_range': '[0|7]', 'physical_unit': '', 'precision': 1.0, 'type':
42
// 'enum'}
43
Vcu_report_505::Steer_mode_stsType
steer_mode_sts(
const
std::uint8_t* bytes,
44
const
int32_t length)
const
;
45
46
// config detail: {'bit': 11, 'enum': {0: 'BRAKE_LIGHT_ACTUAL_BRAKELIGHT_OFF',
47
// 1: 'BRAKE_LIGHT_ACTUAL_BRAKELIGHT_ON'}, 'is_signed_var': False, 'len': 1,
48
// 'name': 'Brake_Light_Actual', 'offset': 0.0, 'order': 'motorola',
49
// 'physical_range': '[0|1]', 'physical_unit': '', 'precision': 1.0, 'type':
50
// 'enum'}
51
Vcu_report_505::Brake_light_actualType
brake_light_actual(
52
const
std::uint8_t* bytes,
const
int32_t length)
const
;
53
54
// config detail: {'bit': 7, 'is_signed_var': True, 'len': 12, 'name': 'ACC',
55
// 'offset': 0.0, 'order': 'motorola', 'physical_range': '[-10|10]',
56
// 'physical_unit': 'm/s^2', 'precision': 0.01, 'type': 'double'}
57
double
acc(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
58
59
// config detail: {'bit': 23, 'is_signed_var': True, 'len': 16, 'name':
60
// 'SPEED', 'offset': 0.0, 'order': 'motorola', 'physical_range':
61
// '[-32.768|32.767]', 'physical_unit': 'm/s', 'precision': 0.001, 'type':
62
// 'double'}
63
double
speed(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
64
65
// config detail: {'bit': 32, 'description': 'describle the vehicle AEB mode
66
// whether was set', 'enum': {0: 'AEB_BRAKE_STATE_INACTIVE', 1:
67
// 'AEB_BRAKE_STATE_ACTIVE'}, 'is_signed_var': False, 'len': 1, 'name':
68
// 'AEB_Brake_State', 'offset': 0.0, 'order': 'motorola', 'physical_range':
69
// '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
70
Vcu_report_505::Aeb_brake_stateType
aeb_brake_state(
71
const
std::uint8_t* bytes,
const
int32_t length)
const
;
72
73
// config detail: {'bit': 33, 'enum': {0: 'FRONTCRASH_STATE_NO_EVENT', 1:
74
// 'FRONTCRASH_STATE_CRASH_EVENT'}, 'is_signed_var': False, 'len': 1, 'name':
75
// 'FrontCrash_State', 'offset': 0.0, 'order': 'motorola', 'physical_range':
76
// '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
77
Vcu_report_505::Frontcrash_stateType
frontcrash_state(
78
const
std::uint8_t* bytes,
const
int32_t length)
const
;
79
80
// config detail: {'bit': 34, 'enum': {0: 'BACKCRASH_STATE_NO_EVENT', 1:
81
// 'BACKCRASH_STATE_CRASH_EVENT'}, 'is_signed_var': False, 'len': 1, 'name':
82
// 'BackCrash_State', 'offset': 0.0, 'order': 'motorola', 'physical_range':
83
// '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
84
Vcu_report_505::Backcrash_stateType
backcrash_state(
85
const
std::uint8_t* bytes,
const
int32_t length)
const
;
86
87
// config detail: {'bit': 36, 'enum': {0:
88
// 'VEHICLE_MODE_STATE_MANUAL_REMOTE_MODE', 1: 'VEHICLE_MODE_STATE_AUTO_MODE',
89
// 2: 'VEHICLE_MODE_STATE_EMERGENCY_MODE', 3:
90
// 'VEHICLE_MODE_STATE_STANDBY_MODE'}, 'is_signed_var': False, 'len': 2,
91
// 'name': 'Vehicle_Mode_State', 'offset': 0.0, 'order': 'motorola',
92
// 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type':
93
// 'enum'}
94
Vcu_report_505::Vehicle_mode_stateType
vehicle_mode_state(
95
const
std::uint8_t* bytes,
const
int32_t length)
const
;
96
97
// config detail: {'bit': 39, 'enum': {0:
98
// 'DRIVE_MODE_STS_THROTTLE_PADDLE_DRIVE_MODE', 1:
99
// 'DRIVE_MODE_STS_SPEED_DRIVE_MODE'}, 'is_signed_var': False, 'len': 3,
100
// 'name': 'Drive_Mode_STS', 'offset': 0.0, 'order': 'motorola',
101
// 'physical_range': '[0|7]', 'physical_unit': '', 'precision': 1.0, 'type':
102
// 'enum'}
103
Vcu_report_505::Drive_mode_stsType
drive_mode_sts(
const
std::uint8_t* bytes,
104
const
int32_t length)
const
;
105
106
// config detail: {'bit': 47, 'is_signed_var': False, 'len': 8, 'name':
107
// 'Chassis_errcode', 'offset': 0.0, 'order': 'motorola', 'physical_range':
108
// '[0|255]', 'physical_unit': '', 'precision': 1.0, 'type': 'int'}
109
int
chassis_errcode(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
110
111
// config detail: {'bit': 57, 'enum': {0: 'TURN_LIGHT_ACTUAL_TURNLAMPSTS_OFF',
112
// 1: 'TURN_LIGHT_ACTUAL_LEFT_TURNLAMPSTS_ON', 2:
113
// 'TURN_LIGHT_ACTUAL_RIGHT_TURNLAMPSTS_ON', 3:
114
// 'TURN_LIGHT_ACTUAL_HAZARD_WARNING_LAMPSTS_ON'}, 'is_signed_var': False,
115
// 'len': 2, 'name': 'Turn_Light_Actual', 'offset': 0.0, 'order': 'motorola',
116
// 'physical_range': '[0|0]', 'physical_unit': '', 'precision': 1.0, 'type':
117
// 'enum'}
118
Vcu_report_505::Turn_light_actualType
turn_light_actual(
119
const
std::uint8_t* bytes,
const
int32_t length)
const
;
120
121
// config detail: {'bit': 58, 'description': 'describe the vehicle e-brake
122
// command whether was triggered by AEB', 'enum': {0: 'AEB_MODE_DISABLE', 1:
123
// 'AEB_MODE_ENABLE'}, 'is_signed_var': False, 'len': 1, 'name': 'AEB_Mode',
124
// 'offset': 0.0, 'order': 'motorola', 'physical_range': '[0|1]',
125
// 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
126
Vcu_report_505::Aeb_modeType
aeb_mode(
const
std::uint8_t* bytes,
127
const
int32_t length)
const
;
128
};
129
130
}
// namespace devkit
131
}
// namespace canbus
132
}
// namespace apollo
apollo::canbus::devkit::Vcureport505
Definition
vcu_report_505.h:28
apollo::canbus::devkit::Vcureport505::Parse
void Parse(const std::uint8_t *bytes, int32_t length, Devkit *chassis) const override
Definition
vcu_report_505.cc:33
apollo::canbus::devkit::Vcureport505::Vcureport505
Vcureport505()
Definition
vcu_report_505.cc:30
apollo::canbus::devkit::Vcureport505::ID
static const int32_t ID
Definition
vcu_report_505.h:30
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::Vcu_report_505::Vehicle_mode_stateType
Vehicle_mode_stateType
Definition
demo.proto:264
apollo::canbus::Vcu_report_505::Brake_light_actualType
Brake_light_actualType
Definition
demo.proto:274
apollo::canbus::Vcu_report_505::Aeb_brake_stateType
Aeb_brake_stateType
Definition
demo.proto:301
apollo::canbus::Vcu_report_505::Backcrash_stateType
Backcrash_stateType
Definition
demo.proto:297
apollo::canbus::Vcu_report_505::Turn_light_actualType
Turn_light_actualType
Definition
demo.proto:278
apollo::canbus::Vcu_report_505::Aeb_modeType
Aeb_modeType
Definition
demo.proto:270
apollo::canbus::Vcu_report_505::Steer_mode_stsType
Steer_mode_stsType
Definition
demo.proto:288
apollo::canbus::Vcu_report_505::Drive_mode_stsType
Drive_mode_stsType
Definition
demo.proto:284
apollo::canbus::Vcu_report_505::Frontcrash_stateType
Frontcrash_stateType
Definition
demo.proto:293
modules
canbus_vehicle
devkit
protocol
vcu_report_505.h