slsreceiver: removed option to start receiver with config file, redundant as the only option is receiver tcp port

This commit is contained in:
2019-01-17 15:17:08 +01:00
parent b07492be6f
commit 13f9b9929a
6 changed files with 3 additions and 102 deletions

View File

@ -10,7 +10,6 @@ set(SOURCES
src/DataProcessor.cpp
src/DataStreamer.cpp
src/Fifo.cpp
../slsSupportLib/src/utilities.cpp
../slsSupportLib/src/ClientInterface.cpp
)
@ -54,7 +53,6 @@ set(PUBLICHEADERS
../slsSupportLib/include/genericSocket.h
../slsSupportLib/include/logger.h
../slsSupportLib/include/sls_detector_exceptions.h
../slsSupportLib/include/utilities.h
)

View File

@ -26,8 +26,8 @@ LIBZMQ = -L$(LIBZMQDIR) -Wl,-rpath=$(LIBZMQDIR) -lzmq
SRC_CLNT = ThreadObject.cpp Listener.cpp DataProcessor.cpp DataStreamer.cpp Fifo.cpp File.cpp BinaryFile.cpp slsReceiverImplementation.cpp slsReceiverTCPIPInterface.cpp slsReceiver.cpp slsReceiverUsers.cpp $(COMMONDIR)/utilities.cpp
DEPSINCLUDES = $(COMMONDIR)/ansi.h $(COMMONDIR)/sls_detector_defs.h $(COMMONDIR)/sls_detector_funcs.h $(COMMONDIR)/GeneralData.h $(INCDIR)/circularFifo.h $(COMMONDIR)/genericSocket.h $(COMMONDIR)/logger.h $(INCDIR)/receiver_defs.h $(COMMONDIR)/utilities.h $(COMMONDIR)/ZmqSocket.h $(INCDIR)/BinaryFileStatic.h $(INCDIR)/HDF5FileStatic.h $(COMMONDIR)/sls_detector_exceptions.h
SRC_CLNT = ThreadObject.cpp Listener.cpp DataProcessor.cpp DataStreamer.cpp Fifo.cpp File.cpp BinaryFile.cpp slsReceiverImplementation.cpp slsReceiverTCPIPInterface.cpp slsReceiver.cpp slsReceiverUsers.cpp
DEPSINCLUDES = $(COMMONDIR)/ansi.h $(COMMONDIR)/sls_detector_defs.h $(COMMONDIR)/sls_detector_funcs.h $(COMMONDIR)/GeneralData.h $(INCDIR)/circularFifo.h $(COMMONDIR)/genericSocket.h $(COMMONDIR)/logger.h $(INCDIR)/receiver_defs.h $(COMMONDIR)/ZmqSocket.h $(INCDIR)/BinaryFileStatic.h $(INCDIR)/HDF5FileStatic.h $(COMMONDIR)/sls_detector_exceptions.h
ifeq ($(HDF5),yes)

View File

@ -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

View File

@ -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 dont 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);