diff --git a/core-buffer/include/buffer_config.hpp b/core-buffer/include/buffer_config.hpp index b44c87e..8ef7b02 100644 --- a/core-buffer/include/buffer_config.hpp +++ b/core-buffer/include/buffer_config.hpp @@ -24,6 +24,8 @@ namespace core_buffer { const size_t STATS_MODULO = 100; // If the RB is empty, how much time to wait before trying to read it again. const size_t RB_READ_RETRY_INTERVAL_MS = 5; + // How many frames to read at once from file. + const size_t BUFFER_BLOCK_SIZE = 100; const size_t BUFFER_UDP_N_RECV_MSG = 64; @@ -45,14 +47,6 @@ namespace core_buffer { const size_t STREAM_RCVHWM = 100; // Size of buffer between the receiving and sending part. const int STREAM_FASTQUEUE_SLOTS = 5; - - - // How many frames to read at once from file. - const size_t BUFFER_BLOCK_SIZE = 100; - // MS to retry reading from the image assembler. - const size_t WRITER_IMAGE_ASSEMBLER_RETRY_MS = 5; - // Number of slots in the reconstruction buffer. - const size_t WRITER_IA_N_SLOTS = 2; } #endif //BUFFERCONFIG_HPP diff --git a/sf-writer/include/JFH5Writer.hpp b/sf-writer/include/JFH5Writer.hpp index 7432122..e71ceca 100644 --- a/sf-writer/include/JFH5Writer.hpp +++ b/sf-writer/include/JFH5Writer.hpp @@ -4,7 +4,7 @@ #include #include #include -#include "buffer_config.hpp" + #include "formats.hpp" class JFH5Writer { diff --git a/sf-writer/include/writer_config.hpp b/sf-writer/include/writer_config.hpp new file mode 100644 index 0000000..8d1c04b --- /dev/null +++ b/sf-writer/include/writer_config.hpp @@ -0,0 +1,9 @@ +#include + +namespace writer_config +{ + // MS to retry reading from the image assembler. + const size_t WRITER_IMAGE_ASSEMBLER_RETRY_MS = 5; + // Number of slots in the reconstruction buffer. + const size_t WRITER_IA_N_SLOTS = 2; +} \ No newline at end of file diff --git a/sf-writer/src/BufferBinaryReader.cpp b/sf-writer/src/BufferBinaryReader.cpp index 0c1eeee..d239af8 100644 --- a/sf-writer/src/BufferBinaryReader.cpp +++ b/sf-writer/src/BufferBinaryReader.cpp @@ -7,8 +7,11 @@ #include #include "BufferUtils.hpp" +#include "writer_config.hpp" +#include "buffer_config.hpp" using namespace std; +using namespace writer_config; using namespace core_buffer; BufferBinaryReader::BufferBinaryReader( @@ -18,9 +21,7 @@ BufferBinaryReader::BufferBinaryReader( channel_name_(channel_name), current_input_file_(""), input_file_fd_(-1) -{ - -} +{} BufferBinaryReader::~BufferBinaryReader() { diff --git a/sf-writer/src/ImageAssembler.cpp b/sf-writer/src/ImageAssembler.cpp index f3e0139..b16b285 100644 --- a/sf-writer/src/ImageAssembler.cpp +++ b/sf-writer/src/ImageAssembler.cpp @@ -1,7 +1,11 @@ #include + #include "ImageAssembler.hpp" +#include "writer_config.hpp" +#include "buffer_config.hpp" using namespace std; +using namespace writer_config; using namespace core_buffer; ImageAssembler::ImageAssembler(const size_t n_modules) : diff --git a/sf-writer/src/JFH5Writer.cpp b/sf-writer/src/JFH5Writer.cpp index 17a2110..4692cf7 100644 --- a/sf-writer/src/JFH5Writer.cpp +++ b/sf-writer/src/JFH5Writer.cpp @@ -1,8 +1,11 @@ #include "JFH5Writer.hpp" + #include #include #include +#include "writer_config.hpp" +#include "buffer_config.hpp" //extern "C" //{ @@ -11,6 +14,7 @@ //} using namespace std; +using namespace writer_config; using namespace core_buffer; JFH5Writer::JFH5Writer(const std::string& output_file, diff --git a/sf-writer/src/main.cpp b/sf-writer/src/main.cpp index 1e2de6d..9bfae69 100644 --- a/sf-writer/src/main.cpp +++ b/sf-writer/src/main.cpp @@ -2,10 +2,10 @@ #include #include #include -#include #include "date.h" #include "zmq.h" +#include "writer_config.hpp" #include "buffer_config.hpp" #include "bitshuffle/bitshuffle.h" #include "JFH5Writer.hpp" @@ -13,6 +13,7 @@ #include "BufferBinaryReader.hpp" using namespace std; +using namespace writer_config; using namespace core_buffer; using namespace chrono;