Apollo 10.0
自动驾驶开放平台
throttle_63.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 chassis_detail the parsed chassis_detail
50 */
51 virtual void Parse(const std::uint8_t *bytes, int32_t length,
52 Lincoln *chassis_detail) const;
53
64 double pedal_input(const std::uint8_t *bytes, int32_t length) const;
65
76 double pedal_cmd(const std::uint8_t *bytes, int32_t length) const;
77
88 double pedal_output(const std::uint8_t *bytes, int32_t length) const;
89
99 int32_t watchdog_counter_source(const std::uint8_t *bytes,
100 int32_t length) const;
101
111 bool is_enabled(const std::uint8_t *bytes, int32_t length) const;
112
122 bool is_driver_override(const std::uint8_t *bytes, int32_t length) const;
123
133 bool is_driver_activity(const std::uint8_t *bytes, int32_t length) const;
134
144 bool is_watchdog_counter_fault(const std::uint8_t *bytes,
145 int32_t length) const;
146
156 bool is_channel_1_fault(const std::uint8_t *bytes, int32_t length) const;
157
167 bool is_channel_2_fault(const std::uint8_t *bytes, int32_t length) const;
168
178 bool is_connector_fault(const std::uint8_t *bytes, int32_t length) const;
179};
180
181} // namespace lincoln
182} // namespace canbus
183} // namespace apollo
one of the protocol data of lincoln vehicle
Definition throttle_63.h:41
bool is_driver_override(const std::uint8_t *bytes, int32_t length) const
check driver override bit based on byte array.
double pedal_cmd(const std::uint8_t *bytes, int32_t length) const
calculate pedal command based on byte array.
double pedal_output(const std::uint8_t *bytes, int32_t length) const
calculate pedal output based on byte array.
bool is_connector_fault(const std::uint8_t *bytes, int32_t length) const
check connector fault bit based on byte array.
double pedal_input(const std::uint8_t *bytes, int32_t length) const
calculate pedal input based on byte array.
bool is_channel_2_fault(const std::uint8_t *bytes, int32_t length) const
check channel 2 fault bit based on byte array.
bool is_watchdog_counter_fault(const std::uint8_t *bytes, int32_t length) const
check watchdog counter fault bit based on byte array.
bool is_enabled(const std::uint8_t *bytes, int32_t length) const
check enabled bit based on byte array.
virtual void Parse(const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
bool is_channel_1_fault(const std::uint8_t *bytes, int32_t length) const
check channel 1 fault bit based on byte array.
bool is_driver_activity(const std::uint8_t *bytes, int32_t length) const
check driver activity bit based on byte array.
int32_t watchdog_counter_source(const std::uint8_t *bytes, int32_t length) const
calculate watchdog counter source based on byte array.
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData