artdaq_mfextensions  v1_03_01
UDP_receiver.hh
1 #ifndef MFVIEWER_RECEIVERS_UDP_RECEIVER_HH
2 #define MFVIEWER_RECEIVERS_UDP_RECEIVER_HH
3 
4 #include "mfextensions/Receivers/MVReceiver.hh"
5 
6 #include "messagefacility/MessageLogger/MessageLogger.h"
7 
8 #include <boost/asio.hpp>
9 using boost::asio::ip::udp;
10 
11 namespace mfviewer
12 {
16  class UDPReceiver : public MVReceiver
17  {
18  Q_OBJECT
19  public:
20  explicit UDPReceiver(fhicl::ParameterSet pset);
21 
22  virtual ~UDPReceiver();
23 
24  //Reciever Method
25  void run() override;
26 
27  // Message Parser
28  qt_mf_msg read_msg(std::string input);
29 
30  static bool validate_packet(std::string input);
31 
32  private:
33  int port_;
34  boost::asio::io_service io_service_;
35  udp::socket socket_;
36  char buffer_[0x10000];
37  bool debug_;
38  };
39 }
40 
41 #endif
Receive messages through a UDP socket. Expects the syslog format provided by UDP_mfPlugin (ELUDP) ...
Definition: UDP_receiver.hh:16
Qt wrapper around MessageFacility message
Definition: qt_mf_msg.hh:37
A MVReceiver class listens for messages and raises a signal when one arrives
Definition: MVReceiver.hh:18