M3readout (#209)

* m3: readout command
This commit is contained in:
Dhanya Thattil
2020-10-26 16:13:48 +01:00
committed by GitHub
parent 91ad7b0594
commit 47018b61cd
14 changed files with 106 additions and 7 deletions

View File

@ -835,6 +835,7 @@ class CmdProxy {
{"rx_start", &CmdProxy::rx_start},
{"rx_stop", &CmdProxy::rx_stop},
{"start", &CmdProxy::start},
{"readout", &CmdProxy::readout},
{"stop", &CmdProxy::stop},
{"rx_status", &CmdProxy::ReceiverStatus},
{"status", &CmdProxy::DetectorStatus},
@ -1429,7 +1430,14 @@ class CmdProxy {
EXECUTE_SET_COMMAND_NOID(
start, startDetector,
"\n\tStarts detector acquisition. Status changes to RUNNING or WAITING "
"and automatically returns to idle at the end of acquisition.");
"and automatically returns to idle at the end of acquisition. If the "
"acquisition was abruptly stopped, some detectors come back to "
"STOPPED.");
EXECUTE_SET_COMMAND_NOID(
readout, startDetectorReadout,
"\n\t[Mythen3] Starts detector readout. Status changes to TRANSMITTING "
"and automatically returns to idle at the end of readout.");
EXECUTE_SET_COMMAND_NOID(stop, stopDetector,
"\n\tAbort detector acquisition. Status changes "

View File

@ -593,6 +593,10 @@ void Detector::startDetector() {
pimpl->Parallel(&Module::startAcquisition, {});
}
void Detector::startDetectorReadout() {
pimpl->Parallel(&Module::startReadout, {});
}
void Detector::stopDetector() { pimpl->Parallel(&Module::stopAcquisition, {}); }
Result<defs::runStatus> Detector::getDetectorStatus(Positions pos) const {

View File

@ -407,6 +407,11 @@ void Module::startAcquisition() {
sendToDetector(F_START_ACQUISITION);
}
void Module::startReadout() {
shm()->stoppedFlag = false;
sendToDetector(F_START_READOUT);
}
void Module::stopAcquisition() {
// get status before stopping acquisition
runStatus s = ERROR, r = ERROR;

View File

@ -160,6 +160,7 @@ class Module : public virtual slsDetectorDefs {
void startReceiver();
void stopReceiver();
void startAcquisition();
void startReadout();
void stopAcquisition();
void restreamStopFromReceiver();
void startAndReadAll();