summaryrefslogtreecommitdiffstats
path: root/src/Detector/Detector.cpp
blob: 03abffe9675a3b298f53579ea5fa8016a1b84133 (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
/*
 * Copyright 2016 Tobias Frust
 *
 * Detector.cpp
 *
 *  Created on: 30.06.2016
 *      Author: Tobias Frust
 */


#include "Detector.h"

Detector::Detector(const std::string& address, const std::string& configPath, const unsigned int timeIntervall, const int packetSize) :
   timeIntervall_{timeIntervall},
   numberOfDetectorModules_{27} {
   modules_.reserve(numberOfDetectorModules_);
   for(auto i = 0; i < numberOfDetectorModules_; i++){
      modules_.emplace_back(i, address, configPath, packetSize);
   }
}

auto Detector::run() -> void {
   for(auto i = 0; i < numberOfDetectorModules_; i++)
      modules_[i].sendPeriodically(timeIntervall_);
}