otsdaq
v2_01_00
Main Page
Namespaces
Classes
Files
File List
UDPDataListenerProducer.h
1
#ifndef _ots_UDPDataListenerProducer_h_
2
#define _ots_UDPDataListenerProducer_h_
3
4
#include "otsdaq-core/NetworkUtilities/ReceiverSocket.h"
// Make sure this is always first because <sys/types.h> (defined in Socket.h) must be first
5
#include "otsdaq-core/DataManager/DataProducer.h"
6
#include "otsdaq-core/Configurable/Configurable.h"
7
8
#include <string>
9
10
namespace
ots
11
{
12
13
class
ConfigurationTree;
14
15
class
UDPDataListenerProducer
:
public
DataProducer
,
public
Configurable
,
public
ReceiverSocket
16
{
17
public
:
18
UDPDataListenerProducer
(std::string supervisorApplicationUID, std::string bufferUID, std::string processorUID,
const
ConfigurationTree
& theXDAQContextConfigTree,
const
std::string& configurationPath);
19
virtual
~
UDPDataListenerProducer
(
void
);
20
21
protected
:
22
bool
workLoopThread(toolbox::task::WorkLoop* workLoop);
23
void
slowWrite (
void
);
24
void
fastWrite (
void
);
25
//For slow write
26
std::string data_;
27
std::map<std::string,std::string> header_;
28
//For fast write
29
std::string* dataP_;
30
std::map<std::string,std::string>* headerP_;
31
32
unsigned
long
ipAddress_;
33
unsigned
short
port_;
34
35
unsigned
char
lastSeqId_;
36
//bool getNextFragment(void);
37
};
38
39
}
40
41
#endif
ots::ReceiverSocket
Definition:
ReceiverSocket.h:13
ots::ConfigurationTree
Definition:
ConfigurationTree.h:38
ots::Configurable
Definition:
Configurable.h:9
ots::UDPDataListenerProducer
Definition:
UDPDataListenerProducer.h:15
ots::DataProducer
Definition:
DataProducer.h:15
src
otsdaq-core
DataProcessorPlugins
UDPDataListenerProducer.h
Generated on Tue May 29 2018 18:12:36 for otsdaq by
1.8.5