mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-21 01:46:48 +02:00
Started refactoring of WriterManager
This commit is contained in:
@@ -21,12 +21,9 @@ class WriterManager
|
||||
{
|
||||
|
||||
std::unordered_map<std::string, boost::any> parameters = {};
|
||||
std::mutex parameters_mutex;
|
||||
|
||||
// Initialize in constructor.
|
||||
const std::unordered_map<std::string, DATA_TYPE>& parameters_type;
|
||||
std::string output_file;
|
||||
size_t n_frames;
|
||||
std::atomic_bool running_flag;
|
||||
std::atomic_bool killed_flag;
|
||||
std::atomic<uint64_t> n_received_frames;
|
||||
@@ -34,27 +31,26 @@ class WriterManager
|
||||
std::atomic<uint64_t> n_lost_frames;
|
||||
|
||||
public:
|
||||
WriterManager(const std::unordered_map<std::string, DATA_TYPE>& parameters_type, const std::string& output_file, uint64_t n_frames=0);
|
||||
WriterManager(const std::unordered_map<std::string, DATA_TYPE>& parameters_type);
|
||||
virtual ~WriterManager();
|
||||
|
||||
void start(const std::unordered_map<std::string, boost:any>& parameters);
|
||||
const std::unordered_map<std::string, DATA_TYPE>& get_parameters_type() const;
|
||||
void stop();
|
||||
void kill();
|
||||
std::string get_status();
|
||||
std::unordered_map<std::string, uint64_t> get_statistics() const;
|
||||
|
||||
bool is_running();
|
||||
bool is_killed() const;
|
||||
std::string get_status();
|
||||
bool are_all_parameters_set();
|
||||
std::string get_output_file() const;
|
||||
|
||||
const std::unordered_map<std::string, DATA_TYPE>& get_parameters_type() const;
|
||||
std::unordered_map<std::string, boost::any> get_parameters();
|
||||
void set_parameters(const std::unordered_map<std::string, boost::any>& new_parameters);
|
||||
|
||||
std::unordered_map<std::string, uint64_t> get_statistics() const;
|
||||
void received_frame(size_t frame_index);
|
||||
void written_frame(size_t frame_index);
|
||||
void lost_frame(size_t frame_index);
|
||||
|
||||
size_t get_n_frames();
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user