#ifndef WRITERMANAGER_H #define WRITERMANAGER_H #include #include #include #include #include #include "H5Format.hpp" class WriterManager { std::map parameters = {}; std::mutex parameters_mutex; // Initialize in constructor. const std::map& parameters_type; std::string output_file; size_t n_frames; std::atomic_bool running_flag; std::atomic_bool killed_flag; std::atomic n_received_frames; std::atomic n_written_frames; std::atomic n_lost_frames; public: WriterManager(const std::map& parameters_type, const std::string& output_file, uint64_t n_frames=0); virtual ~WriterManager(); void stop(); void kill(); bool is_running(); bool is_killed(); std::string get_status(); bool are_all_parameters_set(); std::string get_output_file(); const std::map& get_parameters_type(); std::map get_parameters(); void set_parameters(const std::map& new_parameters); std::map get_statistics(); void received_frame(size_t frame_index); void written_frame(size_t frame_index); void lost_frame(size_t frame_index); }; #endif