summaryrefslogtreecommitdiffstats
path: root/src/ReceiverThreads/ReceiverThreads.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ReceiverThreads/ReceiverThreads.cpp')
-rw-r--r--src/ReceiverThreads/ReceiverThreads.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ReceiverThreads/ReceiverThreads.cpp b/src/ReceiverThreads/ReceiverThreads.cpp
index e60971e..e5c339b 100644
--- a/src/ReceiverThreads/ReceiverThreads.cpp
+++ b/src/ReceiverThreads/ReceiverThreads.cpp
@@ -12,11 +12,11 @@
#include <boost/log/trivial.hpp>
-ReceiverThreads::ReceiverThreads(const std::string& address, const int timeIntervall, const int numberOfDetectorModules)
+ReceiverThreads::ReceiverThreads(const std::string& address, const int timeIntervall, const int numberOfDetectorModules, const int firstPort)
: timeIntervall_{timeIntervall}, numberOfDetectorModules_{numberOfDetectorModules}, address_{address}, loss_{0} {
for(auto i = 0; i < numberOfDetectorModules; i++){
- receiverModules_.emplace_back(&ReceiverThreads::receiverThread, this, 4000+i);
+ receiverModules_.emplace_back(&ReceiverThreads::receiverThread, this, firstPort+i);
}
for(auto i = 0; i < numberOfDetectorModules; i++){
@@ -56,6 +56,7 @@ auto ReceiverThreads::receiverThread(const int port) -> void {
}
+ printf("Listening %d\n", port);
BOOST_LOG_TRIVIAL(info) << "Address: " << address_ << " port: " << port << " timeout: " << timeIntervall_;
double coef = 1000. * 1000. * 1000. / 1024. / 1024. / 1024.;