blob: 43402eefd3b9952a0c43c1a026fc50c1ae172ce7 (
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 int firstPort, const int numPorts, const unsigned int timeIntervall) :
timeIntervall_{timeIntervall},
numberOfDetectorModules_{numPorts} {
modules_.reserve(numberOfDetectorModules_);
for(auto i = 0; i < numberOfDetectorModules_; i++){
modules_.emplace_back(i, address, firstPort + i, configPath);
}
}
auto Detector::run() -> void {
for(auto i = 0; i < numberOfDetectorModules_; i++)
modules_[i].sendPeriodically(timeIntervall_);
}
|