Apollo 10.0
自动驾驶开放平台
dreamview.h
浏览该文件的文档.
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
17#pragma once
18
19#include <map>
20#include <memory>
21#include <string>
22
23#include "CivetServer.h"
24
25#include "cyber/cyber.h"
43#if WITH_TELEOP == 1
45#endif
46
51namespace apollo {
52namespace dreamview {
53
54class Dreamview {
55 public:
57
60 void Stop();
61 void RegisterUpdaters();
62
63 private:
64 void TerminateProfilingMode();
65 bool PluginCallbackHMI(const std::string& function_name,
66 const nlohmann::json& param_json);
67 nlohmann::json HMICallbackOtherService(const std::string& function_name,
68 const nlohmann::json& param_json);
69 bool PointCloudCallback(const std::string& param_string);
70
71 std::unique_ptr<cyber::Timer> exit_timer_;
72
73 std::unique_ptr<PointCloudUpdater> point_cloud_updater_;
74 std::unique_ptr<CivetServer> server_;
75 std::unique_ptr<WebSocketHandler> websocket_ = nullptr;
76 std::unique_ptr<WebSocketHandler> map_ws_ = nullptr;
77 std::unique_ptr<WebSocketHandler> point_cloud_ws_ = nullptr;
78 std::unique_ptr<WebSocketHandler> camera_ws_ = nullptr;
79 std::unique_ptr<WebSocketHandler> plugin_ws_ = nullptr;
80 std::unique_ptr<WebSocketHandler> sim_world_ws_ = nullptr;
81 std::unique_ptr<WebSocketHandler> obstacle_ws_ = nullptr;
82 std::unique_ptr<WebSocketHandler> hmi_ws_;
83 std::unique_ptr<WebSocketHandler> socket_manager_ws_;
84 std::unique_ptr<WebSocketHandler> channels_info_ws_ = nullptr;
85 std::unique_ptr<DvPluginManager> dv_plugin_manager_ = nullptr;
86 std::unique_ptr<ImageHandler> image_;
87 std::unique_ptr<ProtoHandler> proto_handler_;
88 std::unique_ptr<MapService> map_service_;
89 std::unique_ptr<HMI> hmi_;
90 std::unique_ptr<PerceptionCameraUpdater> perception_camera_updater_;
91 std::unique_ptr<MapUpdater> map_updater_;
92 std::unique_ptr<PluginManager> plugin_manager_;
93 std::unique_ptr<SocketManager> socket_manager_;
94 std::unique_ptr<SimulationWorldUpdater> sim_world_updater_ = nullptr;
95 std::unique_ptr<UpdaterManager> updater_manager_ = nullptr;
96 std::unique_ptr<ObstacleUpdater> obstacle_updater_ = nullptr;
97 std::unique_ptr<ChannelsUpdater> channels_info_updater_ = nullptr;
98#if WITH_TELEOP == 1
99 std::unique_ptr<TeleopService> teleop_;
100 std::unique_ptr<WebSocketHandler> teleop_ws_;
101#endif
102};
103
104} // namespace dreamview
105} // namespace apollo
A general class to denote the return status of an API call.
Definition status.h:43
apollo::common::Status Init()
apollo::common::Status Start()
class register implement
Definition arena_queue.h:37
SocketManager to manage all websocket
UpdaterManager to manage all data updater.