mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-05-04 06:04:14 +02:00
Move UDP recv parameter to core-buffer
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
#ifndef UDPRECEIVER_H
|
||||
#define UDPRECEIVER_H
|
||||
|
||||
#include "config.hpp"
|
||||
#include <sys/socket.h>
|
||||
#include "RingBuffer.hpp"
|
||||
#include "buffer_config.hpp"
|
||||
|
||||
class UdpReceiver {
|
||||
|
||||
@@ -18,7 +17,7 @@ public:
|
||||
|
||||
void bind(
|
||||
const uint16_t port,
|
||||
const size_t usec_timeout=config::udp_usec_timeout);
|
||||
const size_t usec_timeout=core_buffer::BUFFER_UDP_US_TIMEOUT);
|
||||
void close();
|
||||
};
|
||||
|
||||
|
||||
@@ -28,6 +28,9 @@ namespace core_buffer {
|
||||
// Size of sf_buffer RB in elements.
|
||||
const size_t BUFFER_RB_SIZE = 1000;
|
||||
|
||||
// Microseconds timeout for UDP recv.
|
||||
const int BUFFER_UDP_US_TIMEOUT = 10 * 1000;
|
||||
|
||||
// ZMQ threads for receiving data from sf_replay.
|
||||
const int WRITER_ZMQ_IO_THREADS = 2;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <iostream>
|
||||
#include "UdpReceiver.hpp"
|
||||
#include "jungfrau.hpp"
|
||||
#include "date.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user