Apollo 10.0
自动驾驶开放平台
scu_bcm_304.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/ge3/proto/ge3.pb.h"
21
22namespace apollo {
23namespace canbus {
24namespace ge3 {
25
27 ::apollo::canbus::Ge3> {
28 public:
29 static const int32_t ID;
30 Scubcm304();
31 void Parse(const std::uint8_t* bytes, int32_t length,
32 Ge3* chassis) const override;
33
34 private:
35 // config detail: {'description': 'Vehicle reverse status', 'enum': {0:
36 // 'BCM_VEHREVERSEST_NORMAL', 1: 'BCM_VEHREVERSEST_REVERSE'},
37 // 'precision': 1.0, 'len': 1, 'name': 'BCM_VehReverseSt', 'is_signed_var':
38 // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 11, 'type': 'enum',
39 // 'order': 'motorola', 'physical_unit': '-'}
40 Scu_bcm_304::Bcm_vehreversestType bcm_vehreversest(
41 const std::uint8_t* bytes, const int32_t length) const;
42
43 // config detail: {'description': 'Right turn lamp status', 'enum': {0:
44 // 'BCM_RIGHTTURNLAMPST_INACTIVE', 1: 'BCM_RIGHTTURNLAMPST_ACTIVE'},
45 // 'precision': 1.0, 'len': 1, 'name': 'BCM_RightTurnLampSt', 'is_signed_var':
46 // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 4, 'type': 'enum',
47 // 'order': 'motorola', 'physical_unit': '-'}
48 Scu_bcm_304::Bcm_rightturnlampstType bcm_rightturnlampst(
49 const std::uint8_t* bytes, const int32_t length) const;
50
51 // config detail: {'description': 'Rear fog lamp status', 'enum': {0:
52 // 'BCM_REARFOGLAMPST_INACTIVE', 1: 'BCM_REARFOGLAMPST_ACTIVE'},
53 // 'precision': 1.0, 'len': 1, 'name': 'BCM_RearFogLampSt', 'is_signed_var':
54 // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 0, 'type': 'enum',
55 // 'order': 'motorola', 'physical_unit': '-'}
56 Scu_bcm_304::Bcm_rearfoglampstType bcm_rearfoglampst(
57 const std::uint8_t* bytes, const int32_t length) const;
58
59 // config detail: {'description': 'Parking lamp status', 'enum': {0:
60 // 'BCM_PARKINGLAMPST_INACTIVE', 1: 'BCM_PARKINGLAMPST_ACTIVE'},
61 // 'precision': 1.0, 'len': 1, 'name': 'BCM_ParkingLampSt', 'is_signed_var':
62 // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 12, 'type': 'enum',
63 // 'order': 'motorola', 'physical_unit': ''}
64 Scu_bcm_304::Bcm_parkinglampstType bcm_parkinglampst(
65 const std::uint8_t* bytes, const int32_t length) const;
66
67 // config detail: {'description': 'Low beam status', 'enum': {0:
68 // 'BCM_LOWBEAMST_INACTIVE', 1: 'BCM_LOWBEAMST_ACTIVE'}, 'precision': 1.0,
69 // 'len': 1, 'name': 'BCM_LowBeamSt', 'is_signed_var': False, 'offset': 0.0,
70 // 'physical_range': '[0|1]', 'bit': 2, 'type': 'enum', 'order': 'motorola',
71 // 'physical_unit': '-'}
72 Scu_bcm_304::Bcm_lowbeamstType bcm_lowbeamst(const std::uint8_t* bytes,
73 const int32_t length) const;
74
75 // config detail: {'description': 'Left turn lamp status', 'enum': {0:
76 // 'BCM_LEFTTURNLAMPST_INACTIVE', 1: 'BCM_LEFTTURNLAMPST_ACTIVE'},
77 // 'precision': 1.0, 'len': 1, 'name': 'BCM_LeftTurnLampSt', 'is_signed_var':
78 // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 5, 'type': 'enum',
79 // 'order': 'motorola', 'physical_unit': '-'}
80 Scu_bcm_304::Bcm_leftturnlampstType bcm_leftturnlampst(
81 const std::uint8_t* bytes, const int32_t length) const;
82
83 // config detail: {'description': 'Key status', 'enum': {0: 'BCM_KEYST_OFF',
84 // 1: 'BCM_KEYST_ACC', 2: 'BCM_KEYST_ON', 3: 'BCM_KEYST_CRANK'},
85 // 'precision': 1.0, 'len': 2, 'name': 'BCM_KeySt', 'is_signed_var': False,
86 // 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 7, 'type': 'enum',
87 // 'order': 'motorola', 'physical_unit': '-'}
88 Scu_bcm_304::Bcm_keystType bcm_keyst(const std::uint8_t* bytes,
89 const int32_t length) const;
90
91 // config detail: {'description': 'Horn status', 'enum': {0:
92 // 'BCM_HORNST_INACTIVE', 1: 'BCM_HORNST_ACTIVE'}, 'precision': 1.0, 'len': 1,
93 // 'name': 'BCM_HornSt', 'is_signed_var': False, 'offset': 0.0,
94 // 'physical_range': '[0|1]', 'bit': 15, 'type': 'enum', 'order': 'motorola',
95 // 'physical_unit': '-'}
96 Scu_bcm_304::Bcm_hornstType bcm_hornst(const std::uint8_t* bytes,
97 const int32_t length) const;
98
99 // config detail: {'description': 'High beam status', 'enum': {0:
100 // 'BCM_HIGHBEAMST_INACTIVE', 1: 'BCM_HIGHBEAMST_ACTIVE'}, 'precision': 1.0,
101 // 'len': 1, 'name': 'BCM_HighBeamSt', 'is_signed_var': False, 'offset': 0.0,
102 // 'physical_range': '[0|1]', 'bit': 3, 'type': 'enum', 'order': 'motorola',
103 // 'physical_unit': '-'}
104 Scu_bcm_304::Bcm_highbeamstType bcm_highbeamst(const std::uint8_t* bytes,
105 const int32_t length) const;
106
107 // config detail: {'description': 'Hazard lamp status', 'enum': {0:
108 // 'BCM_HAZARDLAMPST_INACTIVE', 1: 'BCM_HAZARDLAMPST_ACTIVE'},
109 // 'precision': 1.0, 'len': 1, 'name': 'BCM_HazardLampSt', 'is_signed_var':
110 // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 13, 'type': 'enum',
111 // 'order': 'motorola', 'physical_unit': ''}
112 Scu_bcm_304::Bcm_hazardlampstType bcm_hazardlampst(
113 const std::uint8_t* bytes, const int32_t length) const;
114
115 // config detail: {'description': 'Front fog lamp status', 'enum': {0:
116 // 'BCM_FRONTFOGLAMPST_INACTIVE', 1: 'BCM_FRONTFOGLAMPST_ACTIVE'},
117 // 'precision': 1.0, 'len': 1, 'name': 'BCM_FrontFogLampSt', 'is_signed_var':
118 // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 1, 'type': 'enum',
119 // 'order': 'motorola', 'physical_unit': '-'}
120 Scu_bcm_304::Bcm_frontfoglampstType bcm_frontfoglampst(
121 const std::uint8_t* bytes, const int32_t length) const;
122
123 // config detail: {'description': 'Brake light switch status', 'enum': {0:
124 // 'BCM_BRAKELIGHTSWITCHST_INACTIVE', 1: 'BCM_BRAKELIGHTSWITCHST_ACTIVE'},
125 // 'precision': 1.0, 'len': 1, 'name': 'BCM_BrakeLightSwitchSt',
126 // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit':
127 // 14, 'type': 'enum', 'order': 'motorola', 'physical_unit': '-'}
128 Scu_bcm_304::Bcm_brakelightswitchstType bcm_brakelightswitchst(
129 const std::uint8_t* bytes, const int32_t length) const;
130};
131
132} // namespace ge3
133} // namespace canbus
134} // namespace apollo
static const int32_t ID
Definition scu_bcm_304.h:29
void Parse(const std::uint8_t *bytes, int32_t length, Ge3 *chassis) const override
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData