10#include <framework/pcore/zmq/connections/ZMQRawConnection.h>
11#include <framework/pcore/zmq/utils/ZMQParent.h>
12#include <framework/pcore/zmq/messages/ZMQNoIdMessage.h>
13#include <daq/roisend/h2m.h>
33 ZMQROIOutput(
const std::string& outputAddress,
const std::shared_ptr<ZMQParent>& parent);
73 ZMQDataAndROIOutput(
const std::string& dataAddress,
const std::string& roiAddress,
bool addEventSize,
74 const std::shared_ptr<ZMQParent>& parent);
82 void handleEvent(std::unique_ptr<ZMQNoIdMessage> message);
88 std::vector<zmq::socket_t*>
getSockets()
const final;
std::string getEndPoint() const
Return the connection string for this socket.
Base class for every connection with virtual functions to be implemented:
Helper connection hosting both a normal raw and a ROI output and sending to both at the same time.
std::string getEndPoint() const
Return the connection string.
void handleIncomingData()
Handle both a socket (dis)connect by raw or ROI.
ZMQRawOutput m_dataOutput
The used raw connection.
std::string getROIMonitoringJSON() const
Get the monitoring JSON from the ROI connection.
bool isReady() const final
Ready only when both sockets are ready.
std::string getMonitoringJSON() const final
Get the monitoring JSON from the raw connection.
ZMQRawOutput m_roiOutput
The used ROI connection.
void handleEvent(std::unique_ptr< ZMQNoIdMessage > message)
Send the normal data message to raw and the additional message to ROI.
std::vector< zmq::socket_t * > getSockets() const final
Return both sockets for polling.
Dedicated output to send ROI messages to the PXD ONSEN system.
void addTrailer(char *buffer)
Helper function to add the trailer.
std::string getEndPoint() const
Return the connection string.
void handleIncomingData()
Copy the functionality from the raw output.
ZMQROIOutput(const std::string &outputAddress, const std::shared_ptr< ZMQParent > &parent)
Create a new ROI output basically initializing the raw output member.
static constexpr const unsigned int HEADER_SIZE
Size of the header in bytes.
void handleEvent(zmq::message_t message)
Send a message and add the PXD specific header and trailer.
static constexpr const unsigned int TRAILER_SIZE
Size of the trailer in bytes.
void addHeader(char *buffer, unsigned int size)
Helper function to add the header with the given message size.
bool isReady() const final
Copy the functionality from the raw output.
std::string getMonitoringJSON() const final
Copy the functionality from the raw output.
std::vector< zmq::socket_t * > getSockets() const final
Copy the functionality from the raw output.
ZMQRawOutput m_rawOutput
The used raw output.
Output connection to speak to non-zmq sockets via a ZMQ_STREAM socket.
Abstract base class for different kinds of events.