mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
wip, thread to start arping
This commit is contained in:
@ -882,6 +882,13 @@ class Detector {
|
||||
* streamer yet or there is no second interface, it gives 0 in its place. */
|
||||
Result<std::array<pid_t, NUM_RX_THREAD_IDS>>
|
||||
getRxThreadIds(Positions pos = {}) const;
|
||||
|
||||
Result<bool> getRxArping(Positions pos = {}) const;
|
||||
|
||||
/** Starts a thread in slsReceiver to ping the interface it is listening.
|
||||
* Useful in 10G mode. */
|
||||
void setRxArping(bool value, Positions pos = {});
|
||||
|
||||
///@}
|
||||
|
||||
/** @name File */
|
||||
|
@ -903,6 +903,7 @@ class CmdProxy {
|
||||
{"rx_lock", &CmdProxy::rx_lock},
|
||||
{"rx_lastclient", &CmdProxy::rx_lastclient},
|
||||
{"rx_threads", &CmdProxy::rx_threads},
|
||||
{"rx_arping", &CmdProxy::rx_arping},
|
||||
|
||||
/* File */
|
||||
{"fformat", &CmdProxy::fformat},
|
||||
@ -1746,6 +1747,11 @@ class CmdProxy {
|
||||
"streamer yet or there is no second interface, it gives 0 in its "
|
||||
"place.");
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
rx_arping, getRxArping, setRxArping, StringTo<int>,
|
||||
"[0, 1]\n\tStarts a thread in slsReceiver to ping the interface it is "
|
||||
"listening to. Useful in 10G mode.");
|
||||
|
||||
/* File */
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
|
@ -1170,6 +1170,14 @@ Detector::getRxThreadIds(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getReceiverThreadIds, pos);
|
||||
}
|
||||
|
||||
Result<bool> Detector::getRxArping(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getRxArping, pos);
|
||||
}
|
||||
|
||||
void Detector::setRxArping(bool value, Positions pos) {
|
||||
pimpl->Parallel(&Module::setRxArping, pos, value);
|
||||
}
|
||||
|
||||
// File
|
||||
|
||||
Result<defs::fileFormat> Detector::getFileFormat(Positions pos) const {
|
||||
|
@ -1318,6 +1318,14 @@ std::array<pid_t, NUM_RX_THREAD_IDS> Module::getReceiverThreadIds() const {
|
||||
F_GET_RECEIVER_THREAD_IDS);
|
||||
}
|
||||
|
||||
bool Module::getRxArping() const {
|
||||
return sendToReceiver<int>(F_GET_RECEIVER_ARPING);
|
||||
}
|
||||
|
||||
void Module::setRxArping(bool enable) {
|
||||
sendToReceiver(F_SET_RECEIVER_ARPING, static_cast<int>(enable), nullptr);
|
||||
}
|
||||
|
||||
// File
|
||||
slsDetectorDefs::fileFormat Module::getFileFormat() const {
|
||||
return sendToReceiver<fileFormat>(F_GET_RECEIVER_FILE_FORMAT);
|
||||
|
@ -283,6 +283,8 @@ class Module : public virtual slsDetectorDefs {
|
||||
void setReceiverLock(bool lock);
|
||||
sls::IpAddr getReceiverLastClientIP() const;
|
||||
std::array<pid_t, NUM_RX_THREAD_IDS> getReceiverThreadIds() const;
|
||||
bool getRxArping() const;
|
||||
void setRxArping(bool enable);
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
|
Reference in New Issue
Block a user