added top

This commit is contained in:
2022-02-28 17:05:24 +01:00
parent b6d63a8381
commit 34588356e8
18 changed files with 166 additions and 1 deletions

View File

@ -943,6 +943,7 @@ class CmdProxy {
{"pulsechip", &CmdProxy::PulseChip},
{"quad", &CmdProxy::Quad},
{"datastream", &CmdProxy::DataStream},
{"top", &CmdProxy::top},
/* Jungfrau Specific */
{"chipversion", &CmdProxy::chipversion},
@ -1908,6 +1909,11 @@ class CmdProxy {
"start of acquisition. 0 complete reset, 1 partial reset. Default is "
"complete reset. Advanced function!");
INTEGER_COMMAND_VEC_ID(
top, getTop, setTop, StringTo<int>,
"[0, 1]\n\t[Eiger] Sets half module to top (1), else bottom.");
/* Jungfrau Specific */
GET_COMMAND(chipversion, getChipVersion,

View File

@ -1505,6 +1505,14 @@ void Detector::setDataStream(const defs::portPosition port, const bool enable,
pimpl->Parallel(&Module::setDataStream, pos, port, enable);
}
Result<bool> Detector::getTop(Positions pos) const {
return pimpl->Parallel(&Module::getTop, pos);
}
void Detector::setTop(bool value, Positions pos) {
pimpl->Parallel(&Module::setTop, pos, value);
}
// Jungfrau Specific
Result<double> Detector::getChipVersion(Positions pos) const {
return pimpl->Parallel(&Module::getChipVersion, pos);

View File

@ -1679,6 +1679,15 @@ void Module::setDataStream(const portPosition port, const bool enable) {
}
}
bool Module::getTop() const {
return (
!static_cast<bool>(sendToDetector<int>(F_GET_TOP)));
}
void Module::setTop(bool value) {
sendToDetector<int>(F_SET_TOP, static_cast<int>(value));
}
// Jungfrau Specific
double Module::getChipVersion() const {
return (sendToDetector<int>(F_GET_CHIP_VERSION)) / 10.00;

View File

@ -369,6 +369,8 @@ class Module : public virtual slsDetectorDefs {
void setQuad(const bool enable);
bool getDataStream(const portPosition port) const;
void setDataStream(const portPosition port, const bool enable);
bool getTop() const;
void setTop(bool value);
/**************************************************
* *