mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 22:07:12 +02:00
wip, thread to start arping
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
#include "GeneralData.h"
|
||||
#include "Listener.h"
|
||||
#include "MasterAttributes.h"
|
||||
#include "ThreadArping.h"
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/ZmqSocket.h" //just for the zmq port define
|
||||
#include "sls/file_utils.h"
|
||||
@ -107,6 +108,10 @@ void Implementation::SetupFifoStructure() {
|
||||
* ************************************************/
|
||||
|
||||
void Implementation::setDetectorType(const detectorType d) {
|
||||
|
||||
// object to create threads to arping
|
||||
threadArping = sls::make_unique<ThreadArping>();
|
||||
|
||||
detType = d;
|
||||
switch (detType) {
|
||||
case GOTTHARD:
|
||||
@ -323,6 +328,20 @@ std::array<pid_t, NUM_RX_THREAD_IDS> Implementation::getThreadIds() const {
|
||||
return retval;
|
||||
}
|
||||
|
||||
bool Implementation::getArping() const { return threadArping->IsRunning(); }
|
||||
|
||||
void Implementation::setArping(const bool i) {
|
||||
if (i != threadArping->IsRunning()) {
|
||||
if (!i) {
|
||||
threadArping->StopRunning();
|
||||
} else {
|
||||
threadArping->ClearIpsAndInterfaces();
|
||||
threadArping->AddIpsAndInterfaces(eth[0], "10.0.0.1");
|
||||
threadArping->StartRunning();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
* File Parameters *
|
||||
|
Reference in New Issue
Block a user