parallel3 fix, software version check

This commit is contained in:
maliakal_d 2020-04-21 18:27:52 +02:00
parent 1185f1ea17
commit 94103a05b1
4 changed files with 20 additions and 5 deletions

View File

@ -150,7 +150,7 @@ Result<int64_t> Detector::getSerialNumber(Positions pos) const {
}
Result<int64_t> Detector::getReceiverVersion(Positions pos) const {
return pimpl->Parallel(&Module::getReceiverSoftwareVersion, pos);
return pimpl->Parallel3(&Receiver::getSoftwareVersion); //FIXME
}
Result<defs::detectorType> Detector::getDetectorType(Positions pos) const {

View File

@ -519,8 +519,10 @@ class DetectorImpl : public virtual slsDetectorDefs {
for (size_t j : rxPositions) {
futures.push_back(std::async(std::launch::async, somefunc,
receivers[i][j].get(), Args...));
futures.push_back(std::async(std::launch::async, somefunc,
if (receivers2.size()) {
futures.push_back(std::async(std::launch::async, somefunc,
receivers2[i][j].get(), Args...));
}
}
}
sls::Result<RT> result;
@ -553,8 +555,10 @@ class DetectorImpl : public virtual slsDetectorDefs {
for (size_t j : rxPositions) {
futures.push_back(std::async(std::launch::async, somefunc,
receivers[i][j].get(), Args...));
futures.push_back(std::async(std::launch::async, somefunc,
if (receivers2.size()) {
futures.push_back(std::async(std::launch::async, somefunc,
receivers2[i][j].get(), Args...));
}
}
}
sls::Result<RT> result;
@ -587,8 +591,10 @@ class DetectorImpl : public virtual slsDetectorDefs {
for (size_t j : rxPositions) {
futures.push_back(std::async(std::launch::async, somefunc,
receivers[i][j].get(), Args...));
futures.push_back(std::async(std::launch::async, somefunc,
if (receivers2.size()) {
futures.push_back(std::async(std::launch::async, somefunc,
receivers2[i][j].get(), Args...));
}
}
}
for (auto &i : futures) {
@ -618,8 +624,10 @@ class DetectorImpl : public virtual slsDetectorDefs {
for (size_t j : rxPositions) {
futures.push_back(std::async(std::launch::async, somefunc,
receivers[i][j].get(), Args...));
futures.push_back(std::async(std::launch::async, somefunc,
if (receivers2.size()) {
futures.push_back(std::async(std::launch::async, somefunc,
receivers2[i][j].get(), Args...));
}
}
}
for (auto &i : futures) {

View File

@ -317,6 +317,11 @@ std::string Receiver::printConfiguration() {
return oss.str();
}
int64_t Receiver::getSoftwareVersion() const {
LOG(logDEBUG1) << "Getting receiver software version";
return sendToReceiver<int64_t>(F_GET_RECEIVER_VERSION);
}
/** Acquisition */
void Receiver::start() {

View File

@ -57,6 +57,8 @@ namespace sls {
int getTCPPort() const;
void setTCPPort(const int port);
std::string printConfiguration();
int64_t getSoftwareVersion() const;
/**************************************************
* *