Apollo
10.0
自动驾驶开放平台
vcu_eps_report_57.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/neolix_edu/proto/neolix_edu.pb.h"
20
#include "
modules/drivers/canbus/can_comm/protocol_data.h
"
21
22
namespace
apollo
{
23
namespace
canbus {
24
namespace
neolix_edu {
25
26
class
Vcuepsreport57
:
public
::apollo::drivers::canbus::ProtocolData
<
27
::apollo::canbus::Neolix_edu> {
28
public
:
29
static
const
int32_t
ID
;
30
Vcuepsreport57
();
31
void
Parse
(
const
std::uint8_t* bytes, int32_t length,
32
Neolix_edu
* chassis)
const override
;
33
34
private
:
35
// config detail: {'description': '0x0:disable;0x1:enable', 'offset': 0.0,
36
// 'precision': 1.0, 'len': 1, 'name': 'Drive_Enable_Resp', 'is_signed_var':
37
// False, 'physical_range': '[0|0]', 'bit': 0, 'type': 'bool', 'order':
38
// 'motorola', 'physical_unit': ''}
39
bool
drive_enable_resp(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
40
41
// config detail: {'description': '0x0:Standby;0x1:auto drive;0x2:net
42
// drive;0x3:remote control;0x4:emergency brake;0x5~0x7:Reserved', 'enum': {0:
43
// 'CONTROL_MODE_RESP_STANDBY', 1: 'CONTROL_MODE_RESP_AUTO_DRIVE', 2:
44
// 'CONTROL_MODE_RESP_NET_DRIVE', 3: 'CONTROL_MODE_RESP_REMOTE_CONTROL', 4:
45
// 'CONTROL_MODE_RESP_EMERGENCY_BRAKE'}, 'precision': 1.0, 'len': 3, 'name':
46
// 'Control_Mode_Resp', 'is_signed_var': False, 'offset': 0.0,
47
// 'physical_range': '[0|7]', 'bit': 6, 'type': 'enum', 'order': 'motorola',
48
// 'physical_unit': ''}
49
Vcu_eps_report_57::Control_mode_respType
control_mode_resp(
50
const
std::uint8_t* bytes,
const
int32_t length)
const
;
51
52
// config detail: {'description': '0x0:not overflow;0x1:overflow', 'offset':
53
// 0.0, 'precision': 1.0, 'len': 1, 'name': 'VCU_EPS_Report', 'is_signed_var':
54
// False, 'physical_range': '[0|0]', 'bit': 7, 'type': 'bool', 'order':
55
// 'motorola', 'physical_unit': ''}
56
bool
vcu_eps_report(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
57
58
// config detail: {'description': ';', 'offset': -2048.0, 'precision': 0.0625,
59
// 'len': 16, 'name': 'VCU_Real_Angle', 'is_signed_var': False,
60
// 'physical_range': '[0|0]', 'bit': 23, 'type': 'double', 'order':
61
// 'motorola', 'physical_unit': ''}
62
double
vcu_real_angle(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
63
64
// config detail: {'description': '0x0:disable;0x1:enable', 'offset': 0.0,
65
// 'precision': 1.0, 'len': 1, 'name': 'VCU_Real_Angle_Valid',
66
// 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 32, 'type':
67
// 'bool', 'order': 'motorola', 'physical_unit': ''}
68
bool
vcu_real_angle_valid(
const
std::uint8_t* bytes,
69
const
int32_t length)
const
;
70
71
// config detail: {'description': '0x0:disable;0x1:enable;', 'offset': 0.0,
72
// 'precision': 1.0, 'len': 1, 'name': 'VCU_Target_Angle_Valid',
73
// 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 33, 'type':
74
// 'bool', 'order': 'motorola', 'physical_unit': ''}
75
bool
vcu_target_angle_valid(
const
std::uint8_t* bytes,
76
const
int32_t length)
const
;
77
78
// config detail: {'name': 'VCU_Target_Angle', 'offset': -512.0, 'precision':
79
// 0.25, 'len': 12, 'is_signed_var': False, 'physical_range': '[-380|380]',
80
// 'bit': 47, 'type': 'double', 'order': 'motorola', 'physical_unit': 'deg'}
81
double
vcu_target_angle(
const
std::uint8_t* bytes,
82
const
int32_t length)
const
;
83
84
// config detail: {'name': 'VCU_EPS_Rept_AliveCounter', 'offset': 0.0,
85
// 'precision': 1.0, 'len': 4, 'is_signed_var': False, 'physical_range':
86
// '[0|0]', 'bit': 51, 'type': 'int', 'order': 'motorola', 'physical_unit':
87
// ''}
88
int
vcu_eps_rept_alivecounter(
const
std::uint8_t* bytes,
89
const
int32_t length)
const
;
90
91
// config detail: {'name': 'VCU_EPS_Rept_CheckSum', 'offset': 0.0,
92
// 'precision': 1.0, 'len': 8, 'is_signed_var': False, 'physical_range':
93
// '[0|0]', 'bit': 63, 'type': 'int', 'order': 'motorola', 'physical_unit':
94
// ''}
95
int
vcu_eps_rept_checksum(
const
std::uint8_t* bytes,
96
const
int32_t length)
const
;
97
};
98
99
}
// namespace neolix_edu
100
}
// namespace canbus
101
}
// namespace apollo
apollo::canbus::neolix_edu::Vcuepsreport57
Definition
vcu_eps_report_57.h:27
apollo::canbus::neolix_edu::Vcuepsreport57::Parse
void Parse(const std::uint8_t *bytes, int32_t length, Neolix_edu *chassis) const override
Definition
vcu_eps_report_57.cc:33
apollo::canbus::neolix_edu::Vcuepsreport57::Vcuepsreport57
Vcuepsreport57()
Definition
vcu_eps_report_57.cc:30
apollo::canbus::neolix_edu::Vcuepsreport57::ID
static const int32_t ID
Definition
vcu_eps_report_57.h:29
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::Neolix_edu
Definition
neolix_edu.proto:512
apollo::canbus::Vcu_eps_report_57::Control_mode_respType
Control_mode_respType
Definition
neolix_edu.proto:179
modules
canbus_vehicle
neolix_edu
protocol
vcu_eps_report_57.h