diff --git a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c index 6f5f1963e..d47e0a816 100644 --- a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c +++ b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c @@ -6916,7 +6916,7 @@ int get_receiver_parameters(int file_des) { n += sendData(file_des, &i32, sizeof(i32), INT32); if (n < 0) return printSocketReadError(); - // multisize + // numberOfDetector i32 = 0; n += sendData(file_des, &i32, sizeof(i32), INT32); if (n < 0) diff --git a/slsDetectorSoftware/src/DetectorImpl.cpp b/slsDetectorSoftware/src/DetectorImpl.cpp index b83b72f4e..97aa617ee 100644 --- a/slsDetectorSoftware/src/DetectorImpl.cpp +++ b/slsDetectorSoftware/src/DetectorImpl.cpp @@ -315,7 +315,7 @@ void DetectorImpl::updateDetectorSize() { << multi_shm()->numberOfChannels.y; for (auto &d : detectors) { - d->updateMultiSize(multi_shm()->numberOfDetector); + d->updateNumberOfDetector(multi_shm()->numberOfDetector); } } diff --git a/slsDetectorSoftware/src/Module.cpp b/slsDetectorSoftware/src/Module.cpp index b3a77081a..09c62596c 100644 --- a/slsDetectorSoftware/src/Module.cpp +++ b/slsDetectorSoftware/src/Module.cpp @@ -375,8 +375,8 @@ void Module::initializeDetectorStructure(detectorType type) { shm()->shmversion = SLS_SHMVERSION; memset(shm()->hostname, 0, MAX_STR_LENGTH); shm()->myDetectorType = type; - shm()->multiSize.x = 0; - shm()->multiSize.y = 0; + shm()->numberOfDetector.x = 0; + shm()->numberOfDetector.y = 0; shm()->controlPort = DEFAULT_PORTNO; shm()->stopPort = DEFAULT_PORTNO + 1; sls::strcpy_safe(shm()->settingsDir, getenv("HOME")); @@ -558,9 +558,9 @@ void Module::setReadNLines(const int value) { int Module::getReadNLines() { return sendToDetector(F_GET_READ_N_LINES); } -void Module::updateMultiSize(slsDetectorDefs::xy det) { - shm()->multiSize = det; - int args[2] = {shm()->multiSize.y, detId}; +void Module::updateNumberOfDetector(slsDetectorDefs::xy det) { + shm()->numberOfDetector = det; + int args[2] = {shm()->numberOfDetector.y, detId}; sendToDetector(F_SET_POSITION, args, nullptr); } @@ -1434,15 +1434,17 @@ void Module::setReceiverHostname(const std::string &receiverIP) { // populate from shared memory retval.detType = shm()->myDetectorType; - retval.multiSize.x = shm()->multiSize.x; - retval.multiSize.y = shm()->multiSize.y; + retval.numberOfDetector.x = shm()->numberOfDetector.x; + retval.numberOfDetector.y = shm()->numberOfDetector.y; retval.detId = detId; memset(retval.hostname, 0, sizeof(retval.hostname)); strcpy_safe(retval.hostname, shm()->hostname); LOG(logDEBUG1) << "detType:" << retval.detType << std::endl - << "multiSize.x:" << retval.multiSize.x << std::endl - << "multiSize.y:" << retval.multiSize.y << std::endl + << "numberOfDetector.x:" << retval.numberOfDetector.x + << std::endl + << "numberOfDetector.y:" << retval.numberOfDetector.y + << std::endl << "detId:" << retval.detId << std::endl << "hostname:" << retval.hostname << std::endl << "udpInterfaces:" << retval.udpInterfaces << std::endl diff --git a/slsDetectorSoftware/src/Module.h b/slsDetectorSoftware/src/Module.h index af596c2b3..2df993f46 100644 --- a/slsDetectorSoftware/src/Module.h +++ b/slsDetectorSoftware/src/Module.h @@ -26,20 +26,14 @@ struct sharedSlsDetector { /* FIXED PATTERN FOR STATIC FUNCTIONS. DO NOT CHANGE, ONLY APPEND ------*/ - /** shared memory version */ int shmversion; - - /** is the hostname (or IP address) of the detector. needs to be set - * before starting the communication */ char hostname[MAX_STR_LENGTH]; - - /** detector type \ see :: detectorType*/ slsDetectorDefs::detectorType myDetectorType; /** END OF FIXED PATTERN -----------------------------------------------*/ /** Number of detectors in multi list in x dir and y dir */ - slsDetectorDefs::xy multiSize; + slsDetectorDefs::xy numberOfDetector; /** is the port used for control functions */ int controlPort; @@ -212,7 +206,7 @@ class Module : public virtual slsDetectorDefs { * Set Detector offset in shared memory in dimension d * @param det detector size */ - void updateMultiSize(slsDetectorDefs::xy det); + void updateNumberOfDetector(slsDetectorDefs::xy det); int setControlPort(int port_number); diff --git a/slsReceiverSoftware/src/ClientInterface.cpp b/slsReceiverSoftware/src/ClientInterface.cpp index ef9dbfc52..d1300c9b1 100644 --- a/slsReceiverSoftware/src/ClientInterface.cpp +++ b/slsReceiverSoftware/src/ClientInterface.cpp @@ -339,8 +339,10 @@ int ClientInterface::get_version(Interface &socket) { int ClientInterface::setup_receiver(Interface &socket) { auto arg = socket.Receive(); LOG(logDEBUG) << "detType:" << arg.detType << std::endl - << "multiSize.x:" << arg.multiSize.x << std::endl - << "multiSize.y:" << arg.multiSize.y << std::endl + << "numberOfDetector.x:" << arg.numberOfDetector.x + << std::endl + << "numberOfDetector.y:" << arg.numberOfDetector.y + << std::endl << "detId:" << arg.detId << std::endl << "hostname:" << arg.hostname << std::endl << "udpInterfaces:" << arg.udpInterfaces << std::endl @@ -389,8 +391,8 @@ int ClientInterface::setup_receiver(Interface &socket) { // basic setup setDetectorType(arg.detType); { - int msize[2] = {arg.multiSize.x, arg.multiSize.y}; - impl()->setMultiDetectorSize(msize); + int msize[2] = {arg.numberOfDetector.x, arg.numberOfDetector.y}; + impl()->setDetectorSize(msize); } impl()->setDetectorPositionId(arg.detId); impl()->setDetectorHostname(arg.hostname); diff --git a/slsReceiverSoftware/src/Implementation.cpp b/slsReceiverSoftware/src/Implementation.cpp index 31e7304ca..6cc9c63be 100644 --- a/slsReceiverSoftware/src/Implementation.cpp +++ b/slsReceiverSoftware/src/Implementation.cpp @@ -315,12 +315,12 @@ void Implementation::setDetectorType(const detectorType d) { LOG(logDEBUG) << " Detector type set to " << sls::ToString(d); } -int *Implementation::getMultiDetectorSize() const { +int *Implementation::getDetectorSize() const { LOG(logDEBUG3) << __SHORT_AT__ << " called"; return (int *)numDet; } -void Implementation::setMultiDetectorSize(const int *size) { +void Implementation::setDetectorSize(const int *size) { LOG(logDEBUG3) << __SHORT_AT__ << " called"; std::string log_message = "Detector Size (ports): ("; for (int i = 0; i < MAX_DIMENSIONS; ++i) { @@ -1062,7 +1062,7 @@ void Implementation::setNumberofUDPInterfaces(const int n) { SetThreadPriorities(); // update (from 1 to 2 interface) & also for printout - setMultiDetectorSize(numDet); + setDetectorSize(numDet); // update row and column in dataprocessor setDetectorPositionId(detID); diff --git a/slsReceiverSoftware/src/Implementation.h b/slsReceiverSoftware/src/Implementation.h index 5f6e94374..889fed2c3 100644 --- a/slsReceiverSoftware/src/Implementation.h +++ b/slsReceiverSoftware/src/Implementation.h @@ -28,8 +28,8 @@ class Implementation : private virtual slsDetectorDefs { * ************************************************/ void setDetectorType(const detectorType d); - int *getMultiDetectorSize() const; - void setMultiDetectorSize(const int *size); + int *getDetectorSize() const; + void setDetectorSize(const int *size); int getDetectorPositionId() const; void setDetectorPositionId(const int id); std::string getDetectorHostname() const; diff --git a/slsSupportLib/include/sls_detector_defs.h b/slsSupportLib/include/sls_detector_defs.h index 52ce82470..78528006a 100644 --- a/slsSupportLib/include/sls_detector_defs.h +++ b/slsSupportLib/include/sls_detector_defs.h @@ -445,7 +445,7 @@ typedef struct { */ struct rxParameters { detectorType detType{GENERIC}; - xy multiSize; + xy numberOfDetector; int detId{0}; char hostname[MAX_STR_LENGTH]; int udpInterfaces{1};