mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-18 07:47:12 +02:00
WIP
This commit is contained in:
@ -548,15 +548,13 @@ void Detector::setDAC(int value, defs::dacIndex index, bool mV, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setDAC, pos, value, index, mV);
|
||||
}
|
||||
|
||||
Result<defs::externalCommunicationMode>
|
||||
Detector::getTimingMode(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setExternalCommunicationMode, pos,
|
||||
defs::GET_EXTERNAL_COMMUNICATION_MODE);
|
||||
Result<defs::timingMode> Detector::getTimingMode(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimingMode, pos,
|
||||
defs::GET_TIMING_MODE);
|
||||
}
|
||||
|
||||
void Detector::setTimingMode(defs::externalCommunicationMode value,
|
||||
Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setExternalCommunicationMode, pos, value);
|
||||
void Detector::setTimingMode(defs::timingMode value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTimingMode, pos, value);
|
||||
}
|
||||
|
||||
Result<defs::externalSignalFlag>
|
||||
|
@ -1110,16 +1110,14 @@ int multiSlsDetector::getADC(dacIndex index, int detPos) {
|
||||
return sls::minusOneIfDifferent(r);
|
||||
}
|
||||
|
||||
slsDetectorDefs::externalCommunicationMode
|
||||
multiSlsDetector::setExternalCommunicationMode(externalCommunicationMode pol,
|
||||
int detPos) {
|
||||
slsDetectorDefs::timingMode multiSlsDetector::setTimingMode(timingMode pol, int detPos) {
|
||||
// single
|
||||
if (detPos >= 0) {
|
||||
return detectors[detPos]->setExternalCommunicationMode(pol);
|
||||
return detectors[detPos]->setTimingMode(pol);
|
||||
}
|
||||
|
||||
// multi
|
||||
auto r = parallelCall(&slsDetector::setExternalCommunicationMode, pol);
|
||||
auto r = parallelCall(&slsDetector::setTimingMode, pol);
|
||||
return sls::minusOneIfDifferent(r);
|
||||
}
|
||||
|
||||
|
@ -1457,11 +1457,10 @@ int slsDetector::getADC(dacIndex index) {
|
||||
return retval;
|
||||
}
|
||||
|
||||
slsDetectorDefs::externalCommunicationMode
|
||||
slsDetector::setExternalCommunicationMode(externalCommunicationMode pol) {
|
||||
int fnum = F_SET_EXTERNAL_COMMUNICATION_MODE;
|
||||
slsDetectorDefs::timingMode slsDetector::setTimingMode(timingMode pol) {
|
||||
int fnum = F_SET_TIMING_MODE;
|
||||
auto arg = static_cast<int>(pol);
|
||||
externalCommunicationMode retval = GET_EXTERNAL_COMMUNICATION_MODE;
|
||||
timingMode retval = GET_TIMING_MODE;
|
||||
FILE_LOG(logDEBUG1) << "Setting communication to mode " << pol;
|
||||
sendToDetector(fnum, arg, retval);
|
||||
FILE_LOG(logDEBUG1) << "Timing Mode: " << retval;
|
||||
|
@ -4285,11 +4285,11 @@ std::string slsDetectorCommand::cmdTiming(int narg, const char * const args[], i
|
||||
return helpTiming(HELP_ACTION);
|
||||
}
|
||||
if (action == PUT_ACTION) {
|
||||
if (myDet->externalCommunicationType(std::string(args[1])) == GET_EXTERNAL_COMMUNICATION_MODE)
|
||||
if (myDet->timingModeType(std::string(args[1])) == GET_TIMING_MODE)
|
||||
return helpTiming(action);
|
||||
myDet->setExternalCommunicationMode(myDet->externalCommunicationType(std::string(args[1])), detPos);
|
||||
myDet->setTimingMode(myDet->timingModeType(std::string(args[1])), detPos);
|
||||
}
|
||||
return myDet->externalCommunicationType(myDet->setExternalCommunicationMode(GET_EXTERNAL_COMMUNICATION_MODE, detPos));
|
||||
return myDet->timingModeType(myDet->setTimingMode(GET_TIMING_MODE, detPos));
|
||||
}
|
||||
std::string slsDetectorCommand::helpTiming(int action) {
|
||||
|
||||
|
@ -167,7 +167,7 @@ double slsDetectorUsers::getMeasuredSubFramePeriod(bool inseconds, int detPos) {
|
||||
}
|
||||
|
||||
int slsDetectorUsers::setTimingMode(int pol, int detPos){
|
||||
return detector.setExternalCommunicationMode(slsDetectorDefs::externalCommunicationMode(pol), detPos);
|
||||
return detector.setTimingMode(slsDetectorDefs::timingMode(pol), detPos);
|
||||
}
|
||||
|
||||
int slsDetectorUsers::setClockDivider(int value, int detPos) {
|
||||
|
Reference in New Issue
Block a user