fixed eiger bottom port now shows, because number of udp interfaces for eiger was set by default to get zmq port, has to be calcualted again now

This commit is contained in:
maliakal_d 2022-01-13 16:39:17 +01:00
parent 01d7831abf
commit c15131f8f6

View File

@ -245,6 +245,15 @@ void DetectorImpl::setHostname(const std::vector<std::string> &name) {
addModule(hostname); addModule(hostname);
} }
updateDetectorSize(); updateDetectorSize();
// update zmq port (especially for eiger)
int numInterfaces = modules[0]->getNumberofUDPInterfaces();
if (numInterfaces == 2) {
for (size_t i = 0; i < modules.size(); ++i) {
modules[i]->setClientStreamingPort(DEFAULT_ZMQ_CL_PORTNO +
i * numInterfaces);
}
}
} }
void DetectorImpl::addModule(const std::string &hostname) { void DetectorImpl::addModule(const std::string &hostname) {
@ -284,8 +293,6 @@ void DetectorImpl::addModule(const std::string &hostname) {
.tsquash("Inconsistent detector types."); .tsquash("Inconsistent detector types.");
// for moench and ctb // for moench and ctb
modules[pos]->updateNumberOfChannels(); modules[pos]->updateNumberOfChannels();
modules[pos]->getNumberofUDPInterfaces();
} }
void DetectorImpl::updateDetectorSize() { void DetectorImpl::updateDetectorSize() {
@ -545,8 +552,9 @@ void DetectorImpl::readFrameFromReceiver() {
nPixelsX = zHeader.npixelsx; nPixelsX = zHeader.npixelsx;
nPixelsY = zHeader.npixelsy; nPixelsY = zHeader.npixelsy;
// module shape // module shape
nX = zHeader.ndetx; // * module_ports[1]; // TODO: check nX =
// if module_ports[1] needed zHeader.ndetx; // not multiplied by module_ports[1],
// already done in receiver
nY = zHeader.ndety * module_ports[0]; nY = zHeader.ndety * module_ports[0];
nDetPixelsX = nX * nPixelsX; nDetPixelsX = nX * nPixelsX;
nDetPixelsY = nY * nPixelsY; nDetPixelsY = nY * nPixelsY;