diff options
author | Tobias Frust <tobiasfrust@gmail.com> | 2016-06-30 15:22:07 +0200 |
---|---|---|
committer | Tobias Frust <tobiasfrust@gmail.com> | 2016-06-30 15:22:07 +0200 |
commit | 0c33319451deec9b5461b57856423bc619817245 (patch) | |
tree | 2d5be787fb4d4e052e72aaf01ccf095874c46f2e /src/main_client.cpp | |
parent | dbf28e725f062744222559257abe64d8a39a9d50 (diff) | |
download | ods-0c33319451deec9b5461b57856423bc619817245.tar.gz ods-0c33319451deec9b5461b57856423bc619817245.tar.bz2 ods-0c33319451deec9b5461b57856423bc619817245.tar.xz ods-0c33319451deec9b5461b57856423bc619817245.zip |
added classes for detector; Sending out in n different streams with n different ports
Diffstat (limited to 'src/main_client.cpp')
-rw-r--r-- | src/main_client.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/main_client.cpp b/src/main_client.cpp index 451bd02..ed7d285 100644 --- a/src/main_client.cpp +++ b/src/main_client.cpp @@ -1,19 +1,38 @@ #include "UDPClient/UDPClient.h" #include "DetectorModule/DetectorModule.h" +#include "Detector/Detector.h" + +#include <boost/log/core.hpp> +#include <boost/log/trivial.hpp> +#include <boost/log/expressions.hpp> #include <iostream> #include <string> +void initLog() { +#ifndef NDEBUG + boost::log::core::get()->set_filter(boost::log::trivial::severity >= boost::log::trivial::debug); +#else + boost::log::core::get()->set_filter(boost::log::trivial::severity >= boost::log::trivial::info); +#endif +} + int main (int argc, char *argv[]){ + initLog(); + std::cout << "Sending UDP packages: " << std::endl; auto configPath = std::string { "config.cfg" }; - std::string address = "10.0.0.10"; + std::string address = "localhost"; + + Detector detector{address, configPath, 1000u}; + + //DetectorModule detModule0 = DetectorModule(1, address, configPath); - DetectorModule detModule0 = DetectorModule(0, address, configPath); + detector.run(); - detModule0.sendPeriodically(5000u); + std::cin.ignore(); return 0; |