diff options
Diffstat (limited to 'src/DetectorModule')
-rw-r--r-- | src/DetectorModule/DetectorModule.cpp | 9 | ||||
-rw-r--r-- | src/DetectorModule/DetectorModule.h | 4 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/DetectorModule/DetectorModule.cpp b/src/DetectorModule/DetectorModule.cpp index 8193a03..169c5a5 100644 --- a/src/DetectorModule/DetectorModule.cpp +++ b/src/DetectorModule/DetectorModule.cpp @@ -25,12 +25,11 @@ void timer_start(std::function<void(void)> func, unsigned int interval){ }).detach(); } -DetectorModule::DetectorModule(const int detectorID, const std::string& address, const std::string& configPath, const int packetSize) : +DetectorModule::DetectorModule(const int detectorID, const std::string& address, const std::string& configPath) : detectorID_{detectorID}, numberOfDetectorsPerModule_{16}, index_{0u}, - client_{address, detectorID+4000}, - packetSize_{packetSize} { + client_{address, detectorID+4000}{ printf("Creating %d\n", detectorID); @@ -38,7 +37,7 @@ DetectorModule::DetectorModule(const int detectorID, const std::string& address, throw std::runtime_error("DetectorModule: Configuration file could not be loaded successfully. Please check!"); } - sendBuffer_.resize(numberOfProjectionsPerPacket_*numberOfDetectorsPerModule_+sizeof(std::size_t)+sizeof(unsigned short)); + sendBuffer_.resize(numberOfProjectionsPerPacket_*numberOfDetectorsPerModule_*sizeof(unsigned short)+sizeof(std::size_t)); //read the input data from the file corresponding to the detectorModuleID readInput(); @@ -109,7 +108,7 @@ auto DetectorModule::readConfig(const std::string& configFile) -> bool { && configReader.lookupValue("scanRate", scanRate) && configReader.lookupValue("numberOfDataFrames", numberOfFrames_) && configReader.lookupValue("numberOfProjectionsPerPacket", numberOfProjectionsPerPacket_) - && configReader.lookupValue("numberOfDetectorsPerModule", numberOfProjectionsPerPacket_)) { + && configReader.lookupValue("numberOfDetectorsPerModule", numberOfDetectorsPerModule_)) { numberOfProjections_ = samplingRate * 1000000 / scanRate; return EXIT_SUCCESS; } diff --git a/src/DetectorModule/DetectorModule.h b/src/DetectorModule/DetectorModule.h index 3ca5f23..afe4d04 100644 --- a/src/DetectorModule/DetectorModule.h +++ b/src/DetectorModule/DetectorModule.h @@ -21,7 +21,7 @@ class DetectorModule { public: - DetectorModule(const int detectorID, const std::string& address, const std::string& configPath, const int packetSize); + DetectorModule(const int detectorID, const std::string& address, const std::string& configPath); auto sendPeriodically(unsigned int timeIntervall) -> void; @@ -32,8 +32,6 @@ private: int detectorID_; UDPClient client_; - int packetSize_; - int numberOfDetectors_; int numberOfPlanes_; int numberOfProjections_; |