mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-14 00:12:11 +02:00
WIP
This commit is contained in:
parent
dd6a95d041
commit
615835f03d
@ -124,14 +124,52 @@ class Detector {
|
|||||||
void setPeriod(ns t, Positions pos = {});
|
void setPeriod(ns t, Positions pos = {});
|
||||||
|
|
||||||
// dhanya
|
// dhanya
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check version compatibility with detector software
|
* Check version compatibility with detector software
|
||||||
* (if hostname/rx_hostname has been set/ sockets created)
|
* @param pos detector position
|
||||||
* @param p port type control port or receiver port
|
|
||||||
* @param detPos -1 for all detectors in list or specific detector position
|
|
||||||
*/
|
*/
|
||||||
void checkDetectorVersionCompatibility(Positions pos = {});
|
void checkDetectorVersionCompatibility(Positions pos = {}) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check version compatibility with receiver software
|
||||||
|
* @param pos detector position
|
||||||
|
*/
|
||||||
|
void checkReceiverVersionCompatibility(Positions pos = {}) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get detector firmware version
|
||||||
|
* @param pos detector position
|
||||||
|
* @returns detector firmware version
|
||||||
|
*/
|
||||||
|
int64_t getDetectorFirmwareVersion(Positions pos = {}) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get detector server version
|
||||||
|
* @param pos detector position
|
||||||
|
* @returns detector server version
|
||||||
|
*/
|
||||||
|
int64_t getDetectorServerVersion(Positions pos = {}) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get detector serial number
|
||||||
|
* @param pos detector position
|
||||||
|
* @returns detector serial number
|
||||||
|
*/
|
||||||
|
int64_t getDetectorSerialNumber(Positions pos = {}) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Client Software version
|
||||||
|
* @returns client software version
|
||||||
|
*/
|
||||||
|
int64_t getClientSoftwareVersion() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Receiver software version
|
||||||
|
* @param pos detector position
|
||||||
|
* @return receiver software version
|
||||||
|
*/
|
||||||
|
int64_t getReceiverSoftwareVersion(Positions pos = {}) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sls
|
} // namespace sls
|
@ -294,7 +294,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
* @param p port type control port or receiver port
|
* @param p port type control port or receiver port
|
||||||
* @param detPos -1 for all detectors in list or specific detector position
|
* @param detPos -1 for all detectors in list or specific detector position
|
||||||
*/
|
*/
|
||||||
void checkReceiverVersionCompatibility(int detPos = -1);
|
void checkReceiverVersionCompatibility(int detPos = -1);//
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get ID or version numbers
|
* Get ID or version numbers
|
||||||
@ -302,27 +302,27 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
* @param detPos -1 for all detectors in list or specific detector position
|
* @param detPos -1 for all detectors in list or specific detector position
|
||||||
* @returns Id or version number of that type
|
* @returns Id or version number of that type
|
||||||
*/
|
*/
|
||||||
int64_t getId(idMode mode, int detPos = -1);
|
int64_t getId(idMode mode, int detPos = -1);//not needed anymore (later remove this_software_version from enum)
|
||||||
|
|
||||||
int getMultiId()const{return multiId;}
|
int getMultiId()const{return multiId;} //public but part of multi
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Client Software version
|
* Get Client Software version
|
||||||
* @returns client software version
|
* @returns client software version
|
||||||
*/
|
*/
|
||||||
int64_t getClientSoftwareVersion() const;
|
int64_t getClientSoftwareVersion() const;//
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Receiver software version
|
* Get Receiver software version
|
||||||
* @return receiver software version
|
* @return receiver software version
|
||||||
*/
|
*/
|
||||||
int64_t getReceiverSoftwareVersion(int detPos = -1);
|
int64_t getReceiverSoftwareVersion(int detPos = -1);//
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Detector Number
|
* Get Detector Number
|
||||||
* @returns vector of detector number
|
* @returns vector of detector number
|
||||||
*/
|
*/
|
||||||
std::vector<int64_t> getDetectorNumber();
|
std::vector<int64_t> getDetectorNumber(); // renamed to getDetectorSerialNumber
|
||||||
/**
|
/**
|
||||||
* Free shared memory from the command line
|
* Free shared memory from the command line
|
||||||
* avoiding creating the constructor classes and mapping
|
* avoiding creating the constructor classes and mapping
|
||||||
|
@ -11,7 +11,6 @@ Detector::Detector(int multi_id)
|
|||||||
: pimpl(sls::make_unique<multiSlsDetector>(multi_id)) {}
|
: pimpl(sls::make_unique<multiSlsDetector>(multi_id)) {}
|
||||||
Detector::~Detector() = default;
|
Detector::~Detector() = default;
|
||||||
|
|
||||||
|
|
||||||
// Acquisition
|
// Acquisition
|
||||||
void Detector::acquire() { pimpl->acquire(); }
|
void Detector::acquire() { pimpl->acquire(); }
|
||||||
|
|
||||||
@ -26,13 +25,9 @@ Result<defs::runStatus> Detector::getReceiverStatus(Positions pos) {
|
|||||||
return pimpl->Parallel(&slsDetector::getReceiverStatus, pos);
|
return pimpl->Parallel(&slsDetector::getReceiverStatus, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Detector::getAcquiringFlag() const{
|
bool Detector::getAcquiringFlag() const { return pimpl->getAcquiringFlag(); }
|
||||||
return pimpl->getAcquiringFlag();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Detector::setAcquiringFlag(bool value){
|
void Detector::setAcquiringFlag(bool value) { pimpl->setAcquiringFlag(value); }
|
||||||
pimpl->setAcquiringFlag(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Configuration
|
// Configuration
|
||||||
Result<std::string> Detector::getHostname(Positions pos) const {
|
Result<std::string> Detector::getHostname(Positions pos) const {
|
||||||
@ -41,7 +36,6 @@ Result<std::string> Detector::getHostname(Positions pos) const {
|
|||||||
|
|
||||||
void Detector::freeSharedMemory() { pimpl->freeSharedMemory(); }
|
void Detector::freeSharedMemory() { pimpl->freeSharedMemory(); }
|
||||||
|
|
||||||
|
|
||||||
void Detector::setConfig(const std::string &fname) {
|
void Detector::setConfig(const std::string &fname) {
|
||||||
pimpl->readConfigurationFile(fname);
|
pimpl->readConfigurationFile(fname);
|
||||||
}
|
}
|
||||||
@ -126,12 +120,33 @@ Result<bool> Detector::getFileOverWrite(Positions pos) const {
|
|||||||
return pimpl->Parallel(&slsDetector::getFileOverWrite, pos);
|
return pimpl->Parallel(&slsDetector::getFileOverWrite, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// dhanya
|
// dhanya
|
||||||
Result<bool> Detector::checkDetectorVersionCompatibility(Positions pos) const {
|
Result<void> Detector::checkDetectorVersionCompatibility(Positions pos) const {
|
||||||
return pimpl->Parallel(&slsDetector::checkDetectorVersionCompatibility, pos);
|
pimpl->Parallel(&slsDetector::checkDetectorVersionCompatibility, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result<void> Detector::checkReceiverVersionCompatibility(Positions pos) const {
|
||||||
|
pimpl->Parallel(&slsDetector::checkReceiverVersionCompatibility, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<int64_t> Detector::getDetectorFirmwareVersion(Positions pos) const {
|
||||||
|
return pimpl->Parallel(&slsDetector::getId, DETECTOR_FIRMWARE_VERSION, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<int64_t> Detector::getDetectorServerVersion(Positions pos) const {
|
||||||
|
return pimpl->Parallel(&slsDetector::getId, DETECTOR_SOFTWARE_VERSION, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<int64_t> Detector::getDetectorSerialNumber(Positions pos) const {
|
||||||
|
return pimpl->Parallel(&slsDetector::getId, DETECTOR_SERIAL_NUMBER, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<int64_t> Detector::getClientSoftwareVersion() const {
|
||||||
|
return APILIB;
|
||||||
|
}
|
||||||
|
|
||||||
|
Result<int64_t> Detector::getReceiverSoftwareVersion(Positions pos) const {
|
||||||
|
return pimpl->Parallel(&slsDetector::getReceiverSoftwareVersion, pos);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace sls
|
} // namespace sls
|
Loading…
x
Reference in New Issue
Block a user