mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-29 09:30:02 +02:00
WIP
This commit is contained in:
parent
94103a05b1
commit
6de68eacc2
@ -215,6 +215,7 @@ Result<int64_t> Detector::getNumberOfFrames(Positions pos) const {
|
||||
|
||||
void Detector::setNumberOfFrames(int64_t value) {
|
||||
pimpl->Parallel(&Module::setNumberOfFrames, {}, value);
|
||||
pimpl->Parallel3(&Receiver::setNumberOfFrames, value); //FIXME
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getNumberOfTriggers(Positions pos) const {
|
||||
@ -1124,6 +1125,7 @@ Result<int> Detector::getPartialReadout(Positions pos) const {
|
||||
|
||||
void Detector::setPartialReadout(const int lines, Positions pos) {
|
||||
pimpl->Parallel(&Module::setReadNLines, pos, lines);
|
||||
pimpl->Parallel3(&Receiver::setReadNLines, lines);
|
||||
}
|
||||
|
||||
Result<bool> Detector::getInterruptSubframe(Positions pos) const {
|
||||
@ -1193,6 +1195,7 @@ void Detector::setQuad(const bool enable) {
|
||||
"Eiger Quad Half module.");
|
||||
}
|
||||
pimpl->Parallel(&Module::setQuad, {}, enable);
|
||||
pimpl->Parallel3(&Receiver::setQuad, enable); //FIXME
|
||||
}
|
||||
|
||||
// Jungfrau Specific
|
||||
|
@ -115,15 +115,6 @@ void Module::checkDetectorVersionCompatibility() {
|
||||
sendToDetectorStop(fnum, arg, nullptr);
|
||||
}
|
||||
|
||||
void Module::checkReceiverVersionCompatibility() {
|
||||
// TODO! Verify that this works as intended when version don't match
|
||||
int64_t arg = APIRECEIVER;
|
||||
LOG(logDEBUG1)
|
||||
<< "Checking version compatibility with receiver with value "
|
||||
<< std::hex << arg << std::dec;
|
||||
sendToReceiver(F_RECEIVER_CHECK_VERSION, arg, nullptr);
|
||||
}
|
||||
|
||||
int64_t Module::getFirmwareVersion() {
|
||||
int64_t retval = -1;
|
||||
sendToDetector(F_GET_FIRMWARE_VERSION, nullptr, retval);
|
||||
@ -145,16 +136,6 @@ int64_t Module::getSerialNumber() {
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
int64_t Module::getReceiverSoftwareVersion() const {
|
||||
LOG(logDEBUG1) << "Getting receiver software version";
|
||||
int64_t retval = -1;
|
||||
if (shm()->useReceiver) {
|
||||
sendToReceiver(F_GET_RECEIVER_VERSION, nullptr, retval);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
void Module::sendToDetector(int fnum, const void *args, size_t args_size,
|
||||
void *retval, size_t retval_size) {
|
||||
auto client = DetectorSocket(shm()->hostname, shm()->controlPort);
|
||||
@ -583,20 +564,11 @@ void Module::setQuad(const bool enable) {
|
||||
int value = enable ? 1 : 0;
|
||||
LOG(logDEBUG1) << "Setting Quad type to " << value;
|
||||
sendToDetector(F_SET_QUAD, value, nullptr);
|
||||
LOG(logDEBUG1) << "Setting Quad type to " << value << " in Receiver";
|
||||
if (shm()->useReceiver) {
|
||||
sendToReceiver(F_SET_RECEIVER_QUAD, value, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void Module::setReadNLines(const int value) {
|
||||
LOG(logDEBUG1) << "Setting read n lines to " << value;
|
||||
sendToDetector(F_SET_READ_N_LINES, value, nullptr);
|
||||
LOG(logDEBUG1) << "Setting read n lines to " << value
|
||||
<< " in Receiver";
|
||||
if (shm()->useReceiver) {
|
||||
sendToReceiver(F_SET_RECEIVER_READ_N_LINES, value, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
int Module::getReadNLines() {
|
||||
@ -1023,10 +995,6 @@ int64_t Module::getNumberOfFrames() {
|
||||
void Module::setNumberOfFrames(int64_t value) {
|
||||
LOG(logDEBUG1) << "Setting number of frames to " << value;
|
||||
sendToDetector(F_SET_NUM_FRAMES, value, nullptr);
|
||||
if (shm()->useReceiver) {
|
||||
LOG(logDEBUG1) << "Sending number of frames to Receiver: " << value;
|
||||
sendToReceiver(F_RECEIVER_SET_NUM_FRAMES, value, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
int64_t Module::getNumberOfTriggers() {
|
||||
|
@ -125,11 +125,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
void setNumberOfReceivers(const int num);
|
||||
int getNumberOfReceivers2() const;
|
||||
void setNumberOfReceivers2(const int num);
|
||||
/**
|
||||
* Check version compatibility with receiver software
|
||||
*/
|
||||
void checkReceiverVersionCompatibility();
|
||||
|
||||
|
||||
/**
|
||||
* Check version compatibility with detector software
|
||||
*/
|
||||
@ -141,11 +137,6 @@ class Module : public virtual slsDetectorDefs {
|
||||
|
||||
int64_t getSerialNumber();
|
||||
|
||||
/**
|
||||
* Get Receiver Software version
|
||||
*/
|
||||
int64_t getReceiverSoftwareVersion() const;
|
||||
|
||||
/**
|
||||
* Free shared memory and delete shared memory structure
|
||||
* occupied by the sharedModule structure
|
||||
|
@ -322,6 +322,12 @@ int64_t Receiver::getSoftwareVersion() const {
|
||||
return sendToReceiver<int64_t>(F_GET_RECEIVER_VERSION);
|
||||
}
|
||||
|
||||
/** Acquisition Parameters */
|
||||
void Receiver::setNumberOfFrames(int64_t value) {
|
||||
LOG(logDEBUG1) << "Sending number of frames to Receiver: " << value;
|
||||
sendToReceiver(F_RECEIVER_SET_NUM_FRAMES, value, nullptr);
|
||||
}
|
||||
|
||||
/** Acquisition */
|
||||
|
||||
void Receiver::start() {
|
||||
@ -362,6 +368,19 @@ void Receiver::restreamStop() {
|
||||
}
|
||||
|
||||
/** Detector Specific */
|
||||
// Eiger
|
||||
void Receiver::setQuad(const bool enable) {
|
||||
int value = enable ? 1 : 0;
|
||||
LOG(logDEBUG1) << "Setting Quad type to " << value << " in Receiver";
|
||||
sendToReceiver(F_SET_RECEIVER_QUAD, value, nullptr);
|
||||
}
|
||||
|
||||
void Receiver::setReadNLines(const int value) {
|
||||
LOG(logDEBUG1) << "Setting read n lines to " << value
|
||||
<< " in Receiver";
|
||||
sendToReceiver(F_SET_RECEIVER_READ_N_LINES, value, nullptr);
|
||||
}
|
||||
|
||||
// Moench
|
||||
|
||||
void Receiver::setAdditionalJsonHeader(const std::map<std::string, std::string> &jsonHeader) {
|
||||
|
@ -65,6 +65,7 @@ namespace sls {
|
||||
* Acquisition Parameters *
|
||||
* *
|
||||
* ************************************************/
|
||||
void setNumberOfFrames(int64_t value);
|
||||
|
||||
|
||||
/**************************************************
|
||||
@ -101,6 +102,10 @@ namespace sls {
|
||||
* Detector Specific *
|
||||
* *
|
||||
* ************************************************/
|
||||
// Eiger
|
||||
void setQuad(const bool enable);
|
||||
void setReadNLines(const int value);
|
||||
|
||||
// Moench
|
||||
/** empty vector deletes entire additional json header */
|
||||
void setAdditionalJsonHeader(const std::map<std::string, std::string> &jsonHeader);
|
||||
|
Loading…
x
Reference in New Issue
Block a user