mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-22 22:24:35 +02:00
Adapt UdpRecvModule interface
This commit is contained in:
@@ -2,30 +2,23 @@
|
||||
#define UDPRECVMODULE_HPP
|
||||
|
||||
#include "RingBuffer.hpp"
|
||||
#include "FastQueue.hpp"
|
||||
#include "jungfrau.hpp"
|
||||
#include <thread>
|
||||
|
||||
class UdpRecvModule {
|
||||
|
||||
RingBuffer<UdpFrameMetadata>& ring_buffer_;
|
||||
|
||||
std::atomic_bool is_receiving_;
|
||||
FastQueue<ModuleFrame>& queue_;
|
||||
std::thread receiving_thread_;
|
||||
std::atomic_bool is_receiving_;
|
||||
|
||||
protected:
|
||||
void receive_thread(
|
||||
const uint16_t udp_port,
|
||||
const size_t frame_size);
|
||||
void receive_thread(const uint16_t udp_port);
|
||||
|
||||
public:
|
||||
UdpRecvModule(RingBuffer<UdpFrameMetadata>& ring_buffer);
|
||||
|
||||
UdpRecvModule(FastQueue<ModuleFrame>& queue, const uint16_t udp_port);
|
||||
virtual ~UdpRecvModule();
|
||||
|
||||
void start_recv(
|
||||
const uint16_t udp_port,
|
||||
const size_t frame_n_bytes);
|
||||
void stop_recv();
|
||||
bool is_receiving();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user