Refactor the writer runner

This commit is contained in:
2018-02-07 16:31:30 +01:00
parent 857123cd29
commit 2cd3e654bd
3 changed files with 28 additions and 14 deletions
+7 -2
View File
@@ -5,8 +5,8 @@
using namespace std;
WriterManager::WriterManager(const map<string, DATA_TYPE>& parameters_type, uint64_t n_frames):
parameters_type(parameters_type), n_frames(n_frames), running_flag(true), killed_flag(false),
WriterManager::WriterManager(const map<string, DATA_TYPE>& parameters_type, const string& output_file, uint64_t n_frames):
parameters_type(parameters_type), output_file(output_file), n_frames(n_frames), running_flag(true), killed_flag(false),
n_received_frames(0), n_written_frames(0), n_lost_frames(0)
{
#ifdef DEBUG_OUTPUT
@@ -47,6 +47,11 @@ string WriterManager::get_status()
}
}
string WriterManager::get_output_file()
{
return output_file;
}
map<string, uint64_t> WriterManager::get_statistics()
{
map<string, uint64_t> result = {{"n_received_frames", n_received_frames.load()},