25using ::apollo::drivers::canbus::Byte;
30 Lincoln *chassis_detail)
const {
32 switch (turn_light_type) {
34 chassis_detail->mutable_light()->set_turn_light_type(
41 chassis_detail->mutable_light()->set_turn_light_type(
51 switch (hi_beam_status) {
56 chassis_detail->mutable_light()->set_lincoln_lamp_type(
64 chassis_detail->mutable_light()->set_lincoln_lamp_type(
79 chassis_detail->mutable_light()->set_lincoln_wiper(
83 chassis_detail->mutable_light()->set_lincoln_wiper(
87 chassis_detail->mutable_light()->set_lincoln_wiper(
91 chassis_detail->mutable_light()->set_lincoln_wiper(
95 chassis_detail->mutable_light()->set_lincoln_wiper(
99 chassis_detail->mutable_light()->set_lincoln_wiper(
109 chassis_detail->mutable_light()->set_lincoln_wiper(
113 chassis_detail->mutable_light()->set_lincoln_wiper(
117 chassis_detail->mutable_light()->set_lincoln_wiper(
137 chassis_detail->mutable_light()->set_lincoln_ambient(
141 chassis_detail->mutable_light()->set_lincoln_ambient(
145 chassis_detail->mutable_light()->set_lincoln_ambient(
149 chassis_detail->mutable_light()->set_lincoln_ambient(
153 chassis_detail->mutable_light()->set_lincoln_ambient(
157 chassis_detail->mutable_light()->set_lincoln_ambient(
163 chassis_detail->mutable_basic()->set_acc_on_button(
165 chassis_detail->mutable_basic()->set_acc_off_button(
167 chassis_detail->mutable_basic()->set_acc_res_button(
169 chassis_detail->mutable_basic()->set_acc_cancel_button(
171 chassis_detail->mutable_basic()->set_acc_on_off_button(
173 chassis_detail->mutable_basic()->set_acc_res_cancel_button(
175 chassis_detail->mutable_basic()->set_acc_inc_spd_button(
177 chassis_detail->mutable_basic()->set_acc_dec_spd_button(
179 chassis_detail->mutable_basic()->set_acc_inc_gap_button(
181 chassis_detail->mutable_basic()->set_acc_dec_gap_button(
183 chassis_detail->mutable_basic()->set_lka_button(
185 chassis_detail->mutable_basic()->set_canbus_fault(
190 chassis_detail->mutable_safety()->set_is_driver_car_door_close(
false);
192 chassis_detail->mutable_safety()->set_is_driver_car_door_close(
true);
195 chassis_detail->mutable_safety()->set_is_passenger_door_open(
197 chassis_detail->mutable_safety()->set_is_rearleft_door_open(
199 chassis_detail->mutable_safety()->set_is_rearright_door_open(
201 chassis_detail->mutable_safety()->set_is_hood_open(
203 chassis_detail->mutable_safety()->set_is_trunk_open(
205 chassis_detail->mutable_safety()->set_is_passenger_detected(
207 chassis_detail->mutable_safety()->set_is_passenger_airbag_enabled(
215 chassis_detail->mutable_safety()->set_is_driver_buckled(
217 chassis_detail->mutable_safety()->set_is_passenger_buckled(
226 int32_t length)
const {
227 Byte frame(bytes + 0);
228 int32_t x = frame.get_byte(0, 2);
233 int32_t length)
const {
234 Byte frame(bytes + 0);
235 int32_t x = frame.get_byte(2, 2);
240 Byte frame(bytes + 0);
241 int32_t x = frame.get_byte(4, 4);
246 int32_t length)
const {
247 Byte frame(bytes + 1);
248 int32_t x = frame.get_byte(0, 3);
253 int32_t length)
const {
254 Byte frame(bytes + 1);
255 return frame.is_bit_1(3);
259 int32_t length)
const {
260 Byte frame(bytes + 1);
261 return frame.is_bit_1(4);
265 int32_t length)
const {
266 Byte frame(bytes + 1);
267 return frame.is_bit_1(5);
271 int32_t length)
const {
272 Byte frame(bytes + 1);
273 return frame.is_bit_1(6);
277 int32_t length)
const {
278 Byte frame(bytes + 2);
279 return frame.is_bit_1(0);
283 int32_t length)
const {
284 Byte frame(bytes + 2);
285 return frame.is_bit_1(1);
289 int32_t length)
const {
290 Byte frame(bytes + 2);
291 return frame.is_bit_1(2);
295 int32_t length)
const {
296 Byte frame(bytes + 2);
297 return frame.is_bit_1(3);
301 int32_t length)
const {
302 Byte frame(bytes + 2);
303 return frame.is_bit_1(4);
307 int32_t length)
const {
308 Byte frame(bytes + 2);
309 return frame.is_bit_1(5);
313 int32_t length)
const {
314 Byte frame(bytes + 2);
315 return frame.is_bit_1(6);
319 Byte frame(bytes + 2);
320 return frame.is_bit_1(7);
324 int32_t length)
const {
325 Byte frame(bytes + 3);
326 return frame.is_bit_1(0);
330 int32_t length)
const {
331 Byte frame(bytes + 3);
332 return frame.is_bit_1(1);
336 int32_t length)
const {
337 Byte frame(bytes + 3);
338 return frame.is_bit_1(2);
342 int32_t length)
const {
343 Byte frame(bytes + 3);
344 return frame.is_bit_1(3);
348 Byte frame(bytes + 3);
349 return frame.is_bit_1(4);
353 Byte frame(bytes + 3);
354 return frame.is_bit_1(5);
358 int32_t length)
const {
359 Byte frame(bytes + 3);
360 return frame.is_bit_1(6);
364 int32_t length)
const {
365 Byte frame(bytes + 3);
366 return frame.is_bit_1(7);
370 int32_t length)
const {
371 Byte frame(bytes + 4);
372 return frame.is_bit_1(0);
376 int32_t length)
const {
377 Byte frame(bytes + 4);
378 return frame.is_bit_1(1);
bool is_passenger_airbag_enabled(const std::uint8_t *bytes, int32_t length) const
check the passenger airbag enabled bit based on byte array.
bool is_acc_cancel_pressed(const std::uint8_t *bytes, int32_t length) const
check acc cancel pressed bit based on byte array.
bool is_rear_left_door_open(const std::uint8_t *bytes, int32_t length) const
check the passenger door open bit based on byte array.
bool is_acc_off_pressed(const std::uint8_t *bytes, int32_t length) const
check acc off pressed bit based on byte array.
bool is_hood_open(const std::uint8_t *bytes, int32_t length) const
check the hood open bit based on byte array.
bool is_lka_on_or_off_pressed(const std::uint8_t *bytes, int32_t length) const
check the lka on or off pressed bit based on byte array.
virtual void Parse(const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
bool is_passenger_belt_buckled(const std::uint8_t *bytes, int32_t length) const
check the passenger belt buckled bit based on byte array.
bool is_acc_resume_or_cancel_pressed(const std::uint8_t *bytes, int32_t length) const
check acc resume or cancel pressed bit based on byte array.
int32_t turn_signal_status(const std::uint8_t *bytes, int32_t length) const
calculate the turn signal status based on byte array.
bool is_acc_decrement_following_gap_pressed(const std::uint8_t *bytes, int32_t length) const
check the acc decrement following gap pressed bit based on byte array.
bool is_canbus_fault(const std::uint8_t *bytes, int32_t length) const
check the canbus fault bit based on byte array.
bool is_driver_door_open(const std::uint8_t *bytes, int32_t length) const
check the driver door open bit based on byte array.
int32_t ambient_light_status(const std::uint8_t *bytes, int32_t length) const
calculate the ambient light status based on byte array.
bool is_driver_belt_buckled(const std::uint8_t *bytes, int32_t length) const
check the driver belt buckled bit based on byte array.
bool is_acc_decrement_set_speed_pressed(const std::uint8_t *bytes, int32_t length) const
check the acc decrement set speed pressed bit based on byte array.
bool is_trunk_open(const std::uint8_t *bytes, int32_t length) const
check the trunk open bit based on byte array.
int32_t wiper_status(const std::uint8_t *bytes, int32_t length) const
calculate the wiper status based on byte array.
int32_t high_beam_status(const std::uint8_t *bytes, int32_t length) const
calculate the high beam status based on byte array.
bool is_passenger_door_open(const std::uint8_t *bytes, int32_t length) const
check the passenger door open bit based on byte array.
bool is_acc_on_pressed(const std::uint8_t *bytes, int32_t length) const
check acc on pressed bit based on byte array.
bool is_acc_increment_following_gap_pressed(const std::uint8_t *bytes, int32_t length) const
check the acc increment following gap pressed bit based on byte array.
bool is_acc_on_or_off_pressed(const std::uint8_t *bytes, int32_t length) const
check acc on or off pressed bit based on byte array.
bool is_acc_increment_set_speed_pressed(const std::uint8_t *bytes, int32_t length) const
check the acc increment set speed pressed bit based on byte array.
bool is_rear_right_door_open(const std::uint8_t *bytes, int32_t length) const
check the rear right door open bit based on byte array.
bool is_acc_resume_pressed(const std::uint8_t *bytes, int32_t length) const
check acc resume pressed bit based on byte array.
bool is_passenger_detected(const std::uint8_t *bytes, int32_t length) const
check the passenger detected bit based on byte array.
the class of Misc69 (for lincoln vehicle)