summaryrefslogtreecommitdiffstats
path: root/src/main_client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main_client.cpp')
-rw-r--r--src/main_client.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/main_client.cpp b/src/main_client.cpp
index 01b3aad..fb0c1e3 100644
--- a/src/main_client.cpp
+++ b/src/main_client.cpp
@@ -10,23 +10,28 @@
#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
+*/
+ boost::log::core::get()->set_filter(boost::log::trivial::severity >= boost::log::trivial::info);
}
int main (int argc, char *argv[]){
- if(argc < 3){
- BOOST_LOG_TRIVIAL(error) << "Program usage: ./onlineDetectorSimulatorClient <packets_per_second> <address>!";
+ if(argc < 5){
+ BOOST_LOG_TRIVIAL(error) << "Program usage: ./onlineDetectorSimulatorClient <address> <first_port> <num_ports> <packets_per_second>";
return 0;
}
- int imagesPerSec = std::stoi(argv[1]);
+ std::string address = argv[1];
+ int firstPort = std::stoi(argv[2]);
+ int numPorts = std::stoi(argv[3]);
+ int imagesPerSec = std::stoi(argv[4]);
- std::string address = argv[2];
double timegap = 1./(double)imagesPerSec;
unsigned int intervall = timegap*1000*1000;
@@ -37,7 +42,7 @@ int main (int argc, char *argv[]){
auto configPath = std::string { "config.cfg" };
- Detector detector{address, configPath, intervall};
+ Detector detector{address, configPath, firstPort, numPorts, intervall};
//DetectorModule detModule0 = DetectorModule(1, address, configPath);