Apollo  6.0
Open source self driving car software
conti_radar_message_manager.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 
21 #pragma once
22 
23 #include <memory>
24 
25 #include "cyber/cyber.h"
29 #include "modules/drivers/proto/conti_radar.pb.h"
31 
32 namespace apollo {
33 namespace drivers {
34 namespace conti_radar {
35 
37  : public apollo::drivers::canbus::MessageManager<ContiRadar> {
38  public:
39  explicit ContiRadarMessageManager(
40  const std::shared_ptr<apollo::cyber::Writer<ContiRadar>> &writer);
42  void set_radar_conf(RadarConf radar_conf);
44  const uint32_t message_id);
45  void Parse(const uint32_t message_id, const uint8_t *data, int32_t length);
46  void set_can_client(
47  std::shared_ptr<apollo::drivers::canbus::CanClient> can_client);
48 
49  private:
50  bool is_configured_ = false;
51  RadarConfig200 radar_config_;
52  std::shared_ptr<apollo::drivers::canbus::CanClient> can_client_;
53  std::shared_ptr<apollo::cyber::Writer<ContiRadar>> conti_radar_writer_;
54 };
55 
56 } // namespace conti_radar
57 } // namespace drivers
58 } // namespace apollo
void set_can_client(std::shared_ptr< apollo::drivers::canbus::CanClient > can_client)
Definition: radar_config_200.h:31
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
The class of MessageManager.
ContiRadarMessageManager(const std::shared_ptr< apollo::cyber::Writer< ContiRadar >> &writer)
void Parse(const uint32_t message_id, const uint8_t *data, int32_t length)
parse data and store parsed info in protocol data
Definition: writer.h:42
Defines SenderMessage class and CanSender class.
apollo::drivers::canbus::ProtocolData< ContiRadar > * GetMutableProtocolDataById(const uint32_t message_id)
virtual ~ContiRadarMessageManager()
Definition: conti_radar_message_manager.h:41
message manager manages protocols. It supports parse and can get protocol data by message id...
Definition: message_manager.h:68
Defines the CanClientFactory class.
Definition: conti_radar_message_manager.h:36