readnlines->partialread, better debugging for TCP socket interface bug

This commit is contained in:
2021-08-13 12:34:50 +02:00
parent eb652557b6
commit 62d697e91f
35 changed files with 131 additions and 119 deletions

View File

@ -716,6 +716,7 @@ class CmdProxy {
{"rx_datastream", "rx_zmqstream"},
/* Eiger Specific */
{"readnlines", "partialread"},
{"resmat", "partialreset"},
/* Jungfrau Specific */
@ -914,7 +915,7 @@ class CmdProxy {
{"subdeadtime", &CmdProxy::subdeadtime},
{"overflow", &CmdProxy::overflow},
{"ratecorr", &CmdProxy::RateCorrection},
{"readnlines", &CmdProxy::readnlines},
{"partialread", &CmdProxy::partialread},
{"interruptsubframe", &CmdProxy::interruptsubframe},
{"measuredperiod", &CmdProxy::measuredperiod},
{"measuredsubperiod", &CmdProxy::measuredsubperiod},
@ -1809,7 +1810,7 @@ class CmdProxy {
"32 bit mode. Default is disabled.");
INTEGER_COMMAND_VEC_ID(
readnlines, getPartialReadout, setPartialReadout, StringTo<int>,
partialread, getPartialReadout, setPartialReadout, StringTo<int>,
"[1 - 256]\n\t[Eiger] Number of rows to readout per half module "
"starting from the centre. Options: 0 - 256. 256 is default. The "
"permissible values depend on dynamic range and 10Gbe enabled.");

View File

@ -1373,11 +1373,11 @@ void Detector::updateRxRateCorrections() {
}
Result<int> Detector::getPartialReadout(Positions pos) const {
return pimpl->Parallel(&Module::getReadNLines, pos);
return pimpl->Parallel(&Module::getPartialReadout, pos);
}
void Detector::setPartialReadout(const int lines, Positions pos) {
pimpl->Parallel(&Module::setReadNLines, pos, lines);
pimpl->Parallel(&Module::setPartialReadout, pos, lines);
}
Result<bool> Detector::getInterruptSubframe(Positions pos) const {

View File

@ -1469,14 +1469,14 @@ void Module::sendReceiverRateCorrections(const std::vector<int64_t> &t) {
}
}
int Module::getReadNLines() const {
return sendToDetector<int>(F_GET_READ_N_LINES);
int Module::getPartialReadout() const {
return sendToDetector<int>(F_GET_PARTIAL_READOUT);
}
void Module::setReadNLines(const int value) {
sendToDetector(F_SET_READ_N_LINES, value, nullptr);
void Module::setPartialReadout(const int value) {
sendToDetector(F_SET_PARTIAL_READOUT, value, nullptr);
if (shm()->useReceiverFlag) {
sendToReceiver(F_SET_RECEIVER_READ_N_LINES, value, nullptr);
sendToReceiver(F_SET_RECEIVER_PARTIAL_READOUT, value, nullptr);
}
}

View File

@ -337,8 +337,8 @@ class Module : public virtual slsDetectorDefs {
void setDefaultRateCorrection();
void setRateCorrection(int64_t t = 0);
void sendReceiverRateCorrections(const std::vector<int64_t> &t);
int getReadNLines() const;
void setReadNLines(const int value);
int getPartialReadout() const;
void setPartialReadout(const int value);
bool getInterruptSubframe() const;
void setInterruptSubframe(const bool enable);
int64_t getMeasuredPeriod() const;