mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 14:38:14 +02:00
apring thread added to thread ids
This commit is contained in:
parent
bf83c9b3e2
commit
2a63548f40
@ -29,6 +29,7 @@ This document describes the differences between v6.1.0 and v6.0.0.
|
||||
- moench and ctb - can set the starting frame number of next acquisition
|
||||
- mythen server kernel check incompatible (cet timezone)
|
||||
- rx_arping
|
||||
- rx_threadsids max is now 9 (breaking api)
|
||||
|
||||
|
||||
2. Resolved Issues
|
||||
|
@ -258,7 +258,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def rx_threads(self):
|
||||
"""
|
||||
Get thread ids from the receiver in order of [parent, tcp, listener 0, processor 0, streamer 0, listener 1, processor 1, streamer 1].
|
||||
Get thread ids from the receiver in order of [parent, tcp, listener 0, processor 0, streamer 0, listener 1, processor 1, streamer 1, arping].
|
||||
|
||||
Note
|
||||
-----
|
||||
@ -268,6 +268,17 @@ class Detector(CppDetectorApi):
|
||||
"""
|
||||
return self.getRxThreadIds()
|
||||
|
||||
@property
|
||||
@element
|
||||
def rx_arping(self):
|
||||
"""Starts a thread in slsReceiver to ping the interface it is listening every minute. Useful in 10G mode. """
|
||||
return self.getRxArping()
|
||||
|
||||
@rx_arping.setter
|
||||
def rx_arping(self, value):
|
||||
ut.set_using_dict(self.setRxArping, value)
|
||||
|
||||
|
||||
@property
|
||||
@element
|
||||
def dr(self):
|
||||
|
@ -768,6 +768,13 @@ void init_det(py::module &m) {
|
||||
(Result<std::array<pid_t, 8>>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getRxThreadIds,
|
||||
py::arg() = Positions{})
|
||||
.def("getRxArping",
|
||||
(Result<bool>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getRxArping,
|
||||
py::arg() = Positions{})
|
||||
.def("setRxArping",
|
||||
(void (Detector::*)(bool, sls::Positions)) & Detector::setRxArping,
|
||||
py::arg(), py::arg() = Positions{})
|
||||
.def("getFileFormat",
|
||||
(Result<defs::fileFormat>(Detector::*)(sls::Positions) const) &
|
||||
Detector::getFileFormat,
|
||||
|
@ -878,15 +878,16 @@ class Detector {
|
||||
Result<sls::IpAddr> getRxLastClientIP(Positions pos = {}) const;
|
||||
|
||||
/** Get thread ids from the receiver in order of [parent, tcp, listener 0,
|
||||
* processor 0, streamer 0, listener 1, processor 1, streamer 1]. If no
|
||||
* streamer yet or there is no second interface, it gives 0 in its place. */
|
||||
* processor 0, streamer 0, listener 1, processor 1, streamer 1, arping]. If
|
||||
* no 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. */
|
||||
/** Starts a thread in slsReceiver to ping the interface it is listening
|
||||
* every minute. Useful in 10G mode. */
|
||||
void setRxArping(bool value, Positions pos = {});
|
||||
|
||||
///@}
|
||||
|
@ -1739,18 +1739,16 @@ class CmdProxy {
|
||||
rx_lastclient, getRxLastClientIP,
|
||||
"\n\tClient IP Address that last communicated with the receiver.");
|
||||
|
||||
GET_COMMAND(
|
||||
rx_threads, getRxThreadIds,
|
||||
"\n\tGet thread ids from the receiver in order of [parent, tcp, "
|
||||
"listener 0, "
|
||||
"processor 0, streamer 0, listener 1, processor 1, streamer 1]. If no "
|
||||
"streamer yet or there is no second interface, it gives 0 in its "
|
||||
"place.");
|
||||
GET_COMMAND(rx_threads, getRxThreadIds,
|
||||
"\n\tGet thread ids from the receiver in order of [parent, "
|
||||
"tcp, listener 0, processor 0, streamer 0, listener 1, "
|
||||
"processor 1, streamer 1, arping]. If no 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.");
|
||||
"listening to every minute. Useful in 10G mode.");
|
||||
|
||||
/* File */
|
||||
|
||||
|
@ -325,6 +325,9 @@ std::array<pid_t, NUM_RX_THREAD_IDS> Implementation::getThreadIds() const {
|
||||
retval[id++] = 0;
|
||||
}
|
||||
}
|
||||
if (threadArping->IsRunning()) {
|
||||
retval[NUM_RX_THREAD_IDS - 1] = threadArping->GetThreadId();
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
||||
|
||||
#define DEFAULT_STREAMING_TIMER_IN_MS 500
|
||||
|
||||
#define NUM_RX_THREAD_IDS 8
|
||||
#define NUM_RX_THREAD_IDS 9
|
||||
|
||||
#ifdef __cplusplus
|
||||
class slsDetectorDefs {
|
||||
|
Loading…
x
Reference in New Issue
Block a user