I am trying to write a tag that references a ManagedDevice implementation using the Milo OPC-UA driver.
The following is the error that the designer throws at me:
Error writing to InterMessageDelay.value: Bad("Bad_InternalError: An internal error occurred as a result of a programming or configuration error.")
The following is the snipped of my code that implements the write AttributeFilter:
UaVariableNode interMessageDelaysNode = UaVariableNode.builder(getNodeContext())
.setNodeId(deviceContext.nodeId(String.format("%s/InterMessageDelay",folderName)))
.setBrowseName(deviceContext.qualifiedName("InterMessageDelay"))
.setDisplayName(new LocalizedText("InterMessageDelay"))
.setDataType(BuiltinDataType.UInt32.getNodeId())
.setTypeDefinition(Identifiers.BaseDataVariableType)
.setAccessLevel(AccessLevel.READ_WRITE)
.setUserAccessLevel(AccessLevel.READ_WRITE)
.build();
interMessageDelaysNode.setValue(new DataValue((new Variant(0))));
interMessageDelaysNode.getFilterChain().addLast(AttributeFilters.getValue(
getAttributeContext ->
new DataValue(new Variant(snmpDevice.getInterMessageDelay()))
)
);
interMessageDelaysNode.getFilterChain().addLast(AttributeFilters.setValue((ctx, value) -> {
snmpDevice.setInterMessageDelay((Integer) value.getValue().getValue());
ctx.setAttribute(AttributeId.Value, value);
}));
getNodeManager().addNode(interMessageDelaysNode);
folderNode.addOrganizes(interMessageDelaysNode);
Thanks,
Brandon