Apollo 10.0
自动驾驶开放平台
spliter.h
浏览该文件的文档.
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#ifndef CYBER_TOOLS_CYBER_RECORDER_SPLITER_H_
18#define CYBER_TOOLS_CYBER_RECORDER_SPLITER_H_
19
20#include <algorithm>
21#include <limits>
22#include <memory>
23#include <string>
24#include <vector>
25
26#include "cyber/common/log.h"
27#include "cyber/proto/record.pb.h"
31
32using ::apollo::cyber::proto::ChannelCache;
33using ::apollo::cyber::proto::ChunkBody;
34using ::apollo::cyber::proto::ChunkHeader;
35using ::apollo::cyber::proto::Header;
36
37namespace apollo {
38namespace cyber {
39namespace record {
40
41class Spliter {
42 public:
43 Spliter(const std::string& input_file, const std::string& output_file,
44 const std::vector<std::string>& white_channels,
45 const std::vector<std::string>& black_channels,
46 uint64_t begin_time = 0,
47 uint64_t end_time = std::numeric_limits<uint64_t>::max());
48 virtual ~Spliter();
49 bool Proc();
50
51 private:
52 RecordFileReader reader_;
53 RecordFileWriter writer_;
54 std::string input_file_;
55 std::string output_file_;
56 std::vector<std::string> white_channels_;
57 std::vector<std::string> black_channels_;
58 bool all_channels_;
59 uint64_t begin_time_;
60 uint64_t end_time_;
61};
62
63} // namespace record
64} // namespace cyber
65} // namespace apollo
66
67#endif // CYBER_TOOLS_CYBER_RECORDER_SPLITER_H_
class register implement
Definition arena_queue.h:37