Apollo 10.0
自动驾驶开放平台
brake_61.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
55 private:
66 double pedal_input(const std::uint8_t *bytes, int32_t length) const;
67
78 double pedal_cmd(const std::uint8_t *bytes, int32_t length) const;
79
90 double pedal_output(const std::uint8_t *bytes, int32_t length) const;
91
92 double parse_two_frames(const std::uint8_t low_byte,
93 const std::uint8_t high_byte) const;
94
104 bool boo_input(const std::uint8_t *bytes, int32_t length) const;
105
115 bool boo_cmd(const std::uint8_t *bytes, int32_t length) const;
116
126 bool boo_output(const std::uint8_t *bytes, int32_t length) const;
127
137 bool is_watchdog_counter_applying_brakes(const std::uint8_t *bytes,
138 int32_t length) const;
139
149 int32_t watchdog_counter_source(const std::uint8_t *bytes,
150 int32_t length) const;
151
161 bool is_enabled(const std::uint8_t *bytes, int32_t length) const;
162
172 bool is_driver_override(const std::uint8_t *bytes, int32_t length) const;
173
183 bool is_driver_activity(const std::uint8_t *bytes, int32_t length) const;
184
194 bool is_watchdog_counter_fault(const std::uint8_t *bytes,
195 int32_t length) const;
196
206 bool is_channel_1_fault(const std::uint8_t *bytes, int32_t length) const;
207
217 bool is_channel_2_fault(const std::uint8_t *bytes, int32_t length) const;
218
228 bool is_boo_switch_fault(const std::uint8_t *bytes, int32_t length) const;
229
239 bool is_connector_fault(const std::uint8_t *bytes, int32_t length) const;
240};
241
242} // namespace lincoln
243} // namespace canbus
244} // namespace apollo
one of the protocol data of lincoln vehicle
Definition brake_61.h:41
static const int32_t ID
Definition brake_61.h:43
virtual void Parse(const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
Definition brake_61.cc:32
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData