diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index ca465c95c..fb33c9cf2 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -679,7 +679,7 @@ void Detector::setDestinationUDPPort2(int port, int module_id) { } Result Detector::printRxConfiguration(Positions pos) const { - return pimpl->Parallel3(&Receiver::printConfiguration); // ignoring pos FIXME + return pimpl->Parallel(&Module::printUDPConfiguration, pos); } Result Detector::getTenGiga(Positions pos) const { diff --git a/slsDetectorSoftware/src/Module.cpp b/slsDetectorSoftware/src/Module.cpp index 43b3b75c7..cd7f3a416 100755 --- a/slsDetectorSoftware/src/Module.cpp +++ b/slsDetectorSoftware/src/Module.cpp @@ -1711,6 +1711,34 @@ int Module::getSelectedUDPInterface() { return retval; } +std::string Module::printUDPConfiguration() { + std::ostringstream oss; + oss << std::endl << std::endl + << "Module " << moduleId << std::endl + << "Hostname : " << shm()->hostname << std::endl; + if (shm()->myDetectorType == JUNGFRAU) { + oss << "Number of Interfaces : " << getNumberofUDPInterfaces() << std::endl + << "Selected Interface : " << getSelectedUDPInterface() << std::endl; + } + oss << "UDP Source IP : " << getSourceUDPIP() << std::endl + << "UDP Source MAC : " << getSourceUDPMAC() << std::endl + << "UDP Destination IP : " << getDestinationUDPIP() << std::endl + << "UDP Destination MAC : " << getDestinationUDPMAC() << std::endl; + if (shm()->myDetectorType == JUNGFRAU) { + oss << "UDP Source IP : " << getSourceUDPIP() << std::endl + << "UDP Source IP2 : " << getSourceUDPIP2() << std::endl + << "UDP Source MAC2 : " << getSourceUDPMAC2() << std::endl + << "UDP Destination IP2 : " << getDestinationUDPIP2() << std::endl + << "UDP Destination MAC2 : " << getDestinationUDPMAC2() << std::endl; + } + oss << "UDP Destination Port : " << getDestinationUDPPort() << std::endl; + if (shm()->myDetectorType == JUNGFRAU || shm()->myDetectorType == EIGER) { + oss << "UDP Destination Port2: " << getDestinationUDPPort() << std::endl; + } + oss << "\n"; + return oss.str(); +} + void Module::setClientStreamingPort(int port) { shm()->zmqport = port; } int Module::getClientStreamingPort() { return shm()->zmqport; } diff --git a/slsDetectorSoftware/src/Module.h b/slsDetectorSoftware/src/Module.h index 1e29fee08..65a9c914f 100755 --- a/slsDetectorSoftware/src/Module.h +++ b/slsDetectorSoftware/src/Module.h @@ -799,6 +799,8 @@ class Module : public virtual slsDetectorDefs { */ int getSelectedUDPInterface(); + std::string printUDPConfiguration(); + /** * Sets the client zmq port * @param port client zmq port diff --git a/slsDetectorSoftware/src/Receiver.cpp b/slsDetectorSoftware/src/Receiver.cpp index 7f8a7c04b..5918b4774 100755 --- a/slsDetectorSoftware/src/Receiver.cpp +++ b/slsDetectorSoftware/src/Receiver.cpp @@ -284,24 +284,22 @@ sls::MacAddr Receiver::configure(slsDetectorDefs::rxParameters arg) { setAdditionalJsonParameter("adcmask_10g", std::to_string(arg.adc10gMask)); } - LOG(logINFOBLUE) << receiverId << " configured!"; + LOG(logINFOBLUE) << "reciever " << indexString << " configured!"; return mac; } std::string Receiver::printConfiguration() { - std::ostringstream os; + std::ostringstream oss; - os << "\n\nModuler " << indexString - << "\nReceiver Hostname:\t"<< shm()->hostname; - /* - if (shm()->myDetectorType == JUNGFRAU) { - os << "\nNumber of Interfaces:\t" << getNumberofUDPInterfaces() - << "\nSelected Interface:\t" << getSelectedUDPInterface(); - } + oss << std::endl << std::endl + << "Receiver " << indexString << std::endl + << "Hostname : " << shm()->hostname << std::endl + << "Tcp port : " << shm()->tcpPort << std::endl; + - os << "\nDetector UDP IP:\t" - << getSourceUDPIP() << "\nDetector UDP MAC:\t" - << getSourceUDPMAC() << "\nReceiver UDP IP:\t" + /* + + os << "\nReceiver UDP IP:\t" << getDestinationUDPIP() << "\nReceiver UDP MAC:\t" << getDestinationUDPMAC(); if (shm()->myDetectorType == JUNGFRAU) { @@ -315,8 +313,8 @@ std::string Receiver::printConfiguration() { os << "\nReceiver UDP Port2:\t" << getDestinationUDPPort2(); } */ - os << "\n"; - return os.str(); + oss << "\n"; + return oss.str(); } /** Acquisition */ diff --git a/slsDetectorSoftware/src/SharedMemory.h b/slsDetectorSoftware/src/SharedMemory.h index 861ba778a..a31812bc1 100755 --- a/slsDetectorSoftware/src/SharedMemory.h +++ b/slsDetectorSoftware/src/SharedMemory.h @@ -24,7 +24,7 @@ #define SHM_MULTI_PREFIX "/slsDetectorPackage_multi_" #define SHM_MODULE_PREFIX "_module_" -#define SHM_RECEIVER_PREFIX "_receiver" //interface_id + '_' +#define SHM_RECEIVER_PREFIX "_receiver_" #define SHM_ENV_NAME "SLSDETNAME" #include @@ -244,7 +244,7 @@ class SharedMemory { else ss << SHM_MULTI_PREFIX << multiId << SHM_MODULE_PREFIX << moduleId << - SHM_RECEIVER_PREFIX << interfaceId << '_' << receiverId << sEnvPath; + SHM_RECEIVER_PREFIX << (char)(interfaceId + 97) << '_' << receiverId << sEnvPath; std::string temp = ss.str(); if (temp.length() > NAME_MAX_LENGTH) {