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"
21
22namespace apollo {
23namespace canbus {
24namespace wey {
25
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
static const int32_t ID
Definition fbs3_237.h:29
void Parse(const std::uint8_t *bytes, int32_t length, Wey *chassis) const override
Definition fbs3_237.cc:33
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData