summaryrefslogtreecommitdiffstats
path: root/src/Detector/Detector.cpp
blob: 658f485ddd109361fbc4e2ba26f46a93d0c6b73d (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) :
   timeIntervall_{timeIntervall},
   numberOfDetectorModules_{27} {
   modules_.reserve(numberOfDetectorModules_);
   for(auto i = 1; i <= numberOfDetectorModules_; i++){
      modules_.emplace_back(i, address, configPath);
   }
}

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