43 lines
1.2 KiB
Python
43 lines
1.2 KiB
Python
class StdDaq(DeviceBase):
|
|
def __init__(self, name):
|
|
DeviceBase.__init__(self, name)
|
|
self.setSimulated()
|
|
self.simulated_config = {
|
|
"detector_name": "eg",
|
|
"detector_type": "eiger",
|
|
"n_modules": 2,
|
|
"bit_depth": 32,
|
|
"image_pixel_height": 514,
|
|
"image_pixel_width": 1030,
|
|
"start_udp_port": 50000
|
|
}
|
|
|
|
|
|
def doInitialize(self):
|
|
pass
|
|
|
|
def start(self):
|
|
self.state.assertIs(State.Ready)
|
|
if not self.simulated:
|
|
pass
|
|
self.setState(State.Busy)
|
|
|
|
def stop(self):
|
|
self.state.assertIs(State.Busy)
|
|
if not self.simulated:
|
|
pass
|
|
self.setState(State.Ready)
|
|
|
|
def get_config(self):
|
|
if self.simulated:
|
|
return self.simulated_config
|
|
|
|
def get_config(self, config):
|
|
if type(config) == dict or isinstance(config, java.util.Map) :
|
|
if self.simulated:
|
|
self.simulated_config=config
|
|
|
|
def doClose(self):
|
|
pass
|
|
|