Apollo  6.0
Open source self driving car software
motion_input_speed_300.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2018 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 
17 #pragma once
18 
19 #include <cmath>
20 
22 #include "modules/drivers/proto/conti_radar.pb.h"
23 
24 namespace apollo {
25 namespace drivers {
26 namespace conti_radar {
27 
28 using apollo::drivers::ContiRadar;
29 using apollo::drivers::conti_radar::OutputType;
30 using apollo::drivers::conti_radar::RadarConf;
31 using apollo::drivers::conti_radar::RcsThreshold;
32 
34  : public apollo::drivers::canbus::ProtocolData<ContiRadar> {
35  public:
36  static const uint32_t ID;
43  uint32_t GetPeriod() const override;
44 
49  void UpdateData(uint8_t* data) override;
50 
54  void Reset() override;
55 
56  void SetSpeed(const float& speed);
57 
58  private:
59  float speed_ = NAN;
60 };
61 
62 } // namespace conti_radar
63 } // namespace drivers
64 } // namespace apollo
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
void Reset() override
reset the private variables
void UpdateData(uint8_t *data) override
update the data
Definition: motion_input_speed_300.h:33
uint32_t GetPeriod() const override
get the data period
static const uint32_t ID
Definition: motion_input_speed_300.h:36
The class of ProtocolData.