/* * Copyright 2016 Tobias Frust * * DetectorModule.h * * Created on: 29.06.2016 * Author: Tobias Frust */ #ifndef DETECTORMODULE_H_ #define DETECTORMODULE_H_ #include "../UDPClient/UDPClient.h" #include #include #include #include #include class DetectorModule { public: DetectorModule(const int detectorID, const std::string& address, const std::string& configPath); auto sendPeriodically(unsigned int timeIntervall) -> void; private: std::vector buffer_; std::vector> sendBuffer_; int detectorID_; UDPClient client_; int numberOfDetectors_; int numberOfPlanes_; int numberOfProjections_; int numberOfDetectorsPerModule_; int numberOfProjectionsPerPacket_; unsigned int numberOfFrames_; std::string path_, fileName_, fileEnding_; unsigned int max_packets_; std::size_t index_; std::size_t ips_; std::size_t counter_; std::chrono::high_resolution_clock::time_point ts_; unsigned short partID_{0}; auto readConfig(const std::string& configFile) -> bool; auto readInput() -> void; auto send(int packets) -> void; }; #endif