AARE
Data analysis library for PSI hybrid detectors
Loading...
Searching...
No Matches
ZmqSocketReceiver.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "aare/core/Frame.hpp"
7
8#include <cstdint>
9#include <string>
10
11// Socket to receive data from a ZMQ publisher
12// needs to be in sync with the main library (or maybe better use the versioning in the header)
13
14// forward declare zmq_msg_t to avoid including zmq.h in the header
15class zmq_msg_t;
16
17namespace aare {
18
20 public:
21 ZmqSocketReceiver(const std::string &endpoint);
22 void connect();
23 std::vector<ZmqFrame> receive_n();
24
25 private:
26 int receive_data(std::byte *data, size_t size);
29};
30
31} // namespace aare
Definition ZmqSocketReceiver.hpp:19
std::vector< ZmqFrame > receive_n()
Definition ZmqSocketReceiver.cpp:104
void connect()
Connect to the given endpoint subscribe to a Zmq published.
Definition ZmqSocketReceiver.cpp:21
ZmqHeader receive_header()
receive a ZmqHeader
Definition ZmqSocketReceiver.cpp:43
ZmqFrame receive_zmqframe()
Definition ZmqSocketReceiver.cpp:82
int receive_data(std::byte *data, size_t size)
receive data following a ZmqHeader
Definition ZmqSocketReceiver.cpp:73
Definition ZmqSocket.hpp:13
Frame class to represent a single frame of data model class should be able to work with streams comin...
Definition CircularFifo.hpp:11
ZmqFrame structure wrapper class to contain a ZmqHeader and a Frame.
Definition defs.hpp:13
Definition ZmqHeader.hpp:86