mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-17 07:17:13 +02:00
addd kernel version
This commit is contained in:
@ -275,7 +275,7 @@ std::string CmdProxy::Versions(int action) {
|
||||
if (!args.empty()) {
|
||||
WrongNumberOfParameters(0);
|
||||
}
|
||||
auto t = det->getFirmwareVersion();
|
||||
auto t = det->getFirmwareVersion(std::vector<int>{det_id});
|
||||
os << "\nDetector Type: " << OutString(det->getDetectorType())
|
||||
<< "\nPackage Version: " << det->getPackageVersion() << std::hex
|
||||
<< "\nClient Version: 0x" << det->getClientVersion();
|
||||
@ -285,10 +285,12 @@ std::string CmdProxy::Versions(int action) {
|
||||
os << "\nFirmware Version: " << OutStringHex(t);
|
||||
}
|
||||
os << "\nDetector Server Version: "
|
||||
<< OutStringHex(det->getDetectorServerVersion());
|
||||
<< OutStringHex(det->getDetectorServerVersion(std::vector<int>{det_id}));
|
||||
os << "\nDetector Server Version: "
|
||||
<< OutString(det->getKernelVersion({std::vector<int>{det_id}}));
|
||||
if (det->getUseReceiverFlag().squash(true)) {
|
||||
os << "\nReceiver Version: "
|
||||
<< OutStringHex(det->getReceiverVersion());
|
||||
<< OutStringHex(det->getReceiverVersion(std::vector<int>{det_id}));
|
||||
}
|
||||
os << std::dec << '\n';
|
||||
} else if (action == defs::PUT_ACTION) {
|
||||
|
@ -767,6 +767,7 @@ class CmdProxy {
|
||||
{"clientversion", &CmdProxy::ClientVersion},
|
||||
{"firmwareversion", &CmdProxy::FirmwareVersion},
|
||||
{"detectorserverversion", &CmdProxy::detectorserverversion},
|
||||
{"kernelversion", &CmdProxy::kernelversion},
|
||||
{"rx_version", &CmdProxy::rx_version},
|
||||
{"serialnumber", &CmdProxy::serialnumber},
|
||||
{"moduleid", &CmdProxy::moduleid},
|
||||
@ -1206,6 +1207,10 @@ class CmdProxy {
|
||||
detectorserverversion, getDetectorServerVersion,
|
||||
"\n\tOn-board detector server software version in format [0xYYMMDD].");
|
||||
|
||||
GET_COMMAND(
|
||||
kernelversion, getKernelVersion,
|
||||
"\n\tGet kernel version on the detector including time and date.");
|
||||
|
||||
GET_COMMAND_HEX(rx_version, getReceiverVersion,
|
||||
"\n\tReceiver version in format [0xYYMMDD].");
|
||||
|
||||
|
@ -117,6 +117,10 @@ Result<int64_t> Detector::getDetectorServerVersion(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getDetectorServerVersion, pos);
|
||||
}
|
||||
|
||||
Result<std::string> Detector::getKernelVersion(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getKernelVersion, pos);
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getSerialNumber(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getSerialNumber, pos);
|
||||
}
|
||||
|
@ -94,6 +94,12 @@ int64_t Module::getDetectorServerVersion() const {
|
||||
return sendToDetector<int64_t>(F_GET_SERVER_VERSION);
|
||||
}
|
||||
|
||||
std::string Module::getKernelVersion() const {
|
||||
char retval[MAX_STR_LENGTH]{};
|
||||
sendToDetector(F_GET_KERNEL_VERSION, nullptr, retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
int64_t Module::getSerialNumber() const {
|
||||
return sendToDetector<int64_t>(F_GET_SERIAL_NUMBER);
|
||||
}
|
||||
|
@ -91,6 +91,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
|
||||
int64_t getFirmwareVersion() const;
|
||||
int64_t getDetectorServerVersion() const;
|
||||
std::string getKernelVersion() const;
|
||||
int64_t getSerialNumber() const;
|
||||
int getModuleId() const;
|
||||
int64_t getReceiverSoftwareVersion() const;
|
||||
|
Reference in New Issue
Block a user