Apollo 10.0
自动驾驶开放平台
nano_radar_message_manager.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2021 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 "modules/common_msgs/sensor_msgs/nano_radar.pb.h"
26
27#include "cyber/cyber.h"
33
34namespace apollo {
35namespace drivers {
36namespace nano_radar {
37
39 : public apollo::drivers::canbus::MessageManager<NanoRadar> {
40 public:
42 const std::shared_ptr<apollo::cyber::Writer<NanoRadar>> &writer);
44 void set_radar_conf(RadarConf radar_conf);
46 const uint32_t message_id);
47 void Parse(const uint32_t message_id, const uint8_t *data, int32_t length);
48 void set_can_client(
49 std::shared_ptr<apollo::drivers::canbus::CanClient> can_client);
50
51 private:
52 bool is_configured_ = false;
53 RadarConfig200 radar_config_;
54 std::shared_ptr<apollo::drivers::canbus::CanClient> can_client_;
55 std::shared_ptr<apollo::cyber::Writer<NanoRadar>> nano_radar_writer_;
56};
57
58} // namespace nano_radar
59} // namespace drivers
60} // namespace apollo
Defines the CanClientFactory class.
Defines SenderMessage class and CanSender class.
message manager manages protocols.
This is the base class of protocol data.
void Parse(const uint32_t message_id, const uint8_t *data, int32_t length)
parse data and store parsed info in receive protocol data
apollo::drivers::canbus::ProtocolData< NanoRadar > * GetMutableProtocolDataById(const uint32_t message_id)
void set_can_client(std::shared_ptr< apollo::drivers::canbus::CanClient > can_client)
The class of MessageManager
class register implement
Definition arena_queue.h:37