Dev/chip version string (#1525)
Build and Deploy on local RHEL9 / build (push) Successful in 2m6s
Build on RHEL9 docker image / build (push) Successful in 3m46s
Build and Deploy on local RHEL8 / build (push) Successful in 5m9s
Build on RHEL8 docker image / build (push) Successful in 5m14s
Run Simulator Tests on local RHEL9 / build (push) Successful in 20m6s
Run Simulator Tests on local RHEL8 / build (push) Successful in 23m30s

* changed api from double to string return for getchipversion, updated python bindings, added to versions command, fixed appropriately to send string from server, fixed tests accordingly to convert the string to int to do the tests

* binary in

* minor

* fixed tests

* updated help for chipversion
This commit is contained in:
2026-08-17 11:53:00 +02:00
committed by GitHub
parent 473d31c4b3
commit adaeaaa409
20 changed files with 153551 additions and 45 deletions
+9 -2
View File
@@ -2140,6 +2140,8 @@ class Detector(CppDetectorApi):
firmware_febl = "Unknown"
firmware_febr = "Unknown"
firmware_beb = "Unknown"
jungfrau = False
chip = "Unknown"
receiver_in_shm = False
release = self.packageversion
@@ -2149,6 +2151,7 @@ class Detector(CppDetectorApi):
# shared memory has detectors
type = self.type
eiger = (self.type == detectorType.EIGER)
jungfrau = (self.type == detectorType.JUNGFRAU)
receiver_in_shm = self.use_receiver
if receiver_in_shm:
# cannot connect to receiver
@@ -2166,6 +2169,8 @@ class Detector(CppDetectorApi):
firmware_beb = self.firmwareversion
firmware_febl = self.getFrontEndFirmwareVersion(slsDetectorDefs.fpgaPosition.FRONT_LEFT)
firmware_febr = self.getFrontEndFirmwareVersion(slsDetectorDefs.fpgaPosition.FRONT_RIGHT)
if jungfrau:
chip = self.chipversion
except Exception as e:
pass
@@ -2178,6 +2183,8 @@ class Detector(CppDetectorApi):
version_list ['firmware (Febr)'] = {firmware_febr}
else:
version_list ['firmware'] = {firmware}
if jungfrau:
version_list ['chip'] = {chip}
version_list ['detectorserver'] = {detectorserver}
version_list ['kernel'] = kernel
version_list ['hardware'] = hardware
@@ -2738,12 +2745,12 @@ class Detector(CppDetectorApi):
@element
def chipversion(self):
"""
[Jungfrau] Chip version of module. Can be 1.0, 1.1 or 1.2.
[Jungfrau] Chip version of module.
Example
-------
>>> d.chipversion
'1.0'
'1.2 Normal'
"""
return self.getChipVersion()
+5 -4
View File
@@ -1197,10 +1197,11 @@ void init_det(py::module &m) {
CppDetectorApi.def(
"setTop", (void (Detector::*)(bool, sls::Positions)) & Detector::setTop,
py::arg(), py::arg() = Positions{});
CppDetectorApi.def("getChipVersion",
(Result<double>(Detector::*)(sls::Positions) const) &
Detector::getChipVersion,
py::arg() = Positions{});
CppDetectorApi.def(
"getChipVersion",
(Result<std::string>(Detector::*)(sls::Positions) const) &
Detector::getChipVersion,
py::arg() = Positions{});
CppDetectorApi.def("getThresholdTemperature",
(Result<int>(Detector::*)(sls::Positions) const) &
Detector::getThresholdTemperature,