#include "UDPClient/UDPClient.h" #include "DetectorModule/DetectorModule.h" #include "Detector/Detector.h" #include #include #include #include #include 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[]){ if(argc < 3){ BOOST_LOG_TRIVIAL(error) << "Program usage: ./onlineDetectorSimulatorClient !"; return 0; } int imagesPerSec = std::stoi(argv[1]); int packetSize = std::stoi(argv[2]); double timegap = 1./(double)imagesPerSec; unsigned int intervall = timegap*1000*1000; initLog(); std::cout << "Sending UDP packages: " << std::endl; auto configPath = std::string { "config.cfg" }; std::string address = "10.0.0.10"; Detector detector{address, configPath, intervall, packetSize}; //DetectorModule detModule0 = DetectorModule(1, address, configPath); detector.run(); std::cin.ignore(); return 0; }