Apollo 10.0
自动驾驶开放平台
gear_66.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
49 virtual uint32_t GetPeriod() const;
50
55 virtual void UpdateData(uint8_t *data);
56
60 virtual void Reset();
61
67
73
79
85
91
97
98 private:
105 void set_gear_p(uint8_t *data, int32_t gear);
106
113 void set_clear_driver_override_flag_p(uint8_t *bytes);
114
115 private:
116 int32_t gear_ = 0;
117 bool update_ = false;
118};
119
120} // namespace lincoln
121} // namespace canbus
122} // namespace apollo
one of the protocol data of lincoln vehicle
Definition gear_66.h:41
Gear66 * set_gear_low()
set gear to low
Definition gear_66.cc:68
Gear66 * set_gear_reverse()
set gear to reverse
Definition gear_66.cc:53
virtual void Reset()
reset the private variables
Definition gear_66.cc:41
static const int32_t ID
Definition gear_66.h:43
Gear66 * set_gear_park()
set gear to park
Definition gear_66.cc:48
Gear66 * set_gear_drive()
set gear to drive
Definition gear_66.cc:63
virtual uint32_t GetPeriod() const
get the data period
Definition gear_66.cc:30
virtual void UpdateData(uint8_t *data)
update the data
Definition gear_66.cc:36
Gear66 * set_gear_none()
set gear to none
Definition gear_66.cc:43
Gear66 * set_gear_neutral()
set gear to neutral
Definition gear_66.cc:58
This is the base class of protocol data.
class register implement
Definition arena_queue.h:37
The class of ProtocolData