Closedown
This commit is contained in:
+1
-1
@@ -265,7 +265,7 @@
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonStop">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Stop"/>
|
||||
<Property name="text" type="java.lang.String" value="Abort"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonStopActionPerformed"/>
|
||||
|
||||
+2
-2
@@ -203,7 +203,7 @@ public class Eiger extends Panel {
|
||||
}
|
||||
});
|
||||
|
||||
buttonStop.setText("Stop");
|
||||
buttonStop.setText("Abort");
|
||||
buttonStop.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonStopActionPerformed(evt);
|
||||
@@ -419,7 +419,7 @@ public class Eiger extends Panel {
|
||||
private void buttonStopActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonStopActionPerformed
|
||||
try{
|
||||
if (stddaq!=null){
|
||||
evalAsync("std_daq.stop()");
|
||||
evalAsync("std_daq.abort()");
|
||||
}
|
||||
} catch (Exception ex){
|
||||
showException(ex);
|
||||
|
||||
@@ -33,16 +33,18 @@ class StdDaq(DeviceBase):
|
||||
else:
|
||||
self.req_id = self.simulated_id
|
||||
self.simulated_id=self.simulated_id+1
|
||||
print "Started request: ", self.req_id
|
||||
self.setCache(self.req_id, None)
|
||||
self.setState(State.Busy)
|
||||
fork (self.monitor)
|
||||
|
||||
def stop(self):
|
||||
def abort(self):
|
||||
self.state.assertIs(State.Busy)
|
||||
if not self.simulated:
|
||||
print "Aborting request: ", self.req_id
|
||||
data = {"request_id":self.req_id}
|
||||
headers = {'Content-type': 'application/json'}
|
||||
r = requests.post(url = self.url + "/write_kill", json=data, headers=headers)
|
||||
r = requests.post(url = self.url + "/write_kill", json=data, headers=headers)
|
||||
self.setCache(None, None)
|
||||
self.setState(State.Ready)
|
||||
|
||||
@@ -56,6 +58,7 @@ class StdDaq(DeviceBase):
|
||||
if not self.simulated:
|
||||
pass #TODO: Check Status
|
||||
if done:
|
||||
print "Finished request: ", self.req_id
|
||||
self.setCache(None, None)
|
||||
self.setState(State.Ready)
|
||||
time.sleep(0.2)
|
||||
|
||||
Reference in New Issue
Block a user