setting rx_hostname (or udp_dstip with rx_hostname not none) will always set udp_dstmac. solves problem of chaing udp_dstip and udp_dstmac stays the same (#544)

This commit is contained in:
Dhanya Thattil
2022-09-05 16:57:54 +02:00
committed by GitHub
parent 7de6f157b5
commit 76c18f3303
5 changed files with 22 additions and 16 deletions

View File

@ -1631,7 +1631,8 @@ class CmdProxy {
"[x:x:x:x:x:x]\n\tMac address of the receiver (destination) udp "
"interface. Not mandatory to set as udp_dstip retrieves it from "
"slsReceiver process, but must be set if you use a custom receiver "
"(not slsReceiver).");
"(not slsReceiver). Use router mac if router between detector and "
"receiver.");
INTEGER_COMMAND_VEC_ID(
udp_dstmac2, getDestinationUDPMAC2, setDestinationUDPMAC2, MacAddr,
@ -1639,8 +1640,8 @@ class CmdProxy {
"udp interface 2. Not mandatory to set as udp_dstip2 retrieves it from "
"slsReceiver process but must be set if you use a custom receiver (not "
"slsReceiver). \n\t [Jungfrau] top half or inner interface \n\t "
"[Gotthard2] veto "
"debugging.");
"[Gotthard2] veto debugging. Use router mac if router between detector "
"and receiver.");
INTEGER_COMMAND_VEC_ID_GET(
udp_dstport, getDestinationUDPPort, setDestinationUDPPort,

View File

@ -1320,16 +1320,16 @@ void Module::setReceiverHostname(const std::string &receiverIP) {
MacAddr retvals[2];
sendToReceiver(F_SETUP_RECEIVER, retval, retvals);
// update Modules with dest mac
if (retval.udp_dstmac == 0 && retvals[0] != 0) {
LOG(logINFO) << "Setting destination udp mac of "
"Module "
<< moduleIndex << " to " << retvals[0];
if (retvals[0] != 0) {
LOG(logINFO) << "Setting destination udp mac of Module " << moduleIndex
<< " to " << retvals[0]
<< ". Use udp_dstmac for custom mac.";
sendToDetector(F_SET_DEST_UDP_MAC, retvals[0], nullptr);
}
if (retval.udp_dstmac2 == 0 && retvals[1] != 0) {
LOG(logINFO) << "Setting destination udp mac2 of "
"Module "
<< moduleIndex << " to " << retvals[1];
if (retvals[1] != 0) {
LOG(logINFO) << "Setting destination udp mac2 of Module " << moduleIndex
<< " to " << retvals[1]
<< ". Use udp_dstmac2 for custom mac.";
sendToDetector(F_SET_DEST_UDP_MAC2, retvals[1], nullptr);
}