EUDAQ
 All Classes Namespaces Files Functions Variables Pages
TransportNULL.hh
1 #ifndef EUDAQ_INCLUDED_TransportNULL
2 #define EUDAQ_INCLUDED_TransportNULL
3 
4 #include "eudaq/TransportFactory.hh"
5 
6 #include <vector>
7 #include <string>
8 #include <map>
9 
10 namespace eudaq {
11 
12  class NULLServer : public TransportServer {
13  public:
14  NULLServer(const std::string &param);
15  virtual ~NULLServer();
16 
17  virtual void Close(const ConnectionInfo &id);
18  virtual void SendPacket(const unsigned char *data, size_t len,
19  const ConnectionInfo &id = ConnectionInfo::ALL,
20  bool duringconnect = false);
21  virtual void ProcessEvents(int timeout);
22 
23  virtual std::string ConnectionString() const;
24  virtual bool IsNull() const { return true; }
25  static const std::string name;
26 
27  private:
28  };
29 
30  class NULLClient : public TransportClient {
31  public:
32  NULLClient(const std::string &param);
33  virtual ~NULLClient();
34 
35  virtual void SendPacket(const unsigned char *data, size_t len,
36  const ConnectionInfo &id = ConnectionInfo::ALL,
37  bool = false);
38  virtual void ProcessEvents(int timeout = -1);
39  virtual bool IsNull() const { return true; }
40 
41  private:
42  ConnectionInfo m_buf;
43  };
44 }
45 
46 #endif // EUDAQ_INCLUDED_TransportNULL
Definition: TransportNULL.hh:12
virtual void SendPacket(const unsigned char *data, size_t len, const ConnectionInfo &id=ConnectionInfo::ALL, bool=false)
Definition: TransportNULL.cc:25
virtual void ProcessEvents(int timeout=-1)
Definition: TransportNULL.cc:28
virtual void SendPacket(const unsigned char *data, size_t len, const ConnectionInfo &id=ConnectionInfo::ALL, bool duringconnect=false)
Definition: TransportNULL.cc:16
virtual void Close(const ConnectionInfo &id)
Definition: TransportNULL.cc:14
Definition: TransportServer.hh:10
Definition: TransportBase.hh:22
virtual void ProcessEvents(int timeout)
Definition: TransportNULL.cc:19
Definition: TransportClient.hh:9
Definition: TransportNULL.hh:30