Merge branch 'master' of 10.112.1.3:/git/org.hwo.ui
commit
42a50c9b08
|
@ -24,7 +24,7 @@ public class ServiceLinkPlotProvider implements PlotProvider{
|
|||
|
||||
public void sample(int pos){
|
||||
if (this.serviceRegister.getAsFloat())
|
||||
this.values[pos] = this.serviceRegister.readFloatValue();
|
||||
this.values[pos] = this.serviceRegister.readFloatValueSynchron();
|
||||
else
|
||||
this.values[pos] = this.serviceRegister.readIntegerValue().floatValue();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.hwo.ui.servicelink.register;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
@ -13,6 +14,7 @@ import org.hwo.interactiveobjects.InteractiveObject;
|
|||
import org.hwo.io.servicelink.ServiceLink;
|
||||
import org.hwo.io.servicelink.ServiceLink.ServiceTelegram;
|
||||
import org.hwo.io.servicelink.ServiceLinkException;
|
||||
import org.hwo.io.servicelink.ServiceLinkRequestFailedException;
|
||||
import org.hwo.io.servicelink.ServiceRegisterListener;
|
||||
import org.hwo.models.TableMapper.TableColumn;
|
||||
import org.hwo.ui.servicelink.register.bitfield.BitFieldEditor;
|
||||
|
@ -201,6 +203,18 @@ public abstract class ServiceRegister implements ServiceRegisterListener {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public Float readFloatValueSynchron()
|
||||
{
|
||||
try {
|
||||
return serviceLink.readFloat(ax.byteValue(), node.byteValue(), register);
|
||||
} catch (ServiceLinkRequestFailedException e) {
|
||||
} catch (IOException e) {
|
||||
} catch (ServiceLinkException e) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public Integer readIntegerValue()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue