1 #ifndef _ots_OtsUDPHardware_h_
2 #define _ots_OtsUDPHardware_h_
4 #include "otsdaq-components/DAQHardware/FrontEndHardwareBase.h"
5 #include "otsdaq/NetworkUtilities/TransceiverSocket.h"
13 unsigned int hostPort,
14 std::string boardIPAddress,
15 unsigned int boardPort,
16 unsigned int version = -1,
17 bool verbose =
false);
20 virtual void write(
const std::string& sendBuffer);
21 virtual void write(
const std::vector<std::string>& sendBuffers);
22 virtual void writeAndAcknowledge(
const std::string& sendBuffer,
23 int timeoutSeconds = -1);
24 virtual void writeAndAcknowledge(
const std::vector<std::string>& sendBuffers,
25 int timeoutSeconds = -1);
26 virtual void read(
const std::string& sendBuffer,
27 std::string& receiveBuffer,
28 int timeoutSeconds = -1);
29 virtual void read(
const std::vector<std::string>& sendBuffers,
30 std::vector<std::string>& receiveBuffers,
31 int timeoutSeconds = -1);
33 virtual int flushRead() {
return clearReadSocket(); }
35 void read(
const std::string& sendBuffer,
36 uint64_t& receiveQuadWord,
37 int timeoutSeconds = -1);
38 void read(
const std::string& sendBuffer,
39 std::vector<uint64_t>& receiveQuadWords,
40 int timeoutSeconds = -1);
41 void read(
const std::vector<std::string>& sendBuffers,
42 std::vector<std::vector<uint64_t> >& receiveQuadWordsVector,
43 int timeoutSeconds = -1);
44 int clearReadSocket();
51 unsigned int boardPort,
52 unsigned int version = -1,
53 bool verbose =
false);
55 std::string acknowledgment_;