removed unnecessary code

This commit is contained in:
2015-08-17 16:21:36 +02:00
parent b2a67e06fb
commit bab4f5a6e8
@@ -67,8 +67,6 @@ public class CrlogicLoopStream implements ActionLoop {
*/
private boolean dataGroup = false;
// private boolean keepTmpFiles = false;
private volatile boolean stopReadoutThread = false;
private Thread readoutThread;
@@ -111,7 +109,6 @@ public class CrlogicLoopStream implements ActionLoop {
private final ChannelService cservice;
private String id;
private String name; // name of the motor channel
private String readback; // name of the encoder channel
@@ -125,6 +122,7 @@ public class CrlogicLoopStream implements ActionLoop {
private final EventBus eventbus;
private List<Metadata> metadata;
public CrlogicLoopStream(ChannelService cservice, String prefix, String ioc, boolean zigZag){
eventbus = new EventBus();
this.cservice = cservice;
@@ -141,7 +139,7 @@ public class CrlogicLoopStream implements ActionLoop {
this.crlogicDataFilter = new CrlogicRangeDataFilter();
}
public void setActuator(String id, String name, String readback, double start, double end, double stepSize, double integrationTime, double additionalBacklash){
this.id = id;
this.name = name;
@@ -153,9 +151,9 @@ public class CrlogicLoopStream implements ActionLoop {
this.additionalBacklash = additionalBacklash;
}
/**
* @param inreader
* @throws IOException
* Receive a ZMQ message
*/
public void receive() {
@@ -165,15 +163,6 @@ public class CrlogicLoopStream implements ActionLoop {
mainHeader = mapper.readValue(socket.recv(), MainHeader.class);
} catch (IOException e) {
throw new RuntimeException("Unable to decode main header", e);
// } catch(ZMQException e){
// if(!stopReadoutThread){
// // re-throw exception unless thread is stopped
// // Closing the socket at the end of a scan causes an ZMQException
// throw e;
// }
// else{
// return;
// }
}
if(!socket.hasReceiveMore()){
@@ -223,8 +212,7 @@ public class CrlogicLoopStream implements ActionLoop {
if(use){
eventbus.post(message);
}
}
}
@@ -677,6 +665,7 @@ public class CrlogicLoopStream implements ActionLoop {
}
private int drainHangingSubmessages() {
logger.info("Drain hanging submessages");
int count = 0;
while (socket.hasReceiveMore()) {
// is there a way to avoid copying data to user space here?
@@ -688,11 +677,8 @@ public class CrlogicLoopStream implements ActionLoop {
@Override
public void cleanup() {
System.out.println("cleanup");
logger.info("Cleanup");
stopReadoutThread = true;
// readoutThread.interrupt();
close();
@@ -701,12 +687,12 @@ public class CrlogicLoopStream implements ActionLoop {
cservice.destroyAnnotatedChannels(motortemplate);
template = null;
motortemplate = null;
} catch (Exception e) {
throw new RuntimeException("Unable to destroy CrlogicLoop", e);
throw new RuntimeException("Unable to destroy Channel Access channels", e);
}
}
@Override
public List<Action> getPreActions() {
return preActions;
@@ -727,11 +713,6 @@ public class CrlogicLoopStream implements ActionLoop {
this.dataGroup = dataGroup;
}
public List<CrlogicResource> getSensors() {
return sensors;
}
public EventBus getEventBus(){
return eventbus;
}