dev:Eiger febl febr (#601)

* eiger: get febl and febr versions in versions command, also added in python
This commit is contained in:
Dhanya Thattil
2023-02-24 10:06:11 +01:00
committed by GitHub
parent 276dc52196
commit 48a684b95f
25 changed files with 160 additions and 12 deletions

View File

@ -78,6 +78,11 @@ class Detector {
Result<int64_t> getFirmwareVersion(Positions pos = {}) const;
/** [Eiger] Options: FRONT_LEFT, FRONT_RIGHT */
Result<int64_t>
getFrontEndFirmwareVersion(const defs::fpgaPosition fpgaPosition,
Positions pos = {}) const;
Result<std::string> getDetectorServerVersion(Positions pos = {}) const;
/** [Jungfrau][Moench][Gotthard2][Myhten3][Gotthard][Ctb] */

View File

@ -276,25 +276,33 @@ std::string CmdProxy::Versions(int action) {
}
bool eiger = (det->getDetectorType().squash() == defs::EIGER);
auto t = det->getFirmwareVersion(std::vector<int>{det_id});
os << "\nType : " << OutString(det->getDetectorType())
<< "\nRelease : " << det->getPackageVersion() << std::hex
<< "\nClient : " << det->getClientVersion();
os << "\nFirmware : ";
os << "\nType : " << OutString(det->getDetectorType())
<< "\nRelease : " << det->getPackageVersion() << std::hex
<< "\nClient : " << det->getClientVersion();
if (eiger) {
os << OutString(t);
os << "\nFirmware (Beb) : "
<< OutString(det->getFirmwareVersion(std::vector<int>{det_id}));
os << "\nFirmware (Febl) : "
<< OutString(det->getFrontEndFirmwareVersion(
defs::FRONT_LEFT, std::vector<int>{det_id}));
os << "\nFirmware (Febr) : "
<< OutString(det->getFrontEndFirmwareVersion(
defs::FRONT_RIGHT, std::vector<int>{det_id}));
} else {
os << OutStringHex(t);
os << "\nFirmware : "
<< OutStringHex(
det->getFirmwareVersion(std::vector<int>{det_id}));
}
os << "\nServer : "
os << "\nServer : "
<< OutString(
det->getDetectorServerVersion(std::vector<int>{det_id}));
if (!eiger)
os << "\nHardware : "
os << "\nHardware : "
<< OutString(det->getHardwareVersion(std::vector<int>{det_id}));
os << "\nKernel : "
os << "\nKernel : "
<< OutString(det->getKernelVersion({std::vector<int>{det_id}}));
if (det->getUseReceiverFlag().squash(true)) {
os << "\nReceiver : "
os << "\nReceiver : "
<< OutString(det->getReceiverVersion(std::vector<int>{det_id}));
}
os << std::dec << '\n';

View File

@ -124,6 +124,13 @@ Result<int64_t> Detector::getFirmwareVersion(Positions pos) const {
return pimpl->Parallel(&Module::getFirmwareVersion, pos);
}
Result<int64_t>
Detector::getFrontEndFirmwareVersion(const defs::fpgaPosition fpgaPosition,
Positions pos) const {
return pimpl->Parallel(&Module::getFrontEndFirmwareVersion, pos,
fpgaPosition);
}
Result<std::string> Detector::getDetectorServerVersion(Positions pos) const {
return pimpl->Parallel(&Module::getDetectorServerVersion, pos);
}

View File

@ -92,6 +92,12 @@ int64_t Module::getFirmwareVersion() const {
return sendToDetector<int64_t>(F_GET_FIRMWARE_VERSION);
}
int64_t
Module::getFrontEndFirmwareVersion(const fpgaPosition fpgaPosition) const {
return sendToDetector<int64_t>(F_GET_FRONTEND_FIRMWARE_VERSION,
fpgaPosition);
}
std::string Module::getControlServerLongVersion() const {
char retval[MAX_STR_LENGTH]{};
sendToDetector(F_GET_SERVER_VERSION, nullptr, retval);

View File

@ -90,6 +90,7 @@ class Module : public virtual slsDetectorDefs {
void setHostname(const std::string &hostname, const bool initialChecks);
int64_t getFirmwareVersion() const;
int64_t getFrontEndFirmwareVersion(const fpgaPosition fpgaPosition) const;
std::string getControlServerLongVersion() const;
std::string getStopServerLongVersion() const;
std::string getDetectorServerVersion() const;