mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 05:47:14 +02:00
rx_arping for 10g mode (#359)
* test for rx_arping * arping ip and interface from client interface * apring thread added to thread ids * clean code for thread for arping * removing the assumption that udpip1 fill be updated along with udpip2 * review, replacing syscall(sys_gettid) with gettid()
This commit is contained in:
@ -107,6 +107,7 @@ void Implementation::SetupFifoStructure() {
|
||||
* ************************************************/
|
||||
|
||||
void Implementation::setDetectorType(const detectorType d) {
|
||||
|
||||
detType = d;
|
||||
switch (detType) {
|
||||
case GOTTHARD:
|
||||
@ -320,9 +321,33 @@ std::array<pid_t, NUM_RX_THREAD_IDS> Implementation::getThreadIds() const {
|
||||
retval[id++] = 0;
|
||||
}
|
||||
}
|
||||
retval[NUM_RX_THREAD_IDS - 1] = arping.GetThreadId();
|
||||
return retval;
|
||||
}
|
||||
|
||||
bool Implementation::getArping() const { return arping.IsRunning(); }
|
||||
|
||||
pid_t Implementation::getArpingThreadId() const { return arping.GetThreadId(); }
|
||||
|
||||
void Implementation::setArping(const bool i,
|
||||
const std::vector<std::string> ips) {
|
||||
if (i != arping.IsRunning()) {
|
||||
if (!i) {
|
||||
arping.StopThread();
|
||||
} else {
|
||||
// setup interface
|
||||
for (int i = 0; i != numUDPInterfaces; ++i) {
|
||||
// ignore eiger with 2 interfaces (only udp port)
|
||||
if (i == 1 && (numUDPInterfaces == 1 || detType == EIGER)) {
|
||||
break;
|
||||
}
|
||||
arping.SetInterfacesAndIps(i, eth[i], ips[i]);
|
||||
}
|
||||
arping.StartThread();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
* File Parameters *
|
||||
|
Reference in New Issue
Block a user