mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-26 09:40:45 +02:00
Small code improvements
This commit is contained in:
+8
-3
@@ -1,20 +1,25 @@
|
||||
#include "config.hpp"
|
||||
|
||||
namespace config {
|
||||
// Receiver config.
|
||||
// Number of receiving threads. Roughly 1 thread / (GB/s)
|
||||
int zmq_n_io_threads = 1;
|
||||
int zmq_receive_timeout = 100;
|
||||
|
||||
// JSON header buffer size.
|
||||
int zmq_buffer_size_header = 1024 * 1024 * 0.2;
|
||||
// Data message buffer size.
|
||||
int zmq_buffer_size_data = 1024 * 1024 * 10;
|
||||
|
||||
// Ring buffer config.
|
||||
size_t ring_buffer_n_slots = 100;
|
||||
// Delay before trying again to get data from the ring buffer.
|
||||
uint32_t ring_buffer_read_retry_interval = 5;
|
||||
|
||||
// H5 config.
|
||||
// By how much to enlarge a dataset when a resizing is needed.
|
||||
hsize_t dataset_increase_step = 1000;
|
||||
// To which value to initialize a dataset size.
|
||||
hsize_t initial_dataset_size = 1000;
|
||||
|
||||
// Try again to see if the parameters were passed.
|
||||
// Delay in between attempts to see if the requred parameters were passed over the REST api.
|
||||
uint32_t parameters_read_retry_interval = 100;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,9 @@ void receive_zmq(WriterManager *manager, RingBuffer *ring_buffer, string connect
|
||||
frame_metadata.type = json_header.get<string>("type");
|
||||
|
||||
// Get the message data.
|
||||
// TODO: Check if the message was received, otherwise log the exception.
|
||||
receiver.recv(&message_data);
|
||||
|
||||
frame_metadata.frame_bytes_size = message_data.size();
|
||||
|
||||
#ifdef DEBUG_OUTPUT
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define REST_INTERFACE_H
|
||||
|
||||
#include "WriterManager.hpp"
|
||||
|
||||
void start_rest_api(WriterManager& writer_manager, uint16_t port);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user