mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-08 00:12:02 +02:00
Refactor RamBuffer
This commit is contained in:
@@ -6,8 +6,9 @@
|
||||
|
||||
class RamBuffer {
|
||||
const std::string detector_name_;
|
||||
const int n_modules_;
|
||||
const int module_n_;
|
||||
const size_t n_slots_;
|
||||
|
||||
const size_t meta_size_;
|
||||
const size_t image_size_;
|
||||
const size_t buffer_size_;
|
||||
@@ -20,15 +21,12 @@ class RamBuffer {
|
||||
|
||||
public:
|
||||
RamBuffer(const std::string& detector_name,
|
||||
const size_t n_modules,
|
||||
const size_t n_slots,
|
||||
const int n_modules,
|
||||
const int module_n=0);
|
||||
~RamBuffer();
|
||||
|
||||
void write_frame(const ModuleFrame *src_meta, const char *src_data) const;
|
||||
void read_image(const uint64_t pulse_id,
|
||||
ModuleFrame *&dst_meta,
|
||||
char *&dst_data) const;
|
||||
char* read_image(const uint64_t pulse_id, ImageMetadata &image_meta) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -40,6 +40,8 @@ namespace buffer_config {
|
||||
const int BUFFER_ZMQ_SNDHWM = 100;
|
||||
// IPC address of the live stream.
|
||||
const std::string BUFFER_LIVE_IPC_URL = "ipc:///tmp/sf-live-";
|
||||
// Number of image slots in ram buffer - 10 seconds should be enough
|
||||
const int RAM_BUFFER_N_SLOTS = 100 * 10;
|
||||
}
|
||||
|
||||
#endif //BUFFERCONFIG_HPP
|
||||
|
||||
Reference in New Issue
Block a user