Apollo  6.0
Open source self driving car software
turnsignal_68.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 int32_t turn_cmd() const;
56 
61  virtual void UpdateData(uint8_t *data);
62 
66  virtual void Reset();
67 
73 
79 
85 
86  private:
92  void set_turn_cmd_p(uint8_t *data, int32_t trncmd);
93 
94  private:
95  int32_t turn_cmd_ = 0;
96 };
97 
98 } // namespace lincoln
99 } // namespace canbus
100 } // namespace apollo
virtual uint32_t GetPeriod() const
get the data period
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
virtual int32_t turn_cmd() const
get the turn command
virtual void UpdateData(uint8_t *data)
update the data
Turnsignal68 * set_turn_right()
set turn right based on pedal command
static const int32_t ID
Definition: turnsignal_68.h:43
one of the protocol data of lincoln vehicle
Definition: turnsignal_68.h:40
Turnsignal68 * set_turn_left()
set turn left based on pedal command
Turnsignal68 * set_turn_none()
set no-turn based on pedal command
The class of ProtocolData.
virtual void Reset()
reset the private variables