mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 16:27:13 +02:00
Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya
This commit is contained in:
@ -51,11 +51,6 @@ Result<uint32_t> Detector::getRegister(uint32_t addr, Positions pos) {
|
||||
return pimpl->Parallel(&slsDetector::readRegister, pos, addr);
|
||||
}
|
||||
|
||||
Result<ns> Detector::getExptime(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos, defs::ACQUISITION_TIME,
|
||||
-1);
|
||||
}
|
||||
|
||||
Result<uint64_t> Detector::getStartingFrameNumber(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getStartingFrameNumber, pos);
|
||||
}
|
||||
@ -63,29 +58,6 @@ void Detector::setStartingFrameNumber(uint64_t value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setStartingFrameNumber, pos, value);
|
||||
}
|
||||
|
||||
void Detector::setExptime(ns t, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, pos, defs::ACQUISITION_TIME,
|
||||
t.count());
|
||||
}
|
||||
|
||||
Result<ns> Detector::getSubExptime(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos,
|
||||
defs::SUBFRAME_ACQUISITION_TIME, -1);
|
||||
}
|
||||
|
||||
void Detector::setSubExptime(ns t, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, pos,
|
||||
defs::SUBFRAME_ACQUISITION_TIME, t.count());
|
||||
}
|
||||
|
||||
Result<ns> Detector::getPeriod(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos, defs::FRAME_PERIOD, -1);
|
||||
}
|
||||
|
||||
void Detector::setPeriod(ns t, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, pos, defs::FRAME_PERIOD, t.count());
|
||||
}
|
||||
|
||||
// File
|
||||
void Detector::setFileName(const std::string &fname, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setFileName, pos, fname);
|
||||
@ -170,8 +142,8 @@ Result<std::string> Detector::getDetectorTypeAsString(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getDetectorTypeAsString, pos);
|
||||
}
|
||||
|
||||
int Detector::getTotalNumberOfDetectors() const {
|
||||
return pimpl->getNumberOfDetectors();
|
||||
int Detector::size() const {
|
||||
return pimpl->size();
|
||||
}
|
||||
|
||||
defs::coordinates Detector::getNumberOfDetectors() const {
|
||||
@ -393,6 +365,24 @@ void Detector::setNumberOfDigitalSamples(int64_t value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, pos, defs::DIGITAL_SAMPLES, value);
|
||||
}
|
||||
|
||||
Result<ns> Detector::getExptime(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos, defs::ACQUISITION_TIME,
|
||||
-1);
|
||||
}
|
||||
|
||||
void Detector::setExptime(ns t, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, pos, defs::ACQUISITION_TIME,
|
||||
t.count());
|
||||
}
|
||||
|
||||
Result<ns> Detector::getPeriod(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos, defs::FRAME_PERIOD, -1);
|
||||
}
|
||||
|
||||
void Detector::setPeriod(ns t, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, pos, defs::FRAME_PERIOD, t.count());
|
||||
}
|
||||
|
||||
Result<ns> Detector::getDelayAfterTrigger(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos,
|
||||
defs::DELAY_AFTER_TRIGGER, -1);
|
||||
@ -403,12 +393,22 @@ void Detector::setDelayAfterTrigger(ns value, Positions pos) {
|
||||
value.count());
|
||||
}
|
||||
|
||||
Result<ns> Detector::getSubFrameDeadTime(Positions pos) const {
|
||||
Result<ns> Detector::getSubExptime(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos,
|
||||
defs::SUBFRAME_ACQUISITION_TIME, -1);
|
||||
}
|
||||
|
||||
void Detector::setSubExptime(ns t, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, pos,
|
||||
defs::SUBFRAME_ACQUISITION_TIME, t.count());
|
||||
}
|
||||
|
||||
Result<ns> Detector::getSubDeadTime(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos, defs::SUBFRAME_DEADTIME,
|
||||
-1);
|
||||
}
|
||||
|
||||
void Detector::setSubFrameDeadTime(ns value, Positions pos) {
|
||||
void Detector::setSubDeadTime(ns value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, pos, defs::SUBFRAME_DEADTIME,
|
||||
value.count());
|
||||
}
|
||||
@ -423,6 +423,46 @@ void Detector::setStorageCellDelay(ns value, Positions pos) {
|
||||
value.count());
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getNumberOfFramesLeft(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getTimeLeft, pos, defs::FRAME_NUMBER);
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getNumberOfCyclesLeft(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getTimeLeft, pos, defs::CYCLES_NUMBER);
|
||||
}
|
||||
|
||||
Result<ns> Detector::getExptimeLeft(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getTimeLeft, pos, defs::ACQUISITION_TIME);
|
||||
}
|
||||
|
||||
Result<ns> Detector::getPeriodLeft(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getTimeLeft, pos, defs::FRAME_PERIOD);
|
||||
}
|
||||
|
||||
Result<ns> Detector::getDelayAfterTriggerLeft(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getTimeLeft, pos, defs::DELAY_AFTER_TRIGGER);
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getNumberOfFramesFromStart(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getTimeLeft, pos, defs::FRAMES_FROM_START);
|
||||
}
|
||||
|
||||
Result<ns> Detector::getActualTime(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getTimeLeft, pos, defs::ACTUAL_TIME);
|
||||
}
|
||||
|
||||
Result<ns> Detector::getMeasurementTime(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getTimeLeft, pos, defs::MEASUREMENT_TIME);
|
||||
}
|
||||
|
||||
Result<ns> Detector::getMeasuredPeriod(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getTimeLeft, pos, defs::MEASURED_PERIOD);
|
||||
};
|
||||
|
||||
Result<ns> Detector::getMeasuredSubFramePeriod(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getTimeLeft, pos, defs::MEASURED_SUBPERIOD);
|
||||
};
|
||||
|
||||
// Erik
|
||||
Result<int> Detector::getFramesCaughtByReceiver(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getFramesCaughtByReceiver, pos);
|
||||
@ -635,8 +675,8 @@ Result<bool> Detector::getAutoCompDisable(Positions pos) const {
|
||||
}
|
||||
|
||||
void Detector::setPowerChip(bool on, Positions pos) {
|
||||
if (on && pimpl->getNumberOfDetectors() > 3) {
|
||||
for (int i = 0; i != pimpl->getNumberOfDetectors(); ++i) {
|
||||
if (on && pimpl->size() > 3) {
|
||||
for (int i = 0; i != pimpl->size(); ++i) {
|
||||
pimpl->powerChip(static_cast<int>(on), i);
|
||||
usleep(1000 * 1000);
|
||||
}
|
||||
|
Reference in New Issue
Block a user