1 #include "otsdaq/DataProcessorPlugins/UDPDataStreamerConsumer.h"
2 #include "otsdaq/Macros/CoutMacros.h"
3 #include "otsdaq/Macros/ProcessorPluginMacros.h"
4 #include "otsdaq/MessageFacility/MessageFacility.h"
14 std::string supervisorApplicationUID,
15 std::string bufferUID,
16 std::string processorUID,
18 const std::string& configurationPath)
19 :
Socket(theXDAQContextConfigTree.getNode(configurationPath)
20 .getNode(
"HostIPAddress")
21 .getValue<std::string>(),
22 theXDAQContextConfigTree.getNode(configurationPath)
24 .getValue<unsigned int>())
27 .getNode(
"HostIPAddress")
28 .getValue<std::string>(),
29 theXDAQContextConfigTree.getNode(configurationPath)
31 .getValue<unsigned int>(),
32 theXDAQContextConfigTree.getNode(configurationPath)
33 .getNode(
"StreamToIPAddress")
34 .getValue<std::string>(),
35 theXDAQContextConfigTree.getNode(configurationPath)
36 .getNode(
"StreamToPort")
37 .getValue<unsigned int>())
39 supervisorApplicationUID, bufferUID, processorUID, HighConsumerPriority)
40 ,
Configurable(theXDAQContextConfigTree, configurationPath)
46 __COUT__ <<
"done!" << std::endl;
50 UDPDataStreamerConsumer::~UDPDataStreamerConsumer(
void) {}
53 bool UDPDataStreamerConsumer::workLoopThread(toolbox::task::WorkLoop* )
56 return WorkLoop::continueWorkLoop_;
60 void UDPDataStreamerConsumer::fastRead(
void)
76 TransmitterSocket::send(streamToSocket_, *
dataP_);
77 DataConsumer::setReadSubBuffer<std::string, std::map<std::string, std::string>>();
81 void UDPDataStreamerConsumer::slowRead(
void)
96 TransmitterSocket::send(streamToSocket_,
data_);
int read(D &buffer, H &header)
Copies the buffer into the passed parameters.
std::string * dataP_
For fast read.
std::string data_
For slow read.
UDPDataStreamerConsumer(std::string supervisorApplicationUID, std::string bufferUID, std::string processorUID, const ConfigurationTree &theXDAQContextConfigTree, const std::string &configurationPath)