Jungfrausync (#519)

* jungfrau sync
This commit is contained in:
Dhanya Thattil
2022-08-23 10:29:16 +02:00
committed by GitHub
parent da16c1101c
commit 4638bf7cf8
16 changed files with 158 additions and 4 deletions

View File

@ -787,6 +787,7 @@ class CmdProxy {
{"gappixels", &CmdProxy::GapPixels},
{"fliprows", &CmdProxy::fliprows},
{"master", &CmdProxy::master},
{"sync", &CmdProxy::sync},
/* acquisition parameters */
{"acquire", &CmdProxy::Acquire},
@ -1303,6 +1304,11 @@ class CmdProxy {
"slaves.\n\t[Gotthard][Gotthard2][Mythen3][Eiger][Jungfrau] Gets if "
"the current (half) module is master.");
INTEGER_COMMAND_SET_NOID_GET_ID(sync, getSynchronization,
setSynchronization, StringTo<int>,
"[0, 1]\n\t[Jungfrau] Enables or disables "
"synchronization between modules.");
/* acquisition parameters */
INTEGER_COMMAND_SET_NOID_GET_ID(

View File

@ -325,6 +325,14 @@ void Detector::setMaster(bool master, int pos) {
}
}
Result<bool> Detector::getSynchronization(Positions pos) const {
return pimpl->Parallel(&Module::getSynchronization, pos);
}
void Detector::setSynchronization(bool value) {
pimpl->Parallel(&Module::setSynchronization, {}, value);
}
Result<bool> Detector::isVirtualDetectorServer(Positions pos) const {
return pimpl->Parallel(&Module::isVirtualDetectorServer, pos);
}

View File

@ -490,6 +490,14 @@ void Module::setMaster(const bool master) {
sendToDetectorStop(F_SET_MASTER, static_cast<int>(master), nullptr);
}
bool Module::getSynchronization() const {
return sendToDetector<int>(F_GET_SYNCHRONIZATION);
}
void Module::setSynchronization(const bool value) {
sendToDetector(F_SET_SYNCHRONIZATION, static_cast<int>(value), nullptr);
}
bool Module::isVirtualDetectorServer() const {
return sendToDetector<int>(F_IS_VIRTUAL);
}

View File

@ -123,6 +123,8 @@ class Module : public virtual slsDetectorDefs {
void setFlipRows(bool value);
bool isMaster() const;
void setMaster(const bool master);
bool getSynchronization() const;
void setSynchronization(const bool value);
bool isVirtualDetectorServer() const;