summaryrefslogtreecommitdiffstats
path: root/src/DetectorModule/DetectorModule.cpp
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-08-06 20:20:46 +0200
committerSuren A. Chilingaryan <csa@suren.me>2018-08-06 20:20:46 +0200
commit254f1dc9e629e9de818672174a6614c6595fb11a (patch)
tree39786da7f579f3098c5a79fe9c129dae2fd3ef5c /src/DetectorModule/DetectorModule.cpp
parent7ae5d89c48bd3982626afe03891eab2e2d31e746 (diff)
downloadods-254f1dc9e629e9de818672174a6614c6595fb11a.tar.gz
ods-254f1dc9e629e9de818672174a6614c6595fb11a.tar.bz2
ods-254f1dc9e629e9de818672174a6614c6595fb11a.tar.xz
ods-254f1dc9e629e9de818672174a6614c6595fb11a.zip
Support arbitrary ports and port-range splitting
Diffstat (limited to 'src/DetectorModule/DetectorModule.cpp')
-rw-r--r--src/DetectorModule/DetectorModule.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/DetectorModule/DetectorModule.cpp b/src/DetectorModule/DetectorModule.cpp
index e7e0272..6767eb9 100644
--- a/src/DetectorModule/DetectorModule.cpp
+++ b/src/DetectorModule/DetectorModule.cpp
@@ -40,15 +40,13 @@ void timer_start(std::function<void(int)> func, unsigned int interval, unsigned
}).detach();
}
-DetectorModule::DetectorModule(const int detectorID, const std::string& address, const std::string& configPath) :
+DetectorModule::DetectorModule(const int detectorID, const std::string& address, const int port, const std::string& configPath) :
detectorID_{detectorID},
numberOfDetectorsPerModule_{16},
index_{0u},
- client_{address, detectorID+4000},
+ client_{address, port},
max_packets_{1000u}{
- printf("Creating %d\n", detectorID);
-
if (readConfig(configPath)) {
throw std::runtime_error("DetectorModule: Configuration file could not be loaded successfully. Please check!");
}