Apollo 10.0
自动驾驶开放平台
preprocess_monitor.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2020 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#include <string>
25#include <unordered_map>
26#include <vector>
27
28#include <boost/thread/shared_mutex.hpp>
29
30#include "nlohmann/json.hpp"
31
32#include "modules/dreamview/proto/preprocess_table.pb.h"
33
34#include "cyber/cyber.h"
37
42namespace apollo {
43namespace dreamview {
44
51 public:
56 explicit PreprocessMonitor(const std::string& task_name);
58
62 void Start() override;
63
67 void Stop() override;
68
72 nlohmann::json GetProgressAsJson() override;
73
74 private:
75 void InitReaders();
76 void OnProgress(const std::shared_ptr<Progress>& progress);
77 void LoadConfiguration();
78
79 PreprocessTable preprocess_table_;
80
81 std::string task_name_ = "";
82 std::unique_ptr<cyber::Node> node_;
83
84 nlohmann::json current_status_json_;
85
86 // Mutex to protect concurrent access to current_progress_json_.
87 // NOTE: Use boost until we have std version of rwlock support.
88 boost::shared_mutex mutex_;
89};
90
91} // namespace dreamview
92} // namespace apollo
A base class that monitor progress for Fuel client
A module that monitor data preprocess progress for sensor calibration purpose.
nlohmann::json GetProgressAsJson() override
return preprocess progress as json
void Stop() override
stop monitoring preprocess progress
PreprocessMonitor()
Constructor of PreprocessMonitor.
void Start() override
start monitoring preprocess progress
class register implement
Definition arena_queue.h:37