diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main_client.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main_client.cpp b/src/main_client.cpp index b88341a..2b9927d 100644 --- a/src/main_client.cpp +++ b/src/main_client.cpp @@ -19,6 +19,16 @@ void initLog() { int main (int argc, char *argv[]){ + if(argc < 2){ + BOOST_LOG_TRIVIAL(error) << "Program usage: ./onlineDetectorSimulatorClient <images_per_second>!"; + return 0; + } + + int imagesPerSec = std::stoi(argv[1]); + + double timegap = 1./(double)imagesPerSec; + unsigned int intervall = timegap*1000*1000; + initLog(); std::cout << "Sending UDP packages: " << std::endl; @@ -26,7 +36,7 @@ int main (int argc, char *argv[]){ auto configPath = std::string { "config.cfg" }; std::string address = "127.0.0.1"; - Detector detector{address, configPath, 1000000u}; + Detector detector{address, configPath, intervall}; //DetectorModule detModule0 = DetectorModule(1, address, configPath); |