Apollo
10.0
自动驾驶开放平台
fail_241.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/wey/proto/wey.pb.h"
20
#include "
modules/drivers/canbus/can_comm/protocol_data.h
"
21
22
namespace
apollo
{
23
namespace
canbus {
24
namespace
wey {
25
26
class
Fail241
:
public
::apollo::drivers::canbus::ProtocolData
<
27
::apollo::canbus::Wey> {
28
public
:
29
static
const
int32_t
ID
;
30
Fail241
();
31
void
Parse
(
const
std::uint8_t* bytes, int32_t length,
32
Wey
* chassis)
const override
;
33
34
private
:
35
// config detail: {'description': 'Engine Fail status', 'enum': {0:
36
// 'ENGFAIL_NO_FAIL', 1: 'ENGFAIL_FAIL'}, 'precision': 1.0, 'len': 1,'name':
37
// 'EngFail', 'is_signed_var': False, 'offset': 0.0, 'physical_range':
38
// '[0|1]', 'bit': 7, 'type': 'enum', 'order': 'motorola',
39
// 'physical_unit': ''}
40
Fail_241::EngfailType
engfail(
const
std::uint8_t* bytes,
41
const
int32_t length)
const
;
42
43
// config detail: {'description': 'ESP fault', 'enum': {0:
44
// 'ESPFAIL_NO_FAILURE', 1: 'ESPFAIL_FAILURE'}, 'precision': 1.0, 'len': 1,
45
// 'name': 'ESPFail', 'is_signed_var': False, 'offset': 0.0,
46
// 'physical_range': '[0|1]', 'bit': 14, 'type': 'enum',
47
// 'order': 'motorola', 'physical_unit': ''}
48
Fail_241::EspfailType
espfail(
const
std::uint8_t* bytes,
49
const
int32_t length)
const
;
50
51
// config detail: {'description': 'error indication of EPB system', 'enum':
52
// {0: 'EPBFAIL_UNDEFINED', 1: 'EPBFAIL_NO_ERROR', 2: 'EPBFAIL_ERROR', 3:
53
// 'EPBFAIL_DIAGNOSIS'}, 'precision': 1.0, 'len': 2, 'name': 'EPBFail',
54
// 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|3]',
55
// 'bit': 35, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
56
Fail_241::EpbfailType
epbfail(
const
std::uint8_t* bytes,
57
const
int32_t length)
const
;
58
59
// config detail: {'description': 'Driver display failure messages', 'enum':
60
// {0: 'SHIFTFAIL_NO_FAIL', 1: 'SHIFTFAIL_TRANSMISSION_MALFUNCTION',
61
// 2: 'SHIFTFAIL_TRANSMISSION_P_ENGAGEMENT_FAULT',
62
// 3: 'SHIFTFAIL_TRANSMISSION_P_DISENGAGEMENT_FAULT', 4:'SHIFTFAIL_RESERVED',
63
// 15: 'SHIFTFAIL_TRANSMISSION_LIMIT_FUNCTION'}, 'precision': 1.0, 'len': 4,
64
// 'name': 'ShiftFail', 'is_signed_var': False, 'offset': 0.0,
65
// 'physical_range': '[0|15]', 'bit': 31, 'type': 'enum', 'order':'motorola',
66
// 'physical_unit': ''}
67
Fail_241::ShiftfailType
shiftfail(
const
std::uint8_t* bytes,
68
const
int32_t length)
const
;
69
70
// config detail: {'description': 'Electrical steering fail status', 'enum':
71
// {0: 'EPSFAIL_NO_FAULT', 1: 'EPSFAIL_FAULT'}, 'precision': 1.0, 'len': 1,
72
// 'name': 'EPSFail', 'is_signed_var': False, 'offset': 0.0,
73
// 'physical_range': '[0|1]', 'bit': 21, 'type': 'enum', 'order': 'motorola',
74
// 'physical_unit': ''}
75
Fail_241::EpsfailType
epsfail(
const
std::uint8_t* bytes,
76
const
int32_t length)
const
;
77
};
78
79
}
// namespace wey
80
}
// namespace canbus
81
}
// namespace apollo
apollo::canbus::wey::Fail241
Definition
fail_241.h:27
apollo::canbus::wey::Fail241::Parse
void Parse(const std::uint8_t *bytes, int32_t length, Wey *chassis) const override
Definition
fail_241.cc:33
apollo::canbus::wey::Fail241::Fail241
Fail241()
Definition
fail_241.cc:30
apollo::canbus::wey::Fail241::ID
static const int32_t ID
Definition
fail_241.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::Fail_241::ShiftfailType
ShiftfailType
Definition
wey.proto:426
apollo::canbus::Fail_241::EpbfailType
EpbfailType
Definition
wey.proto:420
apollo::canbus::Fail_241::EspfailType
EspfailType
Definition
wey.proto:416
apollo::canbus::Fail_241::EngfailType
EngfailType
Definition
wey.proto:412
apollo::canbus::Fail_241::EpsfailType
EpsfailType
Definition
wey.proto:434
apollo::canbus::Wey
Definition
wey.proto:588
modules
canbus_vehicle
wey
protocol
fail_241.h