diff --git a/core-buffer/include/formats.hpp b/core-buffer/include/formats.hpp index e1083ff..2e9acec 100644 --- a/core-buffer/include/formats.hpp +++ b/core-buffer/include/formats.hpp @@ -13,13 +13,26 @@ struct ImageMetadataBuffer uint16_t n_images; }; +const char BUFFER_FORMAT_START_BYTE = 0xBE; + #pragma pack(push) #pragma pack(1) -struct ReplayBuffer +struct BufferBinaryFormat { + + BufferBinaryFormat() : FORMAT_MARKER(BUFFER_FORMAT_START_BYTE) {}; + + const char FORMAT_MARKER; + ModuleFrame metadata; + char data[core_buffer::MODULE_N_BYTES]; +}; +#pragma pack(pop) + +#pragma pack(push) +#pragma pack(1) +struct BufferBlock { - ModuleFrame metadata[core_buffer::REPLAY_READ_BUFFER_SIZE]; + BufferBinaryFormat frame[core_buffer::REPLAY_READ_BUFFER_SIZE]; uint64_t start_pulse_id; - uint16_t n_frames; }; #pragma pack(pop) diff --git a/sf-buffer/include/BufferBinaryFormat.hpp b/sf-buffer/include/BufferBinaryFormat.hpp deleted file mode 100644 index 768c27e..0000000 --- a/sf-buffer/include/BufferBinaryFormat.hpp +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef JFFILEFORMAT_HPP -#define JFFILEFORMAT_HPP - -#include "jungfrau.hpp" - -const char JF_FORMAT_START_BYTE = 0xBE; - -#pragma pack(push) -#pragma pack(1) -struct BufferBinaryFormat { - - BufferBinaryFormat() : FORMAT_MARKER(JF_FORMAT_START_BYTE) {}; - - const char FORMAT_MARKER; - ModuleFrame metadata; - char data[JUNGFRAU_DATA_BYTES_PER_FRAME]; -}; -#pragma pack(pop) - -#endif // JFFILEFORMAT_HPP \ No newline at end of file diff --git a/sf-buffer/src/main.cpp b/sf-buffer/src/main.cpp index de614a9..b6aadc6 100644 --- a/sf-buffer/src/main.cpp +++ b/sf-buffer/src/main.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include "formats.hpp" using namespace std; using namespace core_buffer;