Skip to content
Snippets Groups Projects
Commit ab8cea2e authored by PICHON's avatar PICHON
Browse files

Adding update of write part for auto input attributes

parent db40ada1
No related branches found
No related tags found
No related merge requests found
# Table des matières
[[_TOC_]]
# Description
......
......@@ -117,6 +117,7 @@ public class AutoInputAttributeManager {
"Auto writing value '" + value.toString() + "' to attribute " + properties.getInputAttributeName());
AttributeValue attrValue = new AttributeValue(value);
attribute.internalSetValue(attrValue);
attribute.setWriteValue(attrValue);
} catch (DevFailed e) {
logger.error("Error while writting attribute " + properties.getInputAttributeName(), e);
e.printStackTrace();
......
......@@ -43,6 +43,7 @@ public final class DynamicAttributeParser implements IWriteLockAttributeBehaviou
private boolean isWriteInitialized = false;
private boolean writingLock = false;
private Object writeValue;
public DynamicAttributeParser(final String deviceName, final AttributeConfiguration config,
final String expressionsR, final List<String> expressionsW, final BiMap<String, String> variables,
......@@ -237,4 +238,14 @@ public final class DynamicAttributeParser implements IWriteLockAttributeBehaviou
public boolean isWritingLocked() {
return writingLock;
}
@Override
public void setWriteValue(final AttributeValue value) {
this.writeValue = value.getValue();
}
@Override
public AttributeValue getSetValue() throws DevFailed {
return new AttributeValue(writeValue);
}
}
......@@ -2,10 +2,11 @@ package fr.soleil.tango.server.tangoparser;
import org.tango.server.attribute.AttributeValue;
import org.tango.server.attribute.IAttributeBehavior;
import org.tango.server.attribute.ISetValueUpdater;
import fr.esrf.Tango.DevFailed;
public interface IWriteLockAttributeBehaviour extends IAttributeBehavior {
public interface IWriteLockAttributeBehaviour extends IAttributeBehavior, ISetValueUpdater {
public void blockExternalWriting();
......@@ -14,6 +15,8 @@ public interface IWriteLockAttributeBehaviour extends IAttributeBehavior {
public boolean isWritingLocked();
public void setWriteValue(final AttributeValue value);
public void internalSetValue(final AttributeValue value) throws DevFailed;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment