otsdaq  v2_00_00
UDPDataStreamerBase.cc
1 #include "otsdaq-core/NetworkUtilities/UDPDataStreamerBase.h"
2 #include "otsdaq-core/Macros/CoutHeaderMacros.h"
3 
4 #include <iostream>
5 
6 using namespace ots;
7 
8 //NOTE: if you want to inherit from this one you MUST initialize
9 //the Socket Constructor that is commented out here in your class
10 //========================================================================================================================
11 UDPDataStreamerBase::UDPDataStreamerBase(std::string IPAddress, unsigned int port, std::string toIPAddress, unsigned int toPort)
12 : TransmitterSocket (IPAddress, port)
13 , streamToSocket_ (toIPAddress, toPort)
14 {
15  __COUT__ << "IPAddress " << IPAddress << std::endl;
16  __COUT__ << "port " << port << std::endl;
17  __COUT__ << "toIPAddress " << toIPAddress << std::endl;
18  __COUT__ << "toPort " << toPort << std::endl;
19  __COUT__ << std::endl;
20  __COUT__ << std::endl;
21  __COUT__ << std::endl;
22  __COUT__ << std::endl;
23  __COUT__ << std::endl;
24 
25  Socket::initialize();
26  __COUT__ << "done!" << std::endl;
27 }
28 
29 //========================================================================================================================
30 UDPDataStreamerBase::~UDPDataStreamerBase(void)
31 {
32 }
33