diff options
author | Tobias Frust <tobiasfrust@gmail.com> | 2016-07-11 15:15:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-11 15:15:32 +0200 |
commit | 8af3d595e2856f81a46a91d67e96f53cb3b25d0f (patch) | |
tree | bd2cb6e80b0db90713f9d24de09577125d6f3d85 /src/DetectorModule/DetectorModule.h | |
parent | 13783f932576a285b08cf518a6b0d679aac3c897 (diff) | |
parent | 409e2fd20af5620066796e43410a92521376b2c1 (diff) | |
download | ods-8af3d595e2856f81a46a91d67e96f53cb3b25d0f.tar.gz ods-8af3d595e2856f81a46a91d67e96f53cb3b25d0f.tar.bz2 ods-8af3d595e2856f81a46a91d67e96f53cb3b25d0f.tar.xz ods-8af3d595e2856f81a46a91d67e96f53cb3b25d0f.zip |
Merge pull request #1 from tobiasfrust/master
Implemented DetectorSimulator with basic functionalities
Diffstat (limited to 'src/DetectorModule/DetectorModule.h')
-rw-r--r-- | src/DetectorModule/DetectorModule.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/DetectorModule/DetectorModule.h b/src/DetectorModule/DetectorModule.h new file mode 100644 index 0000000..1bc36bb --- /dev/null +++ b/src/DetectorModule/DetectorModule.h @@ -0,0 +1,50 @@ +/* + * 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 <vector> + +#include <iostream> +#include <chrono> +#include <thread> +#include <functional> + +class DetectorModule { +public: + DetectorModule(const int detectorID, const std::string& address, const std::string& configPath); + + auto sendPeriodically(unsigned int timeIntervall) -> void; + +private: + std::vector<unsigned short> buffer_; + std::vector<char> sendBuffer_; + + int detectorID_; + UDPClient client_; + + int numberOfDetectors_; + int numberOfPlanes_; + int numberOfProjections_; + int numberOfDetectorsPerModule_; + unsigned int numberOfFrames_; + std::string path_, fileName_, fileEnding_; + + std::size_t index_; + + auto readConfig(const std::string& configFile) -> bool; + auto readInput() -> void; + auto send() -> void; + +}; + +#endif |