Apollo
10.0
自动驾驶开放平台
ecu_status_1_515.h
浏览该文件的文档.
1
/******************************************************************************
2
* Copyright 2019 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/ch/proto/ch.pb.h"
20
#include "
modules/drivers/canbus/can_comm/protocol_data.h
"
21
22
namespace
apollo
{
23
namespace
canbus {
24
namespace
ch {
25
26
class
Ecustatus1515
:
public
::apollo::drivers::canbus::ProtocolData
<
27
::apollo::canbus::Ch> {
28
public
:
29
static
const
int32_t
ID
;
30
Ecustatus1515
();
31
void
Parse
(
const
std::uint8_t* bytes, int32_t length,
32
Ch
* chassis)
const override
;
33
34
private
:
35
// config detail: {'bit': 0, 'description': 'Current speed (Steering status)',
36
// 'is_signed_var': True, 'len': 16, 'name': 'SPEED', 'offset': 0.0, 'order':
37
// 'intel', 'physical_range': '[-327.68|327.67]', 'physical_unit': 'm/s',
38
// 'precision': 0.01, 'type': 'double'}
39
double
speed(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
40
41
// config detail: {'bit': 16, 'description': 'Current acceleration (Steering
42
// status)', 'is_signed_var': True, 'len': 16, 'name': 'ACC_SPEED', 'offset':
43
// 0.0, 'order': 'intel', 'physical_range': '[0|0]', 'physical_unit': 'm/s^2',
44
// 'precision': 0.001, 'type': 'double'}
45
double
acc_speed(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
46
47
// config detail: {'bit': 32, 'description': 'Current Auto-mode state (Chassis
48
// status)', 'enum': {0: 'CTRL_STS_OUT_OF_CONTROL', 1:
49
// 'CTRL_STS_UNDER_CONTROL'}, 'is_signed_var': False, 'len': 8, 'name':
50
// 'CTRL_STS', 'offset': 0.0, 'order': 'intel', 'physical_range': '[0|1]',
51
// 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
52
Ecu_status_1_515::Ctrl_stsType
ctrl_sts(
const
std::uint8_t* bytes,
53
const
int32_t length)
const
;
54
55
// config detail: {'bit': 40, 'description': 'Current chassis state (Chassis
56
// status)', 'is_signed_var': False, 'len': 8, 'name': 'CHASSIS_STS',
57
// 'offset': 0.0, 'order': 'intel', 'physical_range': '[0|255]',
58
// 'physical_unit': '', 'precision': 1.0, 'type': 'int'}
59
int
chassis_sts(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
60
61
// config detail: {'bit': 48, 'description': 'Chassis error code (Chassis
62
// status)', 'is_signed_var': False, 'len': 16, 'name': 'CHASSIS_ERR',
63
// 'offset': 0.0, 'order': 'intel', 'physical_range': '[0|65535]',
64
// 'physical_unit': '', 'precision': 1.0, 'type': 'int'}
65
int
chassis_err(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
66
67
// config detail: {'bit': 48, 'description': 'Chassis error code (Chassis
68
// status)', 'enum': {0: 'CHASSIS_ADS_ERR_NOMAL', 1:
69
// 'CHASSIS_ADS_ERR_ADS_CAN_LOST', 2: 'CHASSIS_ADS_ERR_ADS_CAN_RECOVERY'},
70
// 'is_signed_var': False, 'len': 2, 'name': 'CHASSIS_ADS_ERR', 'offset': 0.0,
71
// 'order': 'intel', 'physical_range': '[0|2]', 'physical_unit': '',
72
// 'precision': 1.0, 'type': 'enum'}
73
Ecu_status_1_515::Chassis_ads_errType
chassis_ads_err(
74
const
std::uint8_t* bytes,
const
int32_t length)
const
;
75
76
// config detail: {'bit': 50, 'enum': {0: 'CHASSIS_BMS_CAN_NORMAL', 1:
77
// 'CHASSIS_BMS_CAN_ERROR'}, 'is_signed_var': False, 'len': 1, 'name':
78
// 'CHASSIS_BMS_CAN', 'offset': 0.0, 'order': 'intel', 'physical_range':
79
// '[0|1]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
80
Ecu_status_1_515::Chassis_bms_canType
chassis_bms_can(
81
const
std::uint8_t* bytes,
const
int32_t length)
const
;
82
83
// config detail: {'bit': 51, 'enum': {0: 'CHASSIS_EHB_CAN_NORMAL', 1:
84
// 'CHASSIS_EHB_CAN_ERROR'}, 'is_signed_var': False, 'len': 1, 'name':
85
// 'CHASSIS_EHB_CAN', 'offset': 0.0, 'order': 'intel', 'physical_range':
86
// '[0|1]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
87
Ecu_status_1_515::Chassis_ehb_canType
chassis_ehb_can(
88
const
std::uint8_t* bytes,
const
int32_t length)
const
;
89
90
// config detail: {'bit': 52, 'enum': {0: 'CHASSIS_EHB_ERR_NORMAL', 1:
91
// 'CHASSIS_EHB_ERR_ERROR'}, 'is_signed_var': False, 'len': 1, 'name':
92
// 'CHASSIS_EHB_ERR', 'offset': 0.0, 'order': 'intel', 'physical_range':
93
// '[0|1]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
94
Ecu_status_1_515::Chassis_ehb_errType
chassis_ehb_err(
95
const
std::uint8_t* bytes,
const
int32_t length)
const
;
96
97
// config detail: {'bit': 53, 'enum': {0: 'CHASSIS_EPS_CAN_NORMAL', 1:
98
// 'CHASSIS_EPS_CAN_ERROR'}, 'is_signed_var': False, 'len': 1, 'name':
99
// 'CHASSIS_EPS_CAN', 'offset': 0.0, 'order': 'intel', 'physical_range':
100
// '[0|1]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
101
Ecu_status_1_515::Chassis_eps_canType
chassis_eps_can(
102
const
std::uint8_t* bytes,
const
int32_t length)
const
;
103
104
// config detail: {'bit': 54, 'enum': {0: 'CHASSIS_EPS_ERR_NORMAL', 1:
105
// 'CHASSIS_EPS_ERR_ERROR'}, 'is_signed_var': False, 'len': 1, 'name':
106
// 'CHASSIS_EPS_ERR', 'offset': 0.0, 'order': 'intel', 'physical_range':
107
// '[0|1]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
108
Ecu_status_1_515::Chassis_eps_errType
chassis_eps_err(
109
const
std::uint8_t* bytes,
const
int32_t length)
const
;
110
111
// config detail: {'bit': 55, 'enum': {0: 'CHASSIS_HW_LOST_NORMAL', 1:
112
// 'CHASSIS_HW_LOST_ERROR'}, 'is_signed_var': False, 'len': 1, 'name':
113
// 'CHASSIS_HW_Lost', 'offset': 0.0, 'order': 'intel', 'physical_range':
114
// '[0|1]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
115
Ecu_status_1_515::Chassis_hw_lostType
chassis_hw_lost(
116
const
std::uint8_t* bytes,
const
int32_t length)
const
;
117
118
// config detail: {'bit': 56, 'enum': {0: 'CHASSIS_MCU_CAN_NORMAL', 1:
119
// 'CHASSIS_MCU_CAN_ERROR'}, 'is_signed_var': False, 'len': 1, 'name':
120
// 'CHASSIS_MCU_CAN', 'offset': 0.0, 'order': 'intel', 'physical_range':
121
// '[0|1]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
122
Ecu_status_1_515::Chassis_mcu_canType
chassis_mcu_can(
123
const
std::uint8_t* bytes,
const
int32_t length)
const
;
124
125
// config detail: {'bit': 57, 'enum': {0: 'CHASSIS_MCU_ERR_NORMAL', 1:
126
// 'CHASSIS_MCU_ERR_ERROR'}, 'is_signed_var': False, 'len': 1, 'name':
127
// 'CHASSIS_MCU_ERR', 'offset': 0.0, 'order': 'intel', 'physical_range':
128
// '[0|1]', 'physical_unit': '', 'precision': 1.0, 'type': 'enum'}
129
Ecu_status_1_515::Chassis_mcu_errType
chassis_mcu_err(
130
const
std::uint8_t* bytes,
const
int32_t length)
const
;
131
};
132
133
}
// namespace ch
134
}
// namespace canbus
135
}
// namespace apollo
apollo::canbus::ch::Ecustatus1515
Definition
ecu_status_1_515.h:27
apollo::canbus::ch::Ecustatus1515::Parse
void Parse(const std::uint8_t *bytes, int32_t length, Ch *chassis) const override
Definition
ecu_status_1_515.cc:31
apollo::canbus::ch::Ecustatus1515::ID
static const int32_t ID
Definition
ecu_status_1_515.h:29
apollo::canbus::ch::Ecustatus1515::Ecustatus1515
Ecustatus1515()
Definition
ecu_status_1_515.cc:28
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::Ch
Definition
ch.proto:409
apollo::canbus::Ecu_status_1_515::Chassis_eps_canType
Chassis_eps_canType
Definition
ch.proto:244
apollo::canbus::Ecu_status_1_515::Chassis_mcu_canType
Chassis_mcu_canType
Definition
ch.proto:232
apollo::canbus::Ecu_status_1_515::Ctrl_stsType
Ctrl_stsType
Definition
ch.proto:224
apollo::canbus::Ecu_status_1_515::Chassis_ads_errType
Chassis_ads_errType
Definition
ch.proto:260
apollo::canbus::Ecu_status_1_515::Chassis_eps_errType
Chassis_eps_errType
Definition
ch.proto:240
apollo::canbus::Ecu_status_1_515::Chassis_mcu_errType
Chassis_mcu_errType
Definition
ch.proto:228
apollo::canbus::Ecu_status_1_515::Chassis_ehb_errType
Chassis_ehb_errType
Definition
ch.proto:248
apollo::canbus::Ecu_status_1_515::Chassis_bms_canType
Chassis_bms_canType
Definition
ch.proto:256
apollo::canbus::Ecu_status_1_515::Chassis_ehb_canType
Chassis_ehb_canType
Definition
ch.proto:252
apollo::canbus::Ecu_status_1_515::Chassis_hw_lostType
Chassis_hw_lostType
Definition
ch.proto:236
modules
canbus_vehicle
ch
protocol
ecu_status_1_515.h