tdaq-develop-2025-02-12
ots::OtsUDPHardware Class Reference
Inheritance diagram for ots::OtsUDPHardware:
ots::FrontEndHardwareBase ots::FEOtsUDPProducerTemplateInterface ots::FEOtsUDPTemplateInterface

Public Member Functions

 OtsUDPHardware (std::string hostIPAddress, unsigned int hostPort, std::string boardIPAddress, unsigned int boardPort, unsigned int version=-1, bool verbose=false)
 
virtual void write (const std::string &sendBuffer)
 
virtual void write (const std::vector< std::string > &sendBuffers)
 
virtual void writeAndAcknowledge (const std::string &sendBuffer, int timeoutSeconds=-1)
 
virtual void writeAndAcknowledge (const std::vector< std::string > &sendBuffers, int timeoutSeconds=-1)
 
virtual void read (const std::string &sendBuffer, std::string &receiveBuffer, int timeoutSeconds=-1)
 return -1 on failure
 
virtual void read (const std::vector< std::string > &sendBuffers, std::vector< std::string > &receiveBuffers, int timeoutSeconds=-1)
 
virtual int flushRead ()
 return count of 'things' flushed
 
void read (const std::string &sendBuffer, uint64_t &receiveQuadWord, int timeoutSeconds=-1)
 
void read (const std::string &sendBuffer, std::vector< uint64_t > &receiveQuadWords, int timeoutSeconds=-1)
 
void read (const std::vector< std::string > &sendBuffers, std::vector< std::vector< uint64_t > > &receiveQuadWordsVector, int timeoutSeconds=-1)
 
int clearReadSocket ()
 
- Public Member Functions inherited from ots::FrontEndHardwareBase
 FrontEndHardwareBase (unsigned int version=-1)
 

Protected Member Functions

 OtsUDPHardware (std::string boardIPAddress, unsigned int boardPort, unsigned int version=-1, bool verbose=false)
 This one is often (e.g. FENIMPlusInterface) called by FEs inheriting OtsUDPHardware. More...
 

Protected Attributes

Socket OtsUDPBoard_
 
std::string acknowledgment_
 
bool verbose_
 
- Protected Attributes inherited from ots::FrontEndHardwareBase
unsigned int version_
 

Detailed Description

Definition at line 9 of file OtsUDPHardware.h.

Constructor & Destructor Documentation

◆ OtsUDPHardware()

OtsUDPHardware::OtsUDPHardware ( std::string  boardIPAddress,
unsigned int  boardPort,
unsigned int  version = -1,
bool  verbose = false 
)
protected

This one is often (e.g. FENIMPlusInterface) called by FEs inheriting OtsUDPHardware.

virtual int write(uint64_t address, const std::string& value){return 0;} virtual int read (uint64_t address, std::string& value){return 0;}

Definition at line 11 of file OtsUDPHardware.cc.

Member Function Documentation

◆ clearReadSocket()

int OtsUDPHardware::clearReadSocket ( )

clearReadSocket

flushes read socket.

reads from read socket until timeout is reached (remove stale packets) returns count of packets that were cleared

Definition at line 444 of file OtsUDPHardware.cc.

◆ write()

void OtsUDPHardware::write ( const std::string &  )
virtual

These should never be called directly if used correctly, but not all classes will implement every function (so no pure virtuals). Should be obvious that the wrong thing is happening if these are called because exceptions are thrown!

Reimplemented from ots::FrontEndHardwareBase.

Definition at line 59 of file OtsUDPHardware.cc.


The documentation for this class was generated from the following files: