Merge branch 'developer' into roundrobin

This commit is contained in:
2021-08-17 11:06:13 +02:00
47 changed files with 435 additions and 274 deletions

View File

@ -593,6 +593,7 @@ class CmdProxy {
{"vhighvoltage", "highvoltage"},
{"digitest", "imagetest"},
{"filter", "filterresistor"},
{"readnlines", "partialread"},
/** temperature */
@ -806,6 +807,7 @@ class CmdProxy {
{"filterresistor", &CmdProxy::filterresistor},
{"currentsource", &CmdProxy::CurrentSource},
{"dbitpipeline", &CmdProxy::dbitpipeline},
{"partialread", &CmdProxy::partialread},
/** temperature */
{"templist", &CmdProxy::templist},
@ -915,7 +917,6 @@ class CmdProxy {
{"subdeadtime", &CmdProxy::subdeadtime},
{"overflow", &CmdProxy::overflow},
{"ratecorr", &CmdProxy::RateCorrection},
{"readnlines", &CmdProxy::readnlines},
{"interruptsubframe", &CmdProxy::interruptsubframe},
{"measuredperiod", &CmdProxy::measuredperiod},
{"measuredsubperiod", &CmdProxy::measuredsubperiod},
@ -1372,6 +1373,12 @@ class CmdProxy {
"clock for latching digital bits.\n\t[Gotthard2] "
"Options: 0-7\n\t[CTB] Options: 0-255");
INTEGER_COMMAND_VEC_ID(
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.\n[8-512 (multiple of 8)]\n\t[Jungfrau] Number of rows per module starting from the centre. Options: 8 - 512, must be multiples of 8. Default is 512.");
/** temperature */
GET_COMMAND_NOID(
templist, getTemperatureList,
@ -1812,12 +1819,6 @@ class CmdProxy {
"[0, 1]\n\t[Eiger] Enable or disable show overflow flag in "
"32 bit mode. Default is disabled.");
INTEGER_COMMAND_VEC_ID(
readnlines, 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.");
INTEGER_COMMAND_VEC_ID(
interruptsubframe, getInterruptSubframe, setInterruptSubframe,
StringTo<int>,

View File

@ -732,6 +732,14 @@ void Detector::setDBITPipeline(int value, Positions pos) {
pimpl->Parallel(&Module::setDBITPipeline, pos, value);
}
Result<int> Detector::getPartialReadout(Positions pos) const {
return pimpl->Parallel(&Module::getPartialReadout, pos);
}
void Detector::setPartialReadout(const int lines, Positions pos) {
pimpl->Parallel(&Module::setPartialReadout, pos, lines);
}
// Acquisition
void Detector::acquire() { pimpl->acquire(); }
@ -839,13 +847,14 @@ void Detector::setNumberofUDPInterfaces_(int n, Positions pos) {
bool previouslyClientStreaming = pimpl->getDataStreamingToClient();
bool useReceiver = getUseReceiverFlag().squash(false);
bool previouslyReceiverStreaming = false;
int startingPort = 0;
if (useReceiver) {
previouslyReceiverStreaming = getRxZmqDataStream(pos).squash(true);
startingPort = getRxZmqPort({0}).squash(0);
}
pimpl->Parallel(&Module::setNumberofUDPInterfaces, pos, n);
// ensure receiver zmq socket ports are multiplied by 2 (2 interfaces)
if (getUseReceiverFlag().squash(false) && size()) {
int startingPort = getRxZmqPort({0}).squash(0);
setRxZmqPort(startingPort, -1);
}
// redo the zmq sockets if enabled
@ -1385,14 +1394,6 @@ void Detector::updateRxRateCorrections() {
}
}
Result<int> Detector::getPartialReadout(Positions pos) const {
return pimpl->Parallel(&Module::getReadNLines, pos);
}
void Detector::setPartialReadout(const int lines, Positions pos) {
pimpl->Parallel(&Module::setReadNLines, pos, lines);
}
Result<bool> Detector::getInterruptSubframe(Positions pos) const {
return pimpl->Parallel(&Module::getInterruptSubframe, pos);
}

View File

@ -734,6 +734,17 @@ void Module::setDBITPipeline(int value) {
sendToDetector(F_SET_DBIT_PIPELINE, value, nullptr);
}
int Module::getPartialReadout() const {
return sendToDetector<int>(F_GET_PARTIAL_READOUT);
}
void Module::setPartialReadout(const int value) {
sendToDetector(F_SET_PARTIAL_READOUT, value, nullptr);
if (shm()->useReceiverFlag) {
sendToReceiver(F_SET_RECEIVER_PARTIAL_READOUT, value, nullptr);
}
}
// Acquisition
void Module::startReceiver() {
@ -1487,17 +1498,6 @@ void Module::sendReceiverRateCorrections(const std::vector<int64_t> &t) {
}
}
int Module::getReadNLines() const {
return sendToDetector<int>(F_GET_READ_N_LINES);
}
void Module::setReadNLines(const int value) {
sendToDetector(F_SET_READ_N_LINES, value, nullptr);
if (shm()->useReceiverFlag) {
sendToReceiver(F_SET_RECEIVER_READ_N_LINES, value, nullptr);
}
}
bool Module::getInterruptSubframe() const {
return sendToDetector<int>(F_GET_INTERRUPT_SUBFRAME);
}

View File

@ -178,7 +178,8 @@ class Module : public virtual slsDetectorDefs {
void setCurrentSource(defs::currentSrcParameters par);
int getDBITPipeline() const;
void setDBITPipeline(int value);
int getPartialReadout() const;
void setPartialReadout(const int value);
/**************************************************
* *
* Acquisition *
@ -339,8 +340,6 @@ 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);
bool getInterruptSubframe() const;
void setInterruptSubframe(const bool enable);
int64_t getMeasuredPeriod() const;