Apollo
10.0
自动驾驶开放平台
fbs3_237.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
Fbs3237
:
public
::apollo::drivers::canbus::ProtocolData
<
27
::apollo::canbus::Wey> {
28
public
:
29
static
const
int32_t
ID
;
30
Fbs3237
();
31
void
Parse
(
const
std::uint8_t* bytes, int32_t length,
32
Wey
* chassis)
const override
;
33
34
private
:
35
// config detail: {'description': 'Engine speed', 'offset': 0.0,
36
// 'precision': 0.125, 'len': 16, 'name': 'EngSpd', 'is_signed_var': False,
37
// 'physical_range': '[0|8198.875]', 'bit': 7, 'type': 'double',
38
// 'order': 'motorola', 'physical_unit': 'rpm'}
39
double
engspd(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
40
41
// config detail: {'description':'Acceleration Pedal Position','offset':0.0,
42
// 'precision': 0.3937, 'len': 8, 'name': 'AccPedalPos', 'is_signed_var':
43
// False, 'physical_range': '[0|100.3935]', 'bit': 23, 'type': 'double',
44
// 'order': 'motorola', 'physical_unit': '%'}
45
double
accpedalpos(
const
std::uint8_t* bytes,
const
int32_t length)
const
;
46
47
// config detail: {'description': 'EPB Switch position information', 'enum':
48
// {0: 'EPBSWTICHPOSITION_NEUTRAL', 1: 'EPBSWTICHPOSITION_RELEASE',
49
// 2: 'EPBSWTICHPOSITION_APPLY', 3: 'EPBSWTICHPOSITION_RESERVED1'},
50
// 'precision': 1.0, 'len': 2, 'name': 'EPBSwtichPosition', 'is_signed_var':
51
// False, 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 31, 'type':'enum',
52
// 'order': 'motorola', 'physical_unit': ''}
53
Fbs3_237::EpbswtichpositionType
epbswtichposition(
const
std::uint8_t* bytes,
54
const
int32_t length)
const
;
55
56
// config detail:{'description': 'To indicate which gear the DCT is in now ',
57
// 'enum': {0: 'CURRENTGEAR_P', 1: 'CURRENTGEAR_R', 2: 'CURRENTGEAR_N',
58
// 3: 'CURRENTGEAR_D'}, 'precision': 1.0, 'len': 2, 'name': 'CurrentGear',
59
// 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|3]','bit':39,
60
// 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
61
Fbs3_237::CurrentgearType
currentgear(
const
std::uint8_t* bytes,
62
const
int32_t length)
const
;
63
64
// config detail: {'description': 'Driver Steering Interference Detected',
65
// 'enum': {0:'EPS_STREEINGMODE_MANUAL',1:'EPS_STREEINGMODE_AUTOMATIC_AVAIL',
66
// 2: 'EPS_STREEINGMODE_MANUAL_FROM_DRVNTERFERENCE',
67
// 3: 'EPS_STREEINGMODE_MANUAL_FROM_EPS_FAILED_DETECTED',
68
// 4: 'EPS_STREEINGMODE_TEMPORARY_INHIBITED', 5:'EPS_STREEINGMODE_RESERVED1',
69
// 6: 'EPS_STREEINGMODE_RESERVED2', 7: 'EPS_STREEINGMODE_RESERVED3'},
70
// 'precision': 1.0, 'len': 3, 'name': 'EPS_StreeingMode', 'is_signed_var':
71
// False, 'offset': 0.0, 'physical_range': '[0|7]', 'bit': 34, 'type':'enum',
72
// 'order': 'motorola', 'physical_unit': ''}
73
Fbs3_237::Eps_streeingmodeType
eps_streeingmode(
const
std::uint8_t* bytes,
74
const
int32_t length)
const
;
75
76
// config detail: {'description': 'Value of driver input torque',
77
// 'offset': -22.78, 'precision': 0.1794, 'len': 8, 'name':
78
// 'EPSDrvInputTrqValue', 'is_signed_var': False,
79
// 'physical_range': '[-22.78|22.96]', 'bit': 47, 'type': 'double',
80
// 'order': 'motorola', 'physical_unit': 'Nm'}
81
double
epsdrvinputtrqvalue(
const
std::uint8_t* bytes,
82
const
int32_t length)
const
;
83
84
// config detail: {'description': 'Value of consumed current by EPS',
85
// 'offset': 0.0, 'precision': 0.5, 'len': 8, 'name': 'EPSConsumedCurrValue',
86
// 'is_signed_var': False, 'physical_range': '[127|127]', 'bit': 55,
87
// 'type': 'double', 'order': 'motorola', 'physical_unit': 'A'}
88
double
epsconsumedcurrvalue(
const
std::uint8_t* bytes,
89
const
int32_t length)
const
;
90
91
// config detail: {'description': 'Applied steering mode currently',
92
// 'enum': {0: 'EPSCURRMOD_NORMAL_MODE', 1: 'EPSCURRMOD_SPORT_MODE',
93
// 2: 'EPSCURRMOD_COMFORT_MODE', 3: 'EPSCURRMOD_MODESELECTIONNOTPOSSIBLE',
94
// 4: 'EPSCURRMOD_NO_DISPLAY', 5: 'EPSCURRMOD_CONDITIONNOTMEET',
95
// 6: 'EPSCURRMOD_RESERVED1'}, 'precision': 1.0,'len': 3,'name':'EPSCurrMod',
96
// 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|7]',
97
// 'bit': 61, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
98
Fbs3_237::EpscurrmodType
epscurrmod(
const
std::uint8_t* bytes,
99
const
int32_t length)
const
;
100
};
101
102
}
// namespace wey
103
}
// namespace canbus
104
}
// namespace apollo
apollo::canbus::wey::Fbs3237
Definition
fbs3_237.h:27
apollo::canbus::wey::Fbs3237::ID
static const int32_t ID
Definition
fbs3_237.h:29
apollo::canbus::wey::Fbs3237::Fbs3237
Fbs3237()
Definition
fbs3_237.cc:30
apollo::canbus::wey::Fbs3237::Parse
void Parse(const std::uint8_t *bytes, int32_t length, Wey *chassis) const override
Definition
fbs3_237.cc:33
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::Fbs3_237::Eps_streeingmodeType
Eps_streeingmodeType
Definition
wey.proto:464
apollo::canbus::Fbs3_237::CurrentgearType
CurrentgearType
Definition
wey.proto:458
apollo::canbus::Fbs3_237::EpbswtichpositionType
EpbswtichpositionType
Definition
wey.proto:452
apollo::canbus::Fbs3_237::EpscurrmodType
EpscurrmodType
Definition
wey.proto:474
apollo::canbus::Wey
Definition
wey.proto:588
modules
canbus_vehicle
wey
protocol
fbs3_237.h