gotthard2: timingsource and currentsource features, (timing source external yet to be implemented in fpga to test (#80)

This commit is contained in:
Dhanya Thattil
2020-02-28 12:45:02 +01:00
committed by GitHub
parent 2e2e91b219
commit 11e7737a2f
17 changed files with 334 additions and 3 deletions

View File

@@ -2546,6 +2546,32 @@ void slsDetector::setBurstMode(slsDetectorDefs::burstMode value) {
shm()->burstMode = value;
}
bool slsDetector::getCurrentSource() {
int retval = -1;
sendToDetector(F_GET_CURRENT_SOURCE, nullptr, retval);
FILE_LOG(logDEBUG1) << "Current source enable:" << retval;
return static_cast<bool>(retval);
}
void slsDetector::setCurrentSource(bool value) {
int arg = static_cast<int>(value);
FILE_LOG(logDEBUG1) << "Setting current source enable to " << arg;
sendToDetector(F_SET_CURRENT_SOURCE, arg, nullptr);
}
slsDetectorDefs::timingSourceType slsDetector::getTimingSource() {
int retval = -1;
sendToDetector(F_GET_TIMING_SOURCE, nullptr, retval);
FILE_LOG(logDEBUG1) << "Timing source:" << retval;
return static_cast<slsDetectorDefs::timingSourceType>(retval);
}
void slsDetector::setTimingSource(slsDetectorDefs::timingSourceType value) {
int arg = static_cast<int>(value);
FILE_LOG(logDEBUG1) << "Setting timing source to " << arg;
sendToDetector(F_SET_TIMING_SOURCE, arg, nullptr);
}
int slsDetector::setCounterBit(int cb) {
int retval = -1;
FILE_LOG(logDEBUG1) << "Sending counter bit " << cb;