Apollo  6.0
Open source self driving car software
steering_64.h
Go to the documentation of this file.
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/proto/chassis_detail.pb.h"
26 
31 namespace apollo {
32 namespace canbus {
33 namespace lincoln {
34 
41  ::apollo::canbus::ChassisDetail> {
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 
78  Steering64 *set_steering_angle(double angle);
79 
84  Steering64 *set_steering_angle_speed(double angle_speed);
85 
86  private:
92  void set_steering_angle_p(uint8_t *data, double angle);
93 
99  void set_enable_p(uint8_t *bytes, bool enable);
100 
106  void set_clear_driver_override_flag_p(uint8_t *bytes, bool clear);
107 
113  void set_ignore_driver_override_p(uint8_t *bytes, bool ignore);
114 
121  void set_steering_angle_speed_p(uint8_t *data, double angle_speed);
122 
128  void set_watchdog_counter_p(uint8_t *data, int32_t count);
129 
130  void set_disable_audible_warning_p(uint8_t *data, bool disable);
131 
132  private:
133  double steering_angle_ = 0.0;
134  bool steering_enable_ = false;
135  bool clear_driver_override_flag_ = false;
136  bool ignore_driver_override_ = false;
137  double steering_angle_speed_ = 0.0;
138  int32_t watchdog_counter_ = 0;
139  bool disable_audible_warning_ = false;
140 };
141 
142 } // namespace lincoln
143 } // namespace canbus
144 } // namespace apollo
Steering64 * set_steering_angle_speed(double angle_speed)
set steering angle speed
virtual void UpdateData(uint8_t *data)
update the data
one of the protocol data of lincoln vehicle
Definition: steering_64.h:40
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
This is the base class of protocol data.
Definition: protocol_data.h:44
static const int32_t ID
Definition: steering_64.h:43
virtual void Reset()
reset the private variables
Steering64 * set_steering_angle(double angle)
set steering angle
The class of ProtocolData.
virtual uint32_t GetPeriod() const
get the data period
Steering64 * set_disable()
set steering request disable to true
Steering64 * set_enable()
set steering request enable to true