Closedown
This commit is contained in:
@@ -26,13 +26,14 @@ class StdDaq(DeviceBase):
|
||||
data = {"sources":"eiger", "n_images":10, "output_file":"/tmp/test.h5"}
|
||||
headers = {'Content-type': 'application/json'}
|
||||
r = requests.post(url = self.url + "/write_async", json=data, headers=headers)
|
||||
self.req_id = str(r.json()["request_id"])
|
||||
self.req_id = int(str(r.json()["request_id"])
|
||||
|
||||
else:
|
||||
self.req_id = self.simulated_id
|
||||
self.simulated_id=self.simulated_id+1
|
||||
self.setCache(self.req_id, None)
|
||||
self.setState(State.Busy)
|
||||
fork (self.monitor)
|
||||
|
||||
def stop(self):
|
||||
self.state.assertIs(State.Busy)
|
||||
@@ -43,6 +44,16 @@ class StdDaq(DeviceBase):
|
||||
self.setCache(None, None)
|
||||
self.setState(State.Ready)
|
||||
|
||||
def monitor(self):
|
||||
count=0
|
||||
while getState==State.Busy:
|
||||
time.sleep(1.0)
|
||||
count=count+1
|
||||
if count==3:
|
||||
self.setCache(None, None)
|
||||
self.setState(State.Ready)
|
||||
|
||||
|
||||
def get_config(self):
|
||||
if self.simulated:
|
||||
return self.simulated_config
|
||||
|
||||
Reference in New Issue
Block a user