tdaq-develop-2025-02-12
ots::TCPDataListenerProducer Class Reference
Inheritance diagram for ots::TCPDataListenerProducer:
ots::DataProducer ots::Configurable ots::TCPListenServer ots::DataProducerBase ots::WorkLoop ots::TCPServerBase ots::DataProcessor ots::TCPSocket

Public Member Functions

 TCPDataListenerProducer (std::string supervisorApplicationUID, std::string bufferUID, std::string processorUID, const ConfigurationTree &theXDAQContextConfigTree, const std::string &configurationPath)
 
virtual void startProcessingData (std::string runNumber) override
 
virtual void stopProcessingData (void) override
 
- Public Member Functions inherited from ots::DataProducer
 DataProducer (std::string supervisorApplicationUID, std::string bufferUID, std::string processorUID, unsigned int bufferSize=100)
 
virtual void configure (void)
 
- Public Member Functions inherited from ots::DataProducerBase
 DataProducerBase (const std::string &supervisorApplicationUID, const std::string &bufferUID, const std::string &processorUID, unsigned int bufferSize=100)
 
virtual void registerToBuffer (void)
 mirror DataConsumer::registerToBuffer
 
template<class D , class H >
int attachToEmptySubBuffer (D *&data, H *&header)
 
template<class D , class H >
int setWrittenSubBuffer (void)
 
template<class D , class H >
int write (const D &buffer)
 
template<class D , class H >
int write (const D &buffer, const H &header)
 
unsigned int getBufferSize (void) const
 
- Public Member Functions inherited from ots::DataProcessor
 DataProcessor (std::string supervisorApplicationUID, std::string bufferUID, std::string processorUID)
 
virtual void pauseProcessingData (void)
 
virtual void resumeProcessingData (void)
 
const std::string & getProcessorID (void) const
 Getters.
 
void setCircularBuffer (CircularBufferBase *circularBuffer)
 
- Public Member Functions inherited from ots::WorkLoop
 WorkLoop (const std::string &name)
 
void startWorkLoop (void)
 
bool stopWorkLoop (void)
 
bool isActive (void) const
 
- Public Member Functions inherited from ots::Configurable
 Configurable (const ConfigurationTree &theXDAQContextConfigTree, const std::string &theConfigurationPath)
 
ConfigurationTree getSelfNode () const
 
const ConfigurationManagergetConfigurationManager () const
 
const std::string & getContextUID () const
 
const std::string & getApplicationUID () const
 
unsigned int getApplicationLID () const
 
std::string getContextAddress () const
 
unsigned int getContextPort () const
 
- Public Member Functions inherited from ots::TCPListenServer
 TCPListenServer (unsigned int serverPort, unsigned int maxNumberOfClients=-1)
 
template<class T >
receive ()
 
std::string receivePacket ()
 
- Public Member Functions inherited from ots::TCPServerBase
 TCPServerBase (unsigned int serverPort, unsigned int maxNumberOfClients=0)
 Means as many unsigned allows.
 
void startAccept (void)
 
void broadcastPacket (const char *message, std::size_t length)
 
void broadcastPacket (const std::string &message)
 
void broadcast (const char *message, std::size_t length)
 
void broadcast (const std::string &message)
 
void broadcast (const std::vector< char > &message)
 
void broadcast (const std::vector< uint16_t > &message)
 
- Public Member Functions inherited from ots::TCPSocket
 TCPSocket (int socketId=invalidSocketId)
 Designed to be a base class not used used directly.
 
 TCPSocket (TCPSocket &&move)
 Moveable but not Copyable.
 
TCPSocketoperator= (TCPSocket &&move)
 
void swap (TCPSocket &other)
 
 TCPSocket (TCPSocket const &)=delete
 Explicitly deleting copy constructor.
 
TCPSocketoperator= (TCPSocket const &)=delete
 
int getSocketId (void) const
 
void open (void)
 
void close (void)
 
void sendClose (void)
 

Protected Member Functions

bool workLoopThread (toolbox::task::WorkLoop *workLoop) override
 bool TCPDataListenerProducer::getNextFragment(void)
 
void slowWrite (void)
 
void fastWrite (void)
 
- Protected Member Functions inherited from ots::WorkLoop
const std::string & getWorkLoopName (void) const
 Getters.
 
- Protected Member Functions inherited from ots::TCPListenServer
void acceptConnections () override
 
- Protected Member Functions inherited from ots::TCPServerBase
void closeClientSocket (int socket)
 
template<class T >
T * acceptClient (bool blocking=true)
 
void pingActiveClients (void)
 
bool getAccept ()
 

Protected Attributes

std::string data_
 For slow write.
 
std::map< std::string, std::string > header_
 
std::string * dataP_
 For fast write.
 
std::map< std::string, std::string > * headerP_
 
std::string dataType_
 
unsigned port_
 
- Protected Attributes inherited from ots::DataProcessor
const std::string supervisorApplicationUID_
 
const std::string bufferUID_
 
const std::string processorUID_
 
CircularBufferBasetheCircularBuffer_
 
- Protected Attributes inherited from ots::WorkLoop
volatile bool continueWorkLoop_
 
- Protected Attributes inherited from ots::Configurable
const ConfigurationTree theXDAQContextConfigTree_
 
const std::string theConfigurationPath_
 
const std::string theConfigurationRecordName_
 
- Protected Attributes inherited from ots::TCPListenServer
int lastReceived
 
- Protected Attributes inherited from ots::TCPServerBase
std::map< int, TCPSocket * > fConnectedClients
 
std::map< int, std::future< void > > fConnectedClientsFuture
 
const int E_SHUTDOWN = 0
 

Additional Inherited Members

- Static Protected Attributes inherited from ots::TCPSocket
static constexpr int invalidSocketId = -1
 

Detailed Description

Definition at line 14 of file TCPDataListenerProducer.h.


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