mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
19 lines
529 B
Python
Executable File
19 lines
529 B
Python
Executable File
class Register:
|
|
def __init__(self, detector):
|
|
self._detector = detector
|
|
|
|
def __getitem__(self, key):
|
|
return self._detector.readRegister(key)
|
|
|
|
def __setitem__(self, key, value):
|
|
self._detector.writeRegister(key, value)
|
|
|
|
class Adc_register:
|
|
def __init__(self, detector):
|
|
self._detector = detector
|
|
|
|
def __setitem__(self, key, value):
|
|
self._detector.writeAdcRegister(key, value)
|
|
|
|
def __getitem__(self, key):
|
|
raise ValueError('Adc registers cannot be read back') |