multisize to numberofdetectors

This commit is contained in:
2020-06-17 09:57:56 +02:00
parent e09fc8cd2b
commit b5781e1f9b
8 changed files with 27 additions and 29 deletions

View File

@ -339,8 +339,10 @@ int ClientInterface::get_version(Interface &socket) {
int ClientInterface::setup_receiver(Interface &socket) {
auto arg = socket.Receive<rxParameters>();
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);

View File

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

View File

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