mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-04 00:50:42 +02:00
unicast udp_srcmac (#642)
* udp_srcmac can only be a unicast address (LSB of first octet must be 0) * renamed binaries
This commit is contained in:
parent
c62ce0ce6b
commit
55bf73f3b7
@ -1 +0,0 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.0.rc1
|
1
serverBin/ctbDetectorServerv7.0.0.rc3
Symbolic link
1
serverBin/ctbDetectorServerv7.0.0.rc3
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.0.rc3
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.0.rc1
|
1
serverBin/eigerDetectorServerv7.0.0.rc3
Symbolic link
1
serverBin/eigerDetectorServerv7.0.0.rc3
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.0.rc3
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.0.rc1
|
1
serverBin/gotthard2DetectorServerv7.0.0.rc3
Symbolic link
1
serverBin/gotthard2DetectorServerv7.0.0.rc3
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.0.rc3
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0.rc2
|
1
serverBin/gotthardDetectorServerv7.0.0.rc3
Symbolic link
1
serverBin/gotthardDetectorServerv7.0.0.rc3
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0.rc3
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.0.rc1
|
1
serverBin/jungfrauDetectorServerv7.0.0.rc3
Symbolic link
1
serverBin/jungfrauDetectorServerv7.0.0.rc3
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.0.rc3
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.0.rc1
|
1
serverBin/moenchDetectorServerv7.0.0.rc3
Symbolic link
1
serverBin/moenchDetectorServerv7.0.0.rc3
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.0.rc3
|
Binary file not shown.
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.0.rc3
Executable file
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.0.rc3
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.0.rc3
Executable file
BIN
slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.0.rc3
Executable file
Binary file not shown.
Binary file not shown.
BIN
slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0.rc3
Executable file
BIN
slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0.rc3
Executable file
Binary file not shown.
Binary file not shown.
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.0.rc3
Executable file
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.0.rc3
Executable file
Binary file not shown.
Binary file not shown.
BIN
slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.0.rc3
Executable file
BIN
slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.0.rc3
Executable file
Binary file not shown.
Binary file not shown.
@ -1916,55 +1916,57 @@ int acquire(int blocking, int file_des) {
|
||||
#ifdef EIGERD
|
||||
// check for hardware mac and hardware ip
|
||||
if (udpDetails[0].srcmac != getDetectorMAC()) {
|
||||
ret = FAIL;
|
||||
uint64_t sourcemac = getDetectorMAC();
|
||||
char src_mac[MAC_ADDRESS_SIZE];
|
||||
getMacAddressinString(src_mac, MAC_ADDRESS_SIZE, sourcemac);
|
||||
sprintf(mess,
|
||||
ret = FAIL;
|
||||
uint64_t sourcemac = getDetectorMAC();
|
||||
char src_mac[MAC_ADDRESS_SIZE];
|
||||
getMacAddressinString(src_mac, MAC_ADDRESS_SIZE, sourcemac);
|
||||
sprintf(
|
||||
mess,
|
||||
"Invalid udp source mac address for this detector. Must be "
|
||||
"same as hardware detector mac address %s\n",
|
||||
src_mac);
|
||||
LOG(logERROR, (mess));
|
||||
} else if (!enableTenGigabitEthernet(GET_FLAG) &&
|
||||
(udpDetails[0].srcip != getDetectorIP())) {
|
||||
ret = FAIL;
|
||||
uint32_t sourceip = getDetectorIP();
|
||||
char src_ip[INET_ADDRSTRLEN];
|
||||
getIpAddressinString(src_ip, sourceip);
|
||||
sprintf(mess,
|
||||
LOG(logERROR, (mess));
|
||||
} else if (!enableTenGigabitEthernet(GET_FLAG) &&
|
||||
(udpDetails[0].srcip != getDetectorIP())) {
|
||||
ret = FAIL;
|
||||
uint32_t sourceip = getDetectorIP();
|
||||
char src_ip[INET_ADDRSTRLEN];
|
||||
getIpAddressinString(src_ip, sourceip);
|
||||
sprintf(
|
||||
mess,
|
||||
"Invalid udp source ip address for this detector. Must be "
|
||||
"same as hardware detector ip address %s in 1G readout "
|
||||
"mode \n",
|
||||
src_ip);
|
||||
LOG(logERROR, (mess));
|
||||
} else
|
||||
LOG(logERROR, (mess));
|
||||
} else
|
||||
#endif
|
||||
if (configured == FAIL) {
|
||||
ret = FAIL;
|
||||
strcpy(mess, "Could not start acquisition because ");
|
||||
strcat(mess, configureMessage);
|
||||
LOG(logERROR, (mess));
|
||||
} else if (sharedMemory_getScanStatus() == RUNNING) {
|
||||
ret = FAIL;
|
||||
strcpy(mess, "Could not start acquisition because a scan is "
|
||||
"already running!\n");
|
||||
LOG(logERROR, (mess));
|
||||
} else {
|
||||
memset(scanErrMessage, 0, MAX_STR_LENGTH);
|
||||
sharedMemory_setScanStop(0);
|
||||
sharedMemory_setScanStatus(IDLE); // if it was error
|
||||
if (pthread_create(&pthread_tid, NULL, &start_state_machine,
|
||||
&blocking)) {
|
||||
if (configured == FAIL) {
|
||||
ret = FAIL;
|
||||
strcpy(mess, "Could not start acquisition thread!\n");
|
||||
strcpy(mess, "Could not start acquisition because ");
|
||||
strcat(mess, configureMessage);
|
||||
LOG(logERROR, (mess));
|
||||
} else if (sharedMemory_getScanStatus() == RUNNING) {
|
||||
ret = FAIL;
|
||||
strcpy(mess, "Could not start acquisition because a scan is "
|
||||
"already running!\n");
|
||||
LOG(logERROR, (mess));
|
||||
} else {
|
||||
// only does not wait for non blocking and scan
|
||||
if (blocking || !scan) {
|
||||
pthread_join(pthread_tid, NULL);
|
||||
memset(scanErrMessage, 0, MAX_STR_LENGTH);
|
||||
sharedMemory_setScanStop(0);
|
||||
sharedMemory_setScanStatus(IDLE); // if it was error
|
||||
if (pthread_create(&pthread_tid, NULL, &start_state_machine,
|
||||
&blocking)) {
|
||||
ret = FAIL;
|
||||
strcpy(mess, "Could not start acquisition thread!\n");
|
||||
LOG(logERROR, (mess));
|
||||
} else {
|
||||
// only does not wait for non blocking and scan
|
||||
if (blocking || !scan) {
|
||||
pthread_join(pthread_tid, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Server_SendResult(file_des, INT32, NULL, 0);
|
||||
}
|
||||
@ -5139,11 +5141,20 @@ int set_source_udp_mac(int file_des) {
|
||||
if (Server_VerifyLock() == OK) {
|
||||
if (check_detector_idle("configure mac") == OK) {
|
||||
if (udpDetails[0].srcmac != arg) {
|
||||
for (int iRxEntry = 0; iRxEntry != MAX_UDP_DESTINATION;
|
||||
++iRxEntry) {
|
||||
udpDetails[iRxEntry].srcmac = arg;
|
||||
// multicast (LSB of first octet = 1)
|
||||
if ((arg >> 40) & 0x1) {
|
||||
ret = FAIL;
|
||||
sprintf(mess,
|
||||
"Cannot set source mac address. Must be a unicast "
|
||||
"address (LSB of first octet should be 0).");
|
||||
LOG(logERROR, (mess));
|
||||
} else {
|
||||
for (int iRxEntry = 0; iRxEntry != MAX_UDP_DESTINATION;
|
||||
++iRxEntry) {
|
||||
udpDetails[iRxEntry].srcmac = arg;
|
||||
}
|
||||
configure_mac();
|
||||
}
|
||||
configure_mac();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,11 +4,10 @@
|
||||
#define RELEASE "7.0.0.rc1"
|
||||
#define APILIB "7.0.0.rc1 0x221208"
|
||||
#define APIRECEIVER "7.0.0.rc1 0x221208"
|
||||
#define APICTB "7.0.0.rc1 0x221212"
|
||||
#define APIGOTTHARD2 "7.0.0.rc1 0x221212"
|
||||
#define APIJUNGFRAU "7.0.0.rc1 0x221212"
|
||||
#define APIMOENCH "7.0.0.rc1 0x221212"
|
||||
#define APIEIGER "7.0.0.rc1 0x221212"
|
||||
#define APIGOTTHARD "7.0.0.rc2 0x221220"
|
||||
|
||||
#define APIMYTHEN3 "7.0.0.rc3 0x230130"
|
||||
#define APICTB "7.0.0.rc3 0x230130"
|
||||
#define APIGOTTHARD "7.0.0.rc3 0x230130"
|
||||
#define APIGOTTHARD2 "7.0.0.rc3 0x230130"
|
||||
#define APIJUNGFRAU "7.0.0.rc3 0x230130"
|
||||
#define APIMYTHEN3 "7.0.0.rc3 0x230130"
|
||||
#define APIMOENCH "7.0.0.rc3 0x230130"
|
||||
#define APIEIGER "7.0.0.rc3 0x230130"
|
||||
|
Loading…
x
Reference in New Issue
Block a user