1 #include "otsdaq-core/DataProcessorPlugins/TCPDataStreamerConsumer.h"
2 #include "otsdaq-core/Macros/CoutMacros.h"
3 #include "otsdaq-core/Macros/ProcessorPluginMacros.h"
4 #include "otsdaq-core/MessageFacility/MessageFacility.h"
13 TCPDataStreamerConsumer::TCPDataStreamerConsumer(
14 std::string supervisorApplicationUID,
15 std::string bufferUID,
16 std::string processorUID,
18 const std::string& configurationPath)
21 .getNode(
"StreamToPort")
22 .getValue<unsigned int>())
24 supervisorApplicationUID, bufferUID, processorUID, HighConsumerPriority)
25 ,
Configurable(theXDAQContextConfigTree, configurationPath)
30 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << std::endl;
31 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << std::endl;
32 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << std::endl;
33 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << std::endl;
34 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << std::endl;
35 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << std::endl;
37 std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ <<
"done!" << std::endl;
41 TCPDataStreamerConsumer::~TCPDataStreamerConsumer(
void) {}
44 bool TCPDataStreamerConsumer::workLoopThread(toolbox::task::WorkLoop* workLoop)
47 return WorkLoop::continueWorkLoop_;
51 void TCPDataStreamerConsumer::fastRead(
void)
55 if(DataConsumer::read(dataP_, headerP_) < 0)
68 TCPDataStreamerBase::send(*dataP_);
69 DataConsumer::setReadSubBuffer<std::string, std::map<std::string, std::string>>();
73 void TCPDataStreamerConsumer::slowRead(
void)
77 if(DataConsumer::read(data_, header_) < 0)
89 TCPDataStreamerBase::send(data_);