mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
hardware version (#580)
* hardware version for all dets except eiger Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
This commit is contained in:
@ -275,21 +275,24 @@ std::string CmdProxy::Versions(int action) {
|
||||
WrongNumberOfParameters(0);
|
||||
}
|
||||
auto t = det->getFirmwareVersion(std::vector<int>{det_id});
|
||||
os << "\nDetector Type: " << OutString(det->getDetectorType())
|
||||
<< "\nPackage Version: " << det->getPackageVersion() << std::hex
|
||||
<< "\nClient Version: " << det->getClientVersion();
|
||||
os << "\nType : " << OutString(det->getDetectorType())
|
||||
<< "\nRelease : " << det->getPackageVersion() << std::hex
|
||||
<< "\nClient : " << det->getClientVersion();
|
||||
os << "\nFirmware : ";
|
||||
if (det->getDetectorType().squash() == defs::EIGER) {
|
||||
os << "\nFirmware Version: " << OutString(t);
|
||||
os << OutString(t);
|
||||
} else {
|
||||
os << "\nFirmware Version: " << OutStringHex(t);
|
||||
os << OutStringHex(t);
|
||||
}
|
||||
os << "\nDetector Server Version: "
|
||||
os << "\nServer : "
|
||||
<< OutString(
|
||||
det->getDetectorServerVersion(std::vector<int>{det_id}));
|
||||
os << "\nDetector Kernel Version: "
|
||||
os << "\nHardware : "
|
||||
<< OutString(det->getHardwareVersion(std::vector<int>{det_id}));
|
||||
os << "\nKernel : "
|
||||
<< OutString(det->getKernelVersion({std::vector<int>{det_id}}));
|
||||
if (det->getUseReceiverFlag().squash(true)) {
|
||||
os << "\nReceiver Version: "
|
||||
os << "\nReceiver : "
|
||||
<< OutString(det->getReceiverVersion(std::vector<int>{det_id}));
|
||||
}
|
||||
os << std::dec << '\n';
|
||||
|
@ -767,6 +767,7 @@ class CmdProxy {
|
||||
{"packageversion", &CmdProxy::PackageVersion},
|
||||
{"clientversion", &CmdProxy::ClientVersion},
|
||||
{"firmwareversion", &CmdProxy::FirmwareVersion},
|
||||
{"hardwareversion", &CmdProxy::hardwareversion},
|
||||
{"detectorserverversion", &CmdProxy::detectorserverversion},
|
||||
{"kernelversion", &CmdProxy::kernelversion},
|
||||
{"rx_version", &CmdProxy::rx_version},
|
||||
@ -1235,6 +1236,10 @@ class CmdProxy {
|
||||
GET_COMMAND(detectorserverversion, getDetectorServerVersion,
|
||||
"\n\tOn-board detector server software version");
|
||||
|
||||
GET_COMMAND(hardwareversion, getHardwareVersion,
|
||||
"\n\tJungfrau][Gotthard2][Myhten3][Gotthard][Ctb][Moench] "
|
||||
"Hardware version of detector.");
|
||||
|
||||
GET_COMMAND(
|
||||
kernelversion, getKernelVersion,
|
||||
"\n\tGet kernel version on the detector including time and date.");
|
||||
|
@ -128,6 +128,10 @@ Result<std::string> Detector::getDetectorServerVersion(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getDetectorServerVersion, pos);
|
||||
}
|
||||
|
||||
Result<std::string> Detector::getHardwareVersion(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getHardwareVersion, pos);
|
||||
}
|
||||
|
||||
Result<std::string> Detector::getKernelVersion(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getKernelVersion, pos);
|
||||
}
|
||||
@ -2300,6 +2304,7 @@ void Detector::setAdditionalJsonParameter(const std::string &key,
|
||||
void Detector::programFPGA(const std::string &fname,
|
||||
const bool forceDeleteNormalFile, Positions pos) {
|
||||
LOG(logINFO) << "Updating Firmware...";
|
||||
LOG(logINFO) << "Hardware Version: " << getHardwareVersion();
|
||||
std::vector<char> buffer = pimpl->readProgrammingFile(fname);
|
||||
pimpl->Parallel(&Module::programFPGA, pos, buffer, forceDeleteNormalFile);
|
||||
rebootController(pos);
|
||||
|
@ -109,6 +109,12 @@ std::string Module::getDetectorServerVersion() const {
|
||||
return v.concise();
|
||||
}
|
||||
|
||||
std::string Module::getHardwareVersion() const {
|
||||
char retval[MAX_STR_LENGTH]{};
|
||||
sendToDetector(F_GET_HARDWARE_VERSION, nullptr, retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
std::string Module::getKernelVersion() const {
|
||||
char retval[MAX_STR_LENGTH]{};
|
||||
sendToDetector(F_GET_KERNEL_VERSION, nullptr, retval);
|
||||
|
@ -93,6 +93,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
std::string getControlServerLongVersion() const;
|
||||
std::string getStopServerLongVersion() const;
|
||||
std::string getDetectorServerVersion() const;
|
||||
std::string getHardwareVersion() const;
|
||||
std::string getKernelVersion() const;
|
||||
int64_t getSerialNumber() const;
|
||||
int getModuleId() const;
|
||||
|
Reference in New Issue
Block a user