49class Recorder :
public std::enable_shared_from_this<Recorder> {
51 Recorder(
const std::string& output,
bool all_channels,
52 const std::vector<std::string>& white_channels,
53 const std::vector<std::string>& black_channels);
54 Recorder(
const std::string& output,
bool all_channels,
55 const std::vector<std::string>& white_channels,
56 const std::vector<std::string>& black_channels,
63 bool is_started_ =
false;
64 bool is_stopping_ =
false;
65 std::shared_ptr<Node> node_ =
nullptr;
66 std::shared_ptr<RecordWriter> writer_ =
nullptr;
67 std::shared_ptr<std::thread> display_thread_ =
nullptr;
70 bool all_channels_ =
true;
71 std::vector<std::string> white_channels_;
72 std::vector<std::regex> white_channel_patterns_;
73 std::vector<std::string> black_channels_;
74 std::vector<std::regex> black_channel_patterns_;
76 std::unordered_map<std::string, std::shared_ptr<ReaderBase>>
78 uint64_t message_count_;
79 uint64_t message_time_;
81 bool InitReadersImpl();
83 bool FreeReadersImpl();
85 bool InitReaderImpl(
const std::string& channel_name,
86 const std::string& message_type);
88 void TopologyCallback(
const ChangeMsg& msg);
90 void ReaderCallback(
const std::shared_ptr<RawMessage>& message,
91 const std::string& channel_name);