$treeview $search $mathjax $extrastylesheet
otsdaq
v2_03_00
$projectbrief
|
$projectbrief
|
$searchbox |
00001 #ifndef _ots_UDPDataListenerProducer_h_ 00002 #define _ots_UDPDataListenerProducer_h_ 00003 00004 #include "otsdaq-core/Configurable/Configurable.h" 00005 #include "otsdaq-core/DataManager/DataProducer.h" 00006 #include "otsdaq-core/NetworkUtilities/ReceiverSocket.h" // Make sure this is always first because <sys/types.h> (defined in Socket.h) must be first 00007 00008 #include <string> 00009 00010 namespace ots 00011 { 00012 class ConfigurationTree; 00013 00014 class UDPDataListenerProducer : public DataProducer, 00015 public Configurable, 00016 public ReceiverSocket 00017 { 00018 public: 00019 UDPDataListenerProducer(std::string supervisorApplicationUID, 00020 std::string bufferUID, 00021 std::string processorUID, 00022 const ConfigurationTree& theXDAQContextConfigTree, 00023 const std::string& configurationPath); 00024 virtual ~UDPDataListenerProducer(void); 00025 00026 protected: 00027 bool workLoopThread(toolbox::task::WorkLoop* workLoop); 00028 void slowWrite(void); 00029 void fastWrite(void); 00030 // For slow write 00031 std::string data_; 00032 std::map<std::string, std::string> header_; 00033 // For fast write 00034 std::string* dataP_; 00035 std::map<std::string, std::string>* headerP_; 00036 00037 unsigned long ipAddress_; 00038 unsigned short port_; 00039 00040 unsigned char lastSeqId_; 00041 // bool getNextFragment(void); 00042 }; 00043 00044 } // namespace ots 00045 00046 #endif