mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-18 15:57:13 +02:00
slsreceiver: removed option to start receiver with config file, redundant as the only option is receiver tcp port
This commit is contained in:
@ -3,15 +3,12 @@
|
||||
|
||||
#include "sls_detector_defs.h"
|
||||
#include "slsReceiverUsers.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <string.h>
|
||||
#include <signal.h> //SIGINT
|
||||
#include <cstdlib> //system
|
||||
|
||||
#include "utilities.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <sys/types.h> //wait
|
||||
#include <sys/wait.h> //wait
|
||||
#include <unistd.h> //usleep
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "slsReceiverTCPIPInterface.h"
|
||||
#include "gitInfoReceiver.h"
|
||||
#include "logger.h"
|
||||
#include "utilities.h"
|
||||
|
||||
slsReceiver::slsReceiver(int argc, char *argv[]):
|
||||
tcpipInterface (nullptr) {
|
||||
@ -24,7 +23,6 @@ slsReceiver::slsReceiver(int argc, char *argv[]):
|
||||
// options
|
||||
std::map<std::string, std::string> configuration_map;
|
||||
int tcpip_port_no = 1954;
|
||||
std::string fname = "";
|
||||
int64_t tempval = 0;
|
||||
|
||||
//parse command line for config
|
||||
@ -32,7 +30,6 @@ slsReceiver::slsReceiver(int argc, char *argv[]):
|
||||
// These options set a flag.
|
||||
//{"verbose", no_argument, &verbose_flag, 1},
|
||||
// These options don’t set a flag. We distinguish them by their indices.
|
||||
{"config", required_argument, nullptr, 'f'},
|
||||
{"rx_tcpport", required_argument, nullptr, 't'},
|
||||
{"version", no_argument, nullptr, 'v'},
|
||||
{"help", no_argument, nullptr, 'h'},
|
||||
@ -54,13 +51,6 @@ slsReceiver::slsReceiver(int argc, char *argv[]):
|
||||
|
||||
switch(c){
|
||||
|
||||
case 'f':
|
||||
fname = optarg;
|
||||
#ifdef VERYVERBOSE
|
||||
FILE_LOG(logDEBUG) << long_options[option_index].name << " " << optarg << endl;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 't':
|
||||
sscanf(optarg, "%d", &tcpip_port_no);
|
||||
break;
|
||||
@ -77,7 +67,6 @@ slsReceiver::slsReceiver(int argc, char *argv[]):
|
||||
+ std::string(argv[0]) + "\n"
|
||||
+ "Usage: " + std::string(argv[0]) + " [arguments]\n"
|
||||
+ "Possible arguments are:\n"
|
||||
+ "\t-f, --config <fname> : Loads config from file\n"
|
||||
+ "\t-t, --rx_tcpport <port> : TCP Communication Port with client. \n"
|
||||
+ "\t Default: 1954. Required for multiple \n"
|
||||
+ "\t receivers\n\n";
|
||||
@ -88,10 +77,6 @@ slsReceiver::slsReceiver(int argc, char *argv[]):
|
||||
}
|
||||
}
|
||||
|
||||
if( !fname.empty() && read_config_file(fname, &tcpip_port_no, &configuration_map) == FAIL) {
|
||||
throw std::exception();
|
||||
}
|
||||
|
||||
// might throw an exception
|
||||
tcpipInterface = new slsReceiverTCPIPInterface(tcpip_port_no);
|
||||
|
||||
|
Reference in New Issue
Block a user