Apollo 10.0
自动驾驶开放平台
ads3_38e.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
31 Ads338e();
32
33 uint32_t GetPeriod() const override;
34
35 void UpdateData(uint8_t* data) override;
36
37 void Reset() override;
38
39 // config detail: {'description': 'The work status of ADS control unit.
40 // This signal should be contained in every message sent by ADS.', 'enum':
41 // {0: 'ADS_BCM_WORKSTS_DISABLE', 1: 'ADS_BCM_WORKSTS_ENABLE',
42 // 2: 'ADS_BCM_WORKSTS_ACTIVE', 3:'ADS_BCM_WORKSTS_FAILED'},'precision': 1.0,
43 // 'len': 2, 'name': 'ADS_BCM_WorkSts', 'is_signed_var': False,'offset': 0.0,
44 // 'physical_range': '[0|3]', 'bit': 6, 'type': 'enum', 'order': 'motorola',
45 // 'physical_unit': ''}
47
48 // config detail: {'description': 'This Signal reflect the ADS_WorkSts Signal
49 // is Valid OR not', 'enum': {0: 'ADS_BCMWORKSTSVALID_INVALID',
50 // 1: 'ADS_BCMWORKSTSVALID_VALID'}, 'precision': 1.0, 'len': 1,
51 // 'name': 'ADS_BCMWorkStsValid', 'is_signed_var': False, 'offset': 0.0,
52 // 'physical_range': '[0|1]', 'bit': 7, 'type': 'enum', 'order': 'motorola',
53 // 'physical_unit': ''}
55 Ads3_38e::Ads_bcmworkstsvalidType ads_bcmworkstsvalid);
56
57 // config detail: {'description': 'Vehicle Task request.If ADS request
58 // control BCM', 'enum': {0: 'ADS_REQCONTROLBCM_NO_REQUEST',
59 // 1: 'ADS_REQCONTROLBCM_REQUEST'}, 'precision': 1.0, 'len': 1, 'name':
60 // 'ADS_ReqControlBCM', 'is_signed_var': False, 'offset': 0.0,
61 // 'physical_range': '[0|1]', 'bit': 8, 'type': 'enum', 'order': 'motorola',
62 // 'physical_unit': ''}
64 Ads3_38e::Ads_reqcontrolbcmType ads_reqcontrolbcm);
65
66 // config detail: {'description': 'Open theHigh Beam light', 'enum':
67 // {0: 'HIGHBEAMTON_TURN_OFF', 1: 'HIGHBEAMTON_TURN_ON'}, 'precision': 1.0,
68 // 'len': 1, 'name': 'HighBeamtON', 'is_signed_var': False, 'offset': 0.0,
69 // 'physical_range': '[0|1]', 'bit': 11, 'type': 'enum', 'order': 'motorola',
70 // 'physical_unit': ''}
72
73 // config detail: {'description': 'Open the dipped Beam light', 'enum':
74 // {0: 'DIPPEDBEAMON_TURN_OFF', 1: 'DIPPEDBEAMON_TURN_ON'}, 'precision': 1.0,
75 // 'len': 1, 'name': 'DippedBeamON', 'is_signed_var': False, 'offset': 0.0,
76 // 'physical_range': '[0|1]', 'bit': 12, 'type': 'enum', 'order': 'motorola',
77 // 'physical_unit': ''}
79
80 // config detail: {'description': 'Open the Turn light', 'enum':
81 // {0: 'TURNLLIGHTON_TURN_OFF', 1: 'TURNLLIGHTON_TURN_LEFT_ON',
82 // 2: 'TURNLLIGHTON_TURN_RIGHT_ON', 3: 'TURNLLIGHTON_RESERVED'},
83 // 'precision': 1.0, 'len': 2, 'name': 'TurnlLightON', 'is_signed_var':False,
84 // 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 17, 'type': 'enum',
85 // 'order': 'motorola', 'physical_unit': ''}
87
88 // config detail: {'description': 'Open the emergency light', 'enum':
89 // {0: 'EMERGENCYLIGHTON_TURN_OFF', 1: 'EMERGENCYLIGHTON_TURN_ON'},
90 // 'precision': 1.0, 'len': 1, 'name': 'EmergencyLightON', 'is_signed_var':
91 // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 45, 'type':'enum',
92 // 'order': 'motorola', 'physical_unit': ''}
94 Ads3_38e::EmergencylightonType emergencylighton);
95
96 // config detail: {'description': 'Open the front fog light', 'enum':
97 // {0: 'FFOGLAMPON_TURN_OFF', 1: 'FFOGLAMPON_TURN_ON'}, 'precision': 1.0,
98 // 'len': 1, 'name': 'FFogLampON', 'is_signed_var': False, 'offset': 0.0,
99 // 'physical_range': '[0|1]', 'bit': 46, 'type': 'enum', 'order': 'motorola',
100 // 'physical_unit': ''}
102
103 // config detail: {'description': 'Open the rear fog ligh', 'enum':
104 // {0: 'RFOGLAMPON_TURN_OFF', 1: 'RFOGLAMPON_TURN_ON'}, 'precision': 1.0,
105 // 'len': 1, 'name': 'RFogLampON', 'is_signed_var': False, 'offset': 0.0,
106 // 'physical_range': '[0|1]', 'bit': 47, 'type': 'enum', 'order': 'motorola',
107 // 'physical_unit': ''}
109
110 // config detail: {'description': 'Open the brake light', 'enum':
111 // {0: 'BRAKELIGHT_TURN_OFF', 1: 'BRAKELIGHT_TURN_ON'}, 'precision': 1.0,
112 // 'len': 1, 'name': 'BrakeLight', 'is_signed_var': False, 'offset': 0.0,
113 // 'physical_range': '[0|1]', 'bit': 48, 'type': 'enum', 'order': 'motorola',
114 // 'physical_unit': ''}
116
117 // config detail: {'description': 'Open the horn voice', 'enum':
118 // {0: 'HORNON_TURN_OFF', 1: 'HORNON_TURN_ON'}, 'precision': 1.0, 'len': 1,
119 // 'name': 'HornON', 'is_signed_var': False, 'offset': 0.0,
120 // 'physical_range': '[0|1]', 'bit': 49, 'type': 'enum', 'order': 'motorola',
121 // 'physical_unit': ''}
123
124 // config detail: {'description': 'Open front window shield wiper', 'enum':
125 // {0: 'FWINDSHIELDWIPER_TURN_OFF', 1: 'FWINDSHIELDWIPER_TURN_ON'},
126 // 'precision': 1.0, 'len': 1, 'name': 'Fwindshieldwiper', 'is_signed_var':
127 // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 50, 'type':'enum',
128 // 'order': 'motorola', 'physical_unit': ''}
130 Ads3_38e::FwindshieldwiperType fwindshieldwiper);
131
132 // config detail: {'description': 'Open rear window shield wiper', 'enum':
133 // {0: 'RWINDSHIELDWIPER_TURN_OFF', 1: 'RWINDSHIELDWIPER_TURN_ON'},
134 // 'precision': 1.0, 'len': 1, 'name': 'Rwindshieldwiper', 'is_signed_var':
135 // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 60, 'type':'enum',
136 // 'order': 'motorola', 'physical_unit': ''}
138 Ads3_38e::RwindshieldwiperType rwindshieldwiper);
139
140 private:
141 // config detail: {'description': 'The work status of ADS control unit.
142 // This signal should be contained in every message sent by ADS.', 'enum':
143 // {0: 'ADS_BCM_WORKSTS_DISABLE', 1: 'ADS_BCM_WORKSTS_ENABLE',
144 // 2: 'ADS_BCM_WORKSTS_ACTIVE', 3: 'ADS_BCM_WORKSTS_FAILED'},
145 // 'precision': 1.0, 'len': 2, 'name': 'ADS_BCM_WorkSts', 'is_signed_var':
146 // False, 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 6, 'type': 'enum',
147 // 'order': 'motorola', 'physical_unit': ''}
148 void set_p_ads_bcm_worksts(uint8_t* data,
149 Ads3_38e::Ads_bcm_workstsType ads_bcm_worksts);
150
151 // config detail: {'description': 'This Signal reflect the ADS_WorkSts Signal
152 // is Valid OR not', 'enum': {0: 'ADS_BCMWORKSTSVALID_INVALID',
153 // 1: 'ADS_BCMWORKSTSVALID_VALID'}, 'precision': 1.0, 'len': 1, 'name':
154 // 'ADS_BCMWorkStsValid', 'is_signed_var': False, 'offset': 0.0,
155 // 'physical_range': '[0|1]', 'bit': 7, 'type': 'enum', 'order': 'motorola',
156 // 'physical_unit': ''}
157 void set_p_ads_bcmworkstsvalid(
158 uint8_t* data, Ads3_38e::Ads_bcmworkstsvalidType ads_bcmworkstsvalid);
159
160 // config detail: {'description': 'Vehicle Task request.If ADS request
161 // control BCM', 'enum': {0: 'ADS_REQCONTROLBCM_NO_REQUEST',
162 // 1: 'ADS_REQCONTROLBCM_REQUEST'}, 'precision': 1.0, 'len': 1,
163 // 'name': 'ADS_ReqControlBCM', 'is_signed_var': False, 'offset': 0.0,
164 // 'physical_range': '[0|1]', 'bit': 8, 'type': 'enum', 'order': 'motorola',
165 // 'physical_unit': ''}
166 void set_p_ads_reqcontrolbcm(
167 uint8_t* data, Ads3_38e::Ads_reqcontrolbcmType ads_reqcontrolbcm);
168
169 // config detail: {'description': 'Open theHigh Beam light', 'enum':
170 // {0: 'HIGHBEAMTON_TURN_OFF', 1: 'HIGHBEAMTON_TURN_ON'}, 'precision': 1.0,
171 // 'len': 1, 'name': 'HighBeamtON', 'is_signed_var': False, 'offset': 0.0,
172 // 'physical_range': '[0|1]', 'bit': 11, 'type': 'enum', 'order': 'motorola',
173 // 'physical_unit': ''}
174 void set_p_highbeamton(uint8_t* data, Ads3_38e::HighbeamtonType highbeamton);
175
176 // config detail: {'description': 'Open the dipped Beam light', 'enum':
177 // {0: 'DIPPEDBEAMON_TURN_OFF', 1: 'DIPPEDBEAMON_TURN_ON'}, 'precision': 1.0,
178 // 'len': 1, 'name': 'DippedBeamON', 'is_signed_var': False, 'offset': 0.0,
179 // 'physical_range': '[0|1]', 'bit': 12, 'type': 'enum', 'order': 'motorola',
180 // 'physical_unit': ''}
181 void set_p_dippedbeamon(uint8_t* data,
182 Ads3_38e::DippedbeamonType dippedbeamon);
183
184 // config detail: {'description': 'Open the Turn light', 'enum':
185 // {0: 'TURNLLIGHTON_TURN_OFF', 1: 'TURNLLIGHTON_TURN_LEFT_ON',
186 // 2: 'TURNLLIGHTON_TURN_RIGHT_ON', 3: 'TURNLLIGHTON_RESERVED'},
187 // 'precision': 1.0, 'len': 2, 'name': 'TurnlLightON', 'is_signed_var':False,
188 // 'offset': 0.0, 'physical_range': '[0|3]', 'bit': 17, 'type': 'enum',
189 // 'order': 'motorola', 'physical_unit': ''}
190 void set_p_turnllighton(uint8_t* data,
191 Ads3_38e::TurnllightonType turnllighton);
192
193 // config detail: {'description': 'Open the emergency light', 'enum':
194 // {0: 'EMERGENCYLIGHTON_TURN_OFF', 1: 'EMERGENCYLIGHTON_TURN_ON'},
195 // 'precision': 1.0, 'len': 1, 'name': 'EmergencyLightON',
196 // 'is_signed_var': False, 'offset': 0.0, 'physical_range': '[0|1]',
197 // 'bit': 45, 'type': 'enum', 'order': 'motorola', 'physical_unit': ''}
198 void set_p_emergencylighton(uint8_t* data,
199 Ads3_38e::EmergencylightonType emergencylighton);
200
201 // config detail: {'description': 'Open the front fog light', 'enum':
202 // {0: 'FFOGLAMPON_TURN_OFF', 1: 'FFOGLAMPON_TURN_ON'}, 'precision': 1.0,
203 // 'len': 1, 'name': 'FFogLampON', 'is_signed_var': False, 'offset': 0.0,
204 // 'physical_range': '[0|1]', 'bit': 46, 'type': 'enum', 'order': 'motorola',
205 // 'physical_unit': ''}
206 void set_p_ffoglampon(uint8_t* data, Ads3_38e::FfoglamponType ffoglampon);
207
208 // config detail: {'description': 'Open the rear fog ligh', 'enum':
209 // {0: 'RFOGLAMPON_TURN_OFF', 1: 'RFOGLAMPON_TURN_ON'}, 'precision': 1.0,
210 // 'len': 1, 'name': 'RFogLampON', 'is_signed_var': False, 'offset': 0.0,
211 // 'physical_range': '[0|1]', 'bit': 47, 'type': 'enum', 'order': 'motorola',
212 // 'physical_unit': ''}
213 void set_p_rfoglampon(uint8_t* data, Ads3_38e::RfoglamponType rfoglampon);
214
215 // config detail: {'description': 'Open the brake light', 'enum':
216 // {0: 'BRAKELIGHT_TURN_OFF', 1: 'BRAKELIGHT_TURN_ON'}, 'precision': 1.0,
217 // 'len': 1, 'name': 'BrakeLight', 'is_signed_var': False, 'offset': 0.0,
218 // 'physical_range': '[0|1]', 'bit': 48, 'type': 'enum', 'order': 'motorola',
219 // 'physical_unit': ''}
220 void set_p_brakelight(uint8_t* data, Ads3_38e::BrakelightType brakelight);
221
222 // config detail: {'description': 'Open the horn voice', 'enum':
223 // {0: 'HORNON_TURN_OFF', 1: 'HORNON_TURN_ON'}, 'precision': 1.0, 'len': 1,
224 // 'name': 'HornON', 'is_signed_var': False, 'offset': 0.0,
225 // 'physical_range': '[0|1]', 'bit': 49, 'type': 'enum', 'order': 'motorola',
226 // 'physical_unit': ''}
227 void set_p_hornon(uint8_t* data, Ads3_38e::HornonType hornon);
228
229 // config detail: {'description': 'Open front window shield wiper', 'enum':
230 // {0: 'FWINDSHIELDWIPER_TURN_OFF', 1: 'FWINDSHIELDWIPER_TURN_ON'},
231 // 'precision': 1.0, 'len': 1, 'name': 'Fwindshieldwiper', 'is_signed_var':
232 // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 50,'type': 'enum',
233 // 'order': 'motorola', 'physical_unit': ''}
234 void set_p_fwindshieldwiper(uint8_t* data,
235 Ads3_38e::FwindshieldwiperType fwindshieldwiper);
236
237 // config detail: {'description': 'Open rear window shield wiper', 'enum':
238 // {0: 'RWINDSHIELDWIPER_TURN_OFF', 1: 'RWINDSHIELDWIPER_TURN_ON'},
239 // 'precision': 1.0, 'len': 1, 'name': 'Rwindshieldwiper', 'is_signed_var':
240 // False, 'offset': 0.0, 'physical_range': '[0|1]', 'bit': 60,'type': 'enum',
241 // 'order': 'motorola', 'physical_unit': ''}
242 void set_p_rwindshieldwiper(uint8_t* data,
243 Ads3_38e::RwindshieldwiperType rwindshieldwiper);
244
245 private:
246 Ads3_38e::Ads_bcm_workstsType ads_bcm_worksts_;
247 Ads3_38e::Ads_bcmworkstsvalidType ads_bcmworkstsvalid_;
248 Ads3_38e::Ads_reqcontrolbcmType ads_reqcontrolbcm_;
249 Ads3_38e::HighbeamtonType highbeamton_;
250 Ads3_38e::DippedbeamonType dippedbeamon_;
251 Ads3_38e::TurnllightonType turnllighton_;
252 Ads3_38e::EmergencylightonType emergencylighton_;
253 Ads3_38e::FfoglamponType ffoglampon_;
254 Ads3_38e::RfoglamponType rfoglampon_;
255 Ads3_38e::BrakelightType brakelight_;
256 Ads3_38e::HornonType hornon_;
257 Ads3_38e::FwindshieldwiperType fwindshieldwiper_;
258 Ads3_38e::RwindshieldwiperType rwindshieldwiper_;
259};
260
261} // namespace wey
262} // namespace canbus
263} // namespace apollo
Ads338e * set_hornon(Ads3_38e::HornonType hornon)
Definition ads3_38e.cc:258
Ads338e * set_ads_reqcontrolbcm(Ads3_38e::Ads_reqcontrolbcmType ads_reqcontrolbcm)
Definition ads3_38e.cc:111
Ads338e * set_ffoglampon(Ads3_38e::FfoglamponType ffoglampon)
Definition ads3_38e.cc:204
Ads338e * set_ads_bcm_worksts(Ads3_38e::Ads_bcm_workstsType ads_bcm_worksts)
Definition ads3_38e.cc:71
Ads338e * set_highbeamton(Ads3_38e::HighbeamtonType highbeamton)
Definition ads3_38e.cc:130
static const int32_t ID
Definition ads3_38e.h:29
Ads338e * set_fwindshieldwiper(Ads3_38e::FwindshieldwiperType fwindshieldwiper)
Definition ads3_38e.cc:274
Ads338e * set_turnllighton(Ads3_38e::TurnllightonType turnllighton)
Definition ads3_38e.cc:166
void UpdateData(uint8_t *data) override
Definition ads3_38e.cc:38
Ads338e * set_emergencylighton(Ads3_38e::EmergencylightonType emergencylighton)
Definition ads3_38e.cc:185
Ads338e * set_brakelight(Ads3_38e::BrakelightType brakelight)
Definition ads3_38e.cc:240
Ads338e * set_rfoglampon(Ads3_38e::RfoglamponType rfoglampon)
Definition ads3_38e.cc:222
Ads338e * set_rwindshieldwiper(Ads3_38e::RwindshieldwiperType rwindshieldwiper)
Definition ads3_38e.cc:293
Ads338e * set_ads_bcmworkstsvalid(Ads3_38e::Ads_bcmworkstsvalidType ads_bcmworkstsvalid)
Definition ads3_38e.cc:92
Ads338e * set_dippedbeamon(Ads3_38e::DippedbeamonType dippedbeamon)
Definition ads3_38e.cc:148
uint32_t GetPeriod() const override
Definition ads3_38e.cc:32
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData