mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-21 12:54:36 +02:00
Implement BufferBlock
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <sys/resource.h>
|
||||
#include <syscall.h>
|
||||
#include <zconf.h>
|
||||
#include <BufferBinaryFormat.hpp>
|
||||
#include "formats.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace core_buffer;
|
||||
|
||||
Reference in New Issue
Block a user