mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 04:47:14 +02:00
rxr: udp socket size max of INT_MAX/2 (#191)
This commit is contained in:
@ -717,17 +717,17 @@ class Detector {
|
||||
/** Default: padding enabled. Disabling padding is the fastest */
|
||||
void setPartialFramesPadding(bool value, Positions pos = {});
|
||||
|
||||
Result<int64_t> getRxUDPSocketBufferSize(Positions pos = {}) const;
|
||||
Result<int> getRxUDPSocketBufferSize(Positions pos = {}) const;
|
||||
|
||||
/** UDP socket buffer size in receiver. Tune rmem_default and rmem_max
|
||||
* accordingly */
|
||||
void setRxUDPSocketBufferSize(int64_t udpsockbufsize, Positions pos = {});
|
||||
* accordingly. Max value is INT_MAX/2. */
|
||||
void setRxUDPSocketBufferSize(int udpsockbufsize, Positions pos = {});
|
||||
|
||||
/** TODO:
|
||||
* Gets actual udp socket buffer size. Double the size of rx_udpsocksize due
|
||||
* to kernel bookkeeping.
|
||||
*/
|
||||
Result<int64_t> getRxRealUDPSocketBufferSize(Positions pos = {}) const;
|
||||
Result<int> getRxRealUDPSocketBufferSize(Positions pos = {}) const;
|
||||
|
||||
Result<bool> getRxLock(Positions pos = {});
|
||||
|
||||
|
@ -1568,9 +1568,9 @@ class CmdProxy {
|
||||
|
||||
INTEGER_COMMAND_VEC_ID(
|
||||
rx_udpsocksize, getRxUDPSocketBufferSize, setRxUDPSocketBufferSize,
|
||||
StringTo<int64_t>,
|
||||
StringTo<int>,
|
||||
"[n_size]\n\tUDP socket buffer size in receiver. Tune rmem_default and "
|
||||
"rmem_max accordingly.");
|
||||
"rmem_max accordingly. Max value is INT_MAX/2.");
|
||||
|
||||
GET_COMMAND(rx_realudpsocksize, getRxRealUDPSocketBufferSize,
|
||||
"\n\tActual udp socket buffer size. Double the size of "
|
||||
|
@ -907,16 +907,16 @@ void Detector::setPartialFramesPadding(bool value, Positions pos) {
|
||||
pimpl->Parallel(&Module::setPartialFramesPadding, pos, value);
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getRxUDPSocketBufferSize(Positions pos) const {
|
||||
Result<int> Detector::getRxUDPSocketBufferSize(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getReceiverUDPSocketBufferSize, pos);
|
||||
}
|
||||
|
||||
void Detector::setRxUDPSocketBufferSize(int64_t udpsockbufsize, Positions pos) {
|
||||
void Detector::setRxUDPSocketBufferSize(int udpsockbufsize, Positions pos) {
|
||||
pimpl->Parallel(&Module::setReceiverUDPSocketBufferSize, pos,
|
||||
udpsockbufsize);
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getRxRealUDPSocketBufferSize(Positions pos) const {
|
||||
Result<int> Detector::getRxRealUDPSocketBufferSize(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getReceiverRealUDPSocketBufferSize, pos);
|
||||
}
|
||||
|
||||
|
@ -844,17 +844,17 @@ void Module::setPartialFramesPadding(bool padding) {
|
||||
sendToReceiver(F_SET_RECEIVER_PADDING, static_cast<int>(padding), nullptr);
|
||||
}
|
||||
|
||||
int64_t Module::getReceiverUDPSocketBufferSize() const {
|
||||
int64_t arg = GET_FLAG;
|
||||
return sendToReceiver<int64_t>(F_RECEIVER_UDP_SOCK_BUF_SIZE, arg);
|
||||
int Module::getReceiverUDPSocketBufferSize() const {
|
||||
int arg = GET_FLAG;
|
||||
return sendToReceiver<int>(F_RECEIVER_UDP_SOCK_BUF_SIZE, arg);
|
||||
}
|
||||
|
||||
int64_t Module::getReceiverRealUDPSocketBufferSize() const {
|
||||
return sendToReceiver<int64_t>(F_RECEIVER_REAL_UDP_SOCK_BUF_SIZE);
|
||||
int Module::getReceiverRealUDPSocketBufferSize() const {
|
||||
return sendToReceiver<int>(F_RECEIVER_REAL_UDP_SOCK_BUF_SIZE);
|
||||
}
|
||||
|
||||
void Module::setReceiverUDPSocketBufferSize(int64_t udpsockbufsize) {
|
||||
sendToReceiver<int64_t>(F_RECEIVER_UDP_SOCK_BUF_SIZE, udpsockbufsize);
|
||||
void Module::setReceiverUDPSocketBufferSize(int udpsockbufsize) {
|
||||
sendToReceiver<int>(F_RECEIVER_UDP_SOCK_BUF_SIZE, udpsockbufsize);
|
||||
}
|
||||
|
||||
bool Module::getReceiverLock() const {
|
||||
|
@ -236,9 +236,9 @@ class Module : public virtual slsDetectorDefs {
|
||||
void setReceiverFramesDiscardPolicy(frameDiscardPolicy f);
|
||||
bool getPartialFramesPadding() const;
|
||||
void setPartialFramesPadding(bool padding);
|
||||
int64_t getReceiverUDPSocketBufferSize() const;
|
||||
int64_t getReceiverRealUDPSocketBufferSize() const;
|
||||
void setReceiverUDPSocketBufferSize(int64_t udpsockbufsize);
|
||||
int getReceiverUDPSocketBufferSize() const;
|
||||
int getReceiverRealUDPSocketBufferSize() const;
|
||||
void setReceiverUDPSocketBufferSize(int udpsockbufsize);
|
||||
bool getReceiverLock() const;
|
||||
void setReceiverLock(bool lock);
|
||||
sls::IpAddr getReceiverLastClientIP() const;
|
||||
|
Reference in New Issue
Block a user