summaryrefslogtreecommitdiffstats
path: root/src/ReceiverThreads/ReceiverThreads.h
blob: 094652a1fe15a37879c355b677f5eb9f09bd7985 (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
 *
 * ReceiverThreads.h
 *
 *  Created on: 21.07.2016
 *      Author: Tobias Frust
 */

#ifndef RECEIVERTHREADS_H_
#define RECEIVERTHREADS_H_

#include <vector>
#include <thread>

class ReceiverThreads {
public:
   ReceiverThreads(const std::string& address, const int timeIntervall, const int numberOfDetectorModules, const int firstPort = 4000);

   auto run() -> void;
private:
   auto receiverThread(const int port) -> void;

   std::vector<std::thread> receiverModules_;

   std::size_t loss_;

   int timeIntervall_;
   int numberOfDetectorModules_;

   std::string address_;

};

#endif /* RECEIVERTHREADS_H_ */