1 #ifndef _ots_OtsUDPHardware_h_
2 #define _ots_OtsUDPHardware_h_
4 #include "otsdaq-components/DAQHardware/FrontEndHardwareBase.h"
5 #include "otsdaq-core/NetworkUtilities/TransceiverSocket.h"
14 OtsUDPHardware (std::string hostIPAddress,
unsigned int hostPort, std::string boardIPAddress,
unsigned int boardPort,
unsigned int version = -1,
bool verbose =
false);
17 virtual void write (
const std::string& sendBuffer)
throw(std::runtime_error);
18 virtual void write (
const std::vector<std::string>& sendBuffers)
throw(std::runtime_error);
19 virtual void writeAndAcknowledge(
const std::string& sendBuffer,
int timeoutSeconds = -1)
throw(std::runtime_error);
20 virtual void writeAndAcknowledge(
const std::vector<std::string>& sendBuffers,
int timeoutSeconds = -1)
throw(std::runtime_error);
21 virtual void read (
const std::string& sendBuffer , std::string& receiveBuffer,
int timeoutSeconds = -1)
throw(std::runtime_error);
22 virtual void read (
const std::vector<std::string>& sendBuffers, std::vector<std::string>& receiveBuffers,
int timeoutSeconds = -1)
throw(std::runtime_error);
24 virtual int flushRead ()
throw(std::runtime_error) {
return clearReadSocket();}
26 void read (
const std::string& sendBuffer, uint64_t& receiveQuadWord,
int timeoutSeconds = -1)
throw(std::runtime_error);
27 void read (
const std::string& sendBuffer, std::vector<uint64_t>& receiveQuadWords,
int timeoutSeconds = -1)
throw(std::runtime_error);
28 void read (
const std::vector<std::string>& sendBuffers, std::vector<std::vector<uint64_t> >& receiveQuadWordsVector,
int timeoutSeconds = -1)
throw(std::runtime_error);
29 int clearReadSocket ();
35 OtsUDPHardware (std::string boardIPAddress,
unsigned int boardPort,
unsigned int version = -1,
bool verbose =
false);
37 std::string acknowledgment_;