Apollo 10.0
自动驾驶开放平台
misc_69.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2017 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
22#pragma once
23
24#include "modules/canbus_vehicle/lincoln/proto/lincoln.pb.h"
26
31namespace apollo {
32namespace canbus {
33namespace lincoln {
34
41 ::apollo::canbus::Lincoln> {
42 public:
43 static const int32_t ID;
44
45 /*
46 * @brief parse received data
47 * @param bytes a pointer to the input bytes
48 * @param length the length of the input bytes
49 * @param timestamp the timestamp of input data
50 * @param chassis_detail the parsed chassis_detail
51 */
52 virtual void Parse(const std::uint8_t *bytes, int32_t length,
53 Lincoln *chassis_detail) const;
54
64 int32_t turn_signal_status(const std::uint8_t *bytes, int32_t length) const;
65
75 int32_t high_beam_status(const std::uint8_t *bytes, int32_t length) const;
76
86 int32_t wiper_status(const std::uint8_t *bytes, int32_t length) const;
87
97 int32_t ambient_light_status(const std::uint8_t *bytes, int32_t length) const;
98
108 bool is_acc_on_pressed(const std::uint8_t *bytes, int32_t length) const;
109
119 bool is_acc_off_pressed(const std::uint8_t *bytes, int32_t length) const;
120
130 bool is_acc_resume_pressed(const std::uint8_t *bytes, int32_t length) const;
131
141 bool is_acc_cancel_pressed(const std::uint8_t *bytes, int32_t length) const;
142
152 bool is_acc_on_or_off_pressed(const std::uint8_t *bytes,
153 int32_t length) const;
154
164 bool is_acc_resume_or_cancel_pressed(const std::uint8_t *bytes,
165 int32_t length) const;
166
176 bool is_acc_increment_set_speed_pressed(const std::uint8_t *bytes,
177 int32_t length) const;
178
188 bool is_acc_decrement_set_speed_pressed(const std::uint8_t *bytes,
189 int32_t length) const;
190
201 bool is_acc_increment_following_gap_pressed(const std::uint8_t *bytes,
202 int32_t length) const;
203
214 bool is_acc_decrement_following_gap_pressed(const std::uint8_t *bytes,
215 int32_t length) const;
216
226 bool is_lka_on_or_off_pressed(const std::uint8_t *bytes,
227 int32_t length) const;
228
238 bool is_canbus_fault(const std::uint8_t *bytes, int32_t length) const;
239
249 bool is_driver_door_open(const std::uint8_t *bytes, int32_t length) const;
250
260 bool is_passenger_door_open(const std::uint8_t *bytes, int32_t length) const;
261
271 bool is_rear_left_door_open(const std::uint8_t *bytes, int32_t length) const;
272
282 bool is_rear_right_door_open(const std::uint8_t *bytes, int32_t length) const;
283
293 bool is_hood_open(const std::uint8_t *bytes, int32_t length) const;
294
304 bool is_trunk_open(const std::uint8_t *bytes, int32_t length) const;
305
315 bool is_passenger_detected(const std::uint8_t *bytes, int32_t length) const;
316
326 bool is_passenger_airbag_enabled(const std::uint8_t *bytes,
327 int32_t length) const;
328
338 bool is_driver_belt_buckled(const std::uint8_t *bytes, int32_t length) const;
339
349 bool is_passenger_belt_buckled(const std::uint8_t *bytes,
350 int32_t length) const;
351};
352
353} // namespace lincoln
354} // namespace canbus
355} // namespace apollo
one of the protocol data of lincoln vehicle
Definition misc_69.h:41
bool is_passenger_airbag_enabled(const std::uint8_t *bytes, int32_t length) const
check the passenger airbag enabled bit based on byte array.
Definition misc_69.cc:363
bool is_acc_cancel_pressed(const std::uint8_t *bytes, int32_t length) const
check acc cancel pressed bit based on byte array.
Definition misc_69.cc:270
static const int32_t ID
Definition misc_69.h:43
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.
Definition misc_69.cc:335
bool is_acc_off_pressed(const std::uint8_t *bytes, int32_t length) const
check acc off pressed bit based on byte array.
Definition misc_69.cc:258
bool is_hood_open(const std::uint8_t *bytes, int32_t length) const
check the hood open bit based on byte array.
Definition misc_69.cc:347
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.
Definition misc_69.cc:312
virtual void Parse(const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
Definition misc_69.cc:29
bool is_passenger_belt_buckled(const std::uint8_t *bytes, int32_t length) const
check the passenger belt buckled bit based on byte array.
Definition misc_69.cc:375
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.
Definition misc_69.cc:282
int32_t turn_signal_status(const std::uint8_t *bytes, int32_t length) const
calculate the turn signal status based on byte array.
Definition misc_69.cc:225
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.
Definition misc_69.cc:306
bool is_canbus_fault(const std::uint8_t *bytes, int32_t length) const
check the canbus fault bit based on byte array.
Definition misc_69.cc:318
bool is_driver_door_open(const std::uint8_t *bytes, int32_t length) const
check the driver door open bit based on byte array.
Definition misc_69.cc:323
int32_t ambient_light_status(const std::uint8_t *bytes, int32_t length) const
calculate the ambient light status based on byte array.
Definition misc_69.cc:245
bool is_driver_belt_buckled(const std::uint8_t *bytes, int32_t length) const
check the driver belt buckled bit based on byte array.
Definition misc_69.cc:369
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.
Definition misc_69.cc:294
bool is_trunk_open(const std::uint8_t *bytes, int32_t length) const
check the trunk open bit based on byte array.
Definition misc_69.cc:352
int32_t wiper_status(const std::uint8_t *bytes, int32_t length) const
calculate the wiper status based on byte array.
Definition misc_69.cc:239
int32_t high_beam_status(const std::uint8_t *bytes, int32_t length) const
calculate the high beam status based on byte array.
Definition misc_69.cc:232
bool is_passenger_door_open(const std::uint8_t *bytes, int32_t length) const
check the passenger door open bit based on byte array.
Definition misc_69.cc:329
bool is_acc_on_pressed(const std::uint8_t *bytes, int32_t length) const
check acc on pressed bit based on byte array.
Definition misc_69.cc:252
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.
Definition misc_69.cc:300
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.
Definition misc_69.cc:276
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.
Definition misc_69.cc:288
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.
Definition misc_69.cc:341
bool is_acc_resume_pressed(const std::uint8_t *bytes, int32_t length) const
check acc resume pressed bit based on byte array.
Definition misc_69.cc:264
bool is_passenger_detected(const std::uint8_t *bytes, int32_t length) const
check the passenger detected bit based on byte array.
Definition misc_69.cc:357
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData