diff --git a/slsReceiverSoftware/include/ZmqSocket.h b/slsReceiverSoftware/include/ZmqSocket.h index 37803bc0c..35164471b 100644 --- a/slsReceiverSoftware/include/ZmqSocket.h +++ b/slsReceiverSoftware/include/ZmqSocket.h @@ -8,9 +8,6 @@ */ #include "ansi.h" -//#include "sls_receiver_defs.h" - -//#define ZMQ_DETAIL #include #include @@ -19,7 +16,8 @@ #include //json header in zmq stream using namespace rapidjson; -#define DEFAULT_ZMQ_PORTNO 30001 + +//#define ZMQ_DETAIL class ZmqSocket { diff --git a/slsReceiverSoftware/include/genericSocket.h b/slsReceiverSoftware/include/genericSocket.h index 1342537f0..5ab3d07b5 100644 --- a/slsReceiverSoftware/include/genericSocket.h +++ b/slsReceiverSoftware/include/genericSocket.h @@ -51,27 +51,21 @@ class sockaddr_in; #include #endif -#include /******exit */ +#include /******exit */ #include #include #include - #include #include #include - - using namespace std; #define DEFAULT_PACKET_SIZE 1286 /*#define SOCKET_BUFFER_SIZE (100*1024*1024) //100MB*/ #define SOCKET_BUFFER_SIZE (2000*1024*1024) //100MB -#define DEFAULT_PORTNO 1952 #define DEFAULT_BACKLOG 5 -#define DEFAULT_UDP_PORTNO 50001 -#define DEFAULT_GUI_PORTNO 65000 -//#define DEFAULT_ZMQ_PORTNO defined in zmqSocket.h (40001) + class genericSocket{ diff --git a/slsReceiverSoftware/include/sls_receiver_defs.h b/slsReceiverSoftware/include/sls_receiver_defs.h index d86d5d52b..2f0260db3 100755 --- a/slsReceiverSoftware/include/sls_receiver_defs.h +++ b/slsReceiverSoftware/include/sls_receiver_defs.h @@ -29,6 +29,13 @@ typedef int int32_t; #define DEFAULT_STREAMING_TIMER_IN_MS 200 +/** default ports */ +#define DEFAULT_PORTNO 1952 +#define DEFAULT_UDP_PORTNO 50001 +#define DEFAULT_GUI_PORTNO 65001 +#define DEFAULT_ZMQ_CL_PORTNO 30001 +#define DEFAULT_ZMQ_RX_PORTNO 31000 + /** \file sls_receiver_defs.h This file contains all the basic definitions common to the slsReceiver class diff --git a/slsReceiverSoftware/src/UDPBaseImplementation.cpp b/slsReceiverSoftware/src/UDPBaseImplementation.cpp index 2b145d8a3..810e9c5ad 100644 --- a/slsReceiverSoftware/src/UDPBaseImplementation.cpp +++ b/slsReceiverSoftware/src/UDPBaseImplementation.cpp @@ -563,11 +563,7 @@ int UDPBaseImplementation::setActivate(int enable){ } void UDPBaseImplementation::setStreamingPort(const uint32_t i) { - - if (streamingPort == 0) - streamingPort = DEFAULT_ZMQ_PORTNO + (detID * ((myDetectorType == EIGER) ? 2 : 1) ); // multiplied by 2 as eiger has 2 ports - else - streamingPort = i; + streamingPort = i; FILE_LOG(logINFO) << "Streaming Port: " << streamingPort; } diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index 6e79edc08..6ec1144db 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -211,9 +211,6 @@ int UDPStandardImplementation::setDataStreamEnable(const bool enable) {\ for ( int i = 0; i < numThreads; ++i ) { dataStreamer.push_back(new DataStreamer(fifo[i], &dynamicRange, &shortFrameEnable, &fileIndex)); dataStreamer[i]->SetGeneralData(generalData); - // check again - if (streamingPort == 0) - streamingPort = DEFAULT_ZMQ_PORTNO + (detID * ((myDetectorType == EIGER) ? 2 : 1) ); // multiplied by 2 as eiger has 2 ports if (dataStreamer[i]->CreateZmqSockets(&numThreads, streamingPort) == FAIL) { error = true; break; diff --git a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp index 35a66925c..1347ca629 100644 --- a/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp +++ b/slsReceiverSoftware/src/slsReceiverTCPIPInterface.cpp @@ -2345,11 +2345,6 @@ int slsReceiverTCPIPInterface::set_streaming_port() { } //get retval=receiverBase->getStreamingPort(); - if(port > 0 && retval != port) { //if port = 0, its actual value calculated - ret = FAIL; - strcpy(mess, "Could not set streaming port\n"); - FILE_LOG(logERROR) << "Warning: " << mess; - } } #endif #ifdef VERYVERBOSE