00001 #ifndef _ots_UDPDataListenerProducer_h_
00002 #define _ots_UDPDataListenerProducer_h_
00003
00004 #include "otsdaq-core/NetworkUtilities/ReceiverSocket.h"
00005 #include "otsdaq-core/DataManager/DataProducer.h"
00006 #include "otsdaq-core/Configurable/Configurable.h"
00007
00008 #include <string>
00009
00010 namespace ots
00011 {
00012
00013 class ConfigurationTree;
00014
00015 class UDPDataListenerProducer : public DataProducer, public Configurable, public ReceiverSocket
00016 {
00017 public:
00018 UDPDataListenerProducer (std::string supervisorApplicationUID, std::string bufferUID, std::string processorUID, const ConfigurationTree& theXDAQContextConfigTree, const std::string& configurationPath);
00019 virtual ~UDPDataListenerProducer(void);
00020
00021 protected:
00022 bool workLoopThread(toolbox::task::WorkLoop* workLoop);
00023 void slowWrite (void);
00024 void fastWrite (void);
00025
00026 std::string data_;
00027 std::map<std::string,std::string> header_;
00028
00029 std::string* dataP_;
00030 std::map<std::string,std::string>* headerP_;
00031
00032 unsigned long ipAddress_;
00033 unsigned short port_;
00034
00035 unsigned char lastSeqId_;
00036
00037 };
00038
00039 }
00040
00041 #endif