added drlist and timinglist, moved daclist and settingslist from cmdprozy.cpp to .h

This commit is contained in:
2020-08-14 15:47:19 +02:00
parent de69e666a9
commit d4e11e56ea
5 changed files with 85 additions and 43 deletions

View File

@ -285,6 +285,17 @@ void Detector::setDynamicRange(int value) {
updateRxRateCorrections();
}
std::vector<int> Detector::getDynamicRangeList() const {
switch (getDetectorType().squash()) {
case defs::EIGER:
return std::vector<int>{4, 8, 16, 32};
case defs::MYTHEN3:
return std::vector<int>{8, 16, 32};
default:
return std::vector<int>{16};
}
}
Result<defs::timingMode> Detector::getTimingMode(Positions pos) const {
return pimpl->Parallel(&Module::getTimingMode, pos);
}
@ -293,6 +304,22 @@ void Detector::setTimingMode(defs::timingMode value, Positions pos) {
pimpl->Parallel(&Module::setTimingMode, pos, value);
}
std::vector<defs::timingMode> Detector::getTimingModeList() const {
switch (getDetectorType().squash()) {
case defs::EIGER:
return std::vector<defs::timingMode>{defs::AUTO_TIMING,
defs::TRIGGER_EXPOSURE,
defs::GATED, defs::BURST_TRIGGER};
case defs::MYTHEN3:
return std::vector<defs::timingMode>{defs::AUTO_TIMING,
defs::TRIGGER_EXPOSURE,
defs::GATED, defs::TRIGGER_GATED};
default:
return std::vector<defs::timingMode>{defs::AUTO_TIMING,
defs::TRIGGER_EXPOSURE};
}
}
Result<defs::speedLevel> Detector::getSpeed(Positions pos) const {
auto res = pimpl->Parallel(&Module::getClockDivider, pos, defs::RUN_CLOCK);
Result<defs::speedLevel> speedResult(res.size());