mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 07:20:01 +02:00
merge conflict fix
This commit is contained in:
commit
5b05a30287
Binary file not shown.
@ -1707,30 +1707,34 @@ int configureMAC() {
|
|||||||
getIpAddressinString(src_ip2, srcip2);
|
getIpAddressinString(src_ip2, srcip2);
|
||||||
getIpAddressinString(dst_ip2, dstip2);
|
getIpAddressinString(dst_ip2, dstip2);
|
||||||
|
|
||||||
int numInterfaces = getNumberofUDPInterfaces();
|
|
||||||
int vetoEnabled = getVeto();
|
|
||||||
|
|
||||||
LOG(logINFO, ("\t#Veto : %d\n", vetoEnabled));
|
|
||||||
LOG(logINFO, ("\t#10Gb Interfaces : %d\n", numInterfaces));
|
|
||||||
|
|
||||||
LOG(logINFO, ("\tData Interface \n"));
|
LOG(logINFO, ("\tData Interface \n"));
|
||||||
LOG(logINFO, ("\tSource IP : %s\n"
|
LOG(logINFO, ("\tSource IP : %s\n"
|
||||||
"\tSource MAC : %s\n"
|
"\tSource MAC : %s\n"
|
||||||
"\tSource Port : %d\n"
|
"\tSource Port : %d\n"
|
||||||
"\tDest IP : %s\n"
|
"\tDest IP : %s\n"
|
||||||
"\tDest MAC : %s\n"
|
"\tDest MAC : %s\n"
|
||||||
"\tDest Port : %d\n",
|
"\tDest Port : %d\n\n",
|
||||||
src_ip, src_mac, srcport, dst_ip, dst_mac, dstport));
|
src_ip, src_mac, srcport, dst_ip, dst_mac, dstport));
|
||||||
|
|
||||||
LOG(logINFO,
|
int i3gbe = getVetoStream();
|
||||||
("\tVeto Interface (%s)\n",
|
int i10gbe = (getNumberofUDPInterfaces() == 2 ? 1 : 0);
|
||||||
(vetoEnabled && numInterfaces == 2 ? "enabled" : "disabled")));
|
|
||||||
|
if (i3gbe) {
|
||||||
|
LOG(logINFOGREEN, ("\tVeto (3GbE) : enabled\n\n"));
|
||||||
|
} else {
|
||||||
|
LOG(logINFORED, ("\tVeto (3GbE) : disabled\n\n"));
|
||||||
|
}
|
||||||
|
if (i10gbe) {
|
||||||
|
LOG(logINFOGREEN, ("\tVeto (10GbE): enabled\n"));
|
||||||
|
} else {
|
||||||
|
LOG(logINFORED, ("\tVeto (10GbE): disabled\n"));
|
||||||
|
}
|
||||||
LOG(logINFO, ("\tSource IP2 : %s\n"
|
LOG(logINFO, ("\tSource IP2 : %s\n"
|
||||||
"\tSource MAC2 : %s\n"
|
"\tSource MAC2 : %s\n"
|
||||||
"\tSource Port2: %d\n"
|
"\tSource Port2: %d\n"
|
||||||
"\tDest IP2 : %s\n"
|
"\tDest IP2 : %s\n"
|
||||||
"\tDest MAC2 : %s\n"
|
"\tDest MAC2 : %s\n"
|
||||||
"\tDest Port2 : %d\n",
|
"\tDest Port2 : %d\n\n",
|
||||||
src_ip2, src_mac2, srcport2, dst_ip2, dst_mac2, dstport2));
|
src_ip2, src_mac2, srcport2, dst_ip2, dst_mac2, dstport2));
|
||||||
|
|
||||||
#ifdef VIRTUAL
|
#ifdef VIRTUAL
|
||||||
@ -1738,8 +1742,7 @@ int configureMAC() {
|
|||||||
LOG(logERROR, ("could not set udp destination IP and port\n"));
|
LOG(logERROR, ("could not set udp destination IP and port\n"));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
if (vetoEnabled && numInterfaces == 2 &&
|
if (i10gbe && setUDPDestinationDetails(1, dst_ip2, dstport2) == FAIL) {
|
||||||
setUDPDestinationDetails(1, dst_ip2, dstport2) == FAIL) {
|
|
||||||
LOG(logERROR, ("could not set udp destination IP and port for "
|
LOG(logERROR, ("could not set udp destination IP and port for "
|
||||||
"interface 2\n"));
|
"interface 2\n"));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
@ -1753,7 +1756,7 @@ int configureMAC() {
|
|||||||
setupHeader(iRxEntry, 0, dstip, dstmac, dstport, srcmac, srcip, srcport);
|
setupHeader(iRxEntry, 0, dstip, dstmac, dstport, srcmac, srcip, srcport);
|
||||||
|
|
||||||
// veto
|
// veto
|
||||||
if (vetoEnabled && numInterfaces == 2) {
|
if (i10gbe) {
|
||||||
setupHeader(iRxEntry, 1, dstip2, dstmac2, dstport2, srcmac2, srcip2,
|
setupHeader(iRxEntry, 1, dstip2, dstmac2, dstport2, srcmac2, srcip2,
|
||||||
srcport2);
|
srcport2);
|
||||||
}
|
}
|
||||||
@ -2699,8 +2702,7 @@ int startStateMachine() {
|
|||||||
if (createUDPSocket(0) != OK) {
|
if (createUDPSocket(0) != OK) {
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
if (getVeto() && getNumberofUDPInterfaces() == 2 &&
|
if (getNumberofUDPInterfaces() == 2 && createUDPSocket(1) != OK) {
|
||||||
createUDPSocket(1) != OK) {
|
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
LOG(logINFOBLUE, ("Starting State Machine\n"));
|
LOG(logINFOBLUE, ("Starting State Machine\n"));
|
||||||
@ -2735,8 +2737,7 @@ void *start_timer(void *arg) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int numInterfaces = getNumberofUDPInterfaces();
|
int i10gbe = (getNumberofUDPInterfaces() == 2 ? 1 : 0);
|
||||||
int vetoEnabled = getVeto();
|
|
||||||
|
|
||||||
int numRepeats = getNumTriggers();
|
int numRepeats = getNumTriggers();
|
||||||
if (getTiming() == AUTO_TIMING) {
|
if (getTiming() == AUTO_TIMING) {
|
||||||
@ -2818,7 +2819,7 @@ void *start_timer(void *arg) {
|
|||||||
// second interface (veto)
|
// second interface (veto)
|
||||||
char packetData2[vetopacketsize];
|
char packetData2[vetopacketsize];
|
||||||
memset(packetData2, 0, vetopacketsize);
|
memset(packetData2, 0, vetopacketsize);
|
||||||
if (vetoEnabled && numInterfaces == 2) {
|
if (i10gbe) {
|
||||||
// set header
|
// set header
|
||||||
veto_header *header = (veto_header *)(packetData2);
|
veto_header *header = (veto_header *)(packetData2);
|
||||||
header->frameNumber = virtual_currentFrameNumber;
|
header->frameNumber = virtual_currentFrameNumber;
|
||||||
@ -2829,9 +2830,9 @@ void *start_timer(void *arg) {
|
|||||||
// send 1 packet = 1 frame
|
// send 1 packet = 1 frame
|
||||||
sendUDPPacket(1, packetData2, vetopacketsize);
|
sendUDPPacket(1, packetData2, vetopacketsize);
|
||||||
}
|
}
|
||||||
LOG(logINFO,
|
LOG(logINFO, ("Sent frame %s: %d (bursts/ triggers: %d) [%lld]\n",
|
||||||
("Sent frame: %d (bursts/ triggers: %d) [%lld]\n", frameNr,
|
(i10gbe ? "(+veto)" : ""), frameNr, repeatNr,
|
||||||
repeatNr, (long long unsigned int)virtual_currentFrameNumber));
|
(long long unsigned int)virtual_currentFrameNumber));
|
||||||
clock_gettime(CLOCK_REALTIME, &end);
|
clock_gettime(CLOCK_REALTIME, &end);
|
||||||
int64_t timeNs = ((end.tv_sec - begin.tv_sec) * 1E9 +
|
int64_t timeNs = ((end.tv_sec - begin.tv_sec) * 1E9 +
|
||||||
(end.tv_nsec - begin.tv_nsec));
|
(end.tv_nsec - begin.tv_nsec));
|
||||||
@ -2857,7 +2858,7 @@ void *start_timer(void *arg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
closeUDPSocket(0);
|
closeUDPSocket(0);
|
||||||
if (vetoEnabled && numInterfaces == 2) {
|
if (i10gbe) {
|
||||||
closeUDPSocket(1);
|
closeUDPSocket(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
@ -2166,7 +2166,8 @@ std::vector<int> Detector::getPortNumbers(int start_port) {
|
|||||||
num_sockets_per_detector *= 2;
|
num_sockets_per_detector *= 2;
|
||||||
break;
|
break;
|
||||||
case defs::JUNGFRAU:
|
case defs::JUNGFRAU:
|
||||||
if (getNumberofUDPInterfaces().squash() == 2) {
|
case defs::GOTTHARD2:
|
||||||
|
if (getNumberofUDPInterfaces_({}).squash() == 2) {
|
||||||
num_sockets_per_detector *= 2;
|
num_sockets_per_detector *= 2;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
#define APIGUI 0x210225
|
#define APIGUI 0x210225
|
||||||
#define APICTB 0x210621
|
#define APICTB 0x210621
|
||||||
#define APIGOTTHARD 0x210621
|
#define APIGOTTHARD 0x210621
|
||||||
#define APIGOTTHARD2 0x210721
|
#define APIGOTTHARD2 0x210722
|
||||||
#define APIJUNGFRAU 0x210714
|
#define APIJUNGFRAU 0x210722
|
||||||
#define APIMYTHEN3 0x210621
|
#define APIMYTHEN3 0x210621
|
||||||
#define APIMOENCH 0x210621
|
#define APIMOENCH 0x210621
|
||||||
#define APIEIGER 0x210721
|
#define APIEIGER 0x210721
|
||||||
|
Loading…
x
Reference in New Issue
Block a user