summaryrefslogtreecommitdiffstats
path: root/src/Detector/Detector.h
blob: 4295e63ea5e5e980b3122a65bbc661eb177a07cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * Copyright 2016 Tobias Frust
 *
 * Detector.h
 *
 *  Created on: 30.06.2016
 *      Author: Tobias Frust
 */

#ifndef DETECTOR_H_
#define DETECTOR_H_

#include "../DetectorModule/DetectorModule.h"

#include <vector>
#include <thread>

class Detector {
public:
   Detector(const std::string& address, const std::string& configPath, const int firstPort, const int numPorts, const unsigned int timeIntervall);

   auto run() -> void;
private:
   std::vector<DetectorModule> modules_;

   std::vector<std::thread> moduleThreads_;

   unsigned int timeIntervall_;
   int numberOfDetectorModules_;

   auto readConfig(const std::string& configFile) -> bool;

};

#endif /* DETECTOR_H_ */