I have a OPC UA Server similar to the BigNodeManager Sample with my own data structure. Until recently I used the 1.4.2.5838 Java Evaluation SDK and an older UaExpert version.
My system was working perfectly, setting AccessLevel for different datapoints to READWRITE or READONLY.
Yesterday I got the new 1.2.2.175 UaExpert and the 1.4.8.8731 Java SDK. And now I have the following problem.
1. Selecting a datapoint with READWRITE access level first, the properties are displayed correctly in UaExpert and I can write the datapoint.
2. Selecting a datapoint with READONLY access level second, the UaExpert displays the properties correctly for this datapoint.
3. But after this, if I again select a datapoint with READWRITE access level, the access level has also changed to READONLY. This behavior is the same for alle datapoints now. All datapoints that should have READWRITE access
have now only READONLY access.
To sum it up: Selecting READWRITE datapoints works, but after selecting one READONLY datapoint all other READWRITE datapoints are also READONLY.
How is this possible ?? Each time I select a datapoint in UaExpert the server programm runs through this code, where for the datapoints with write access the correct READWRITE access level is returned:
Code: Select all
@Override
protected void readNonValue(ServiceContext serviceContext,
NodeId nodeId, UaNode node, UnsignedInteger attributeId,
DataValue dataValue) throws StatusException
{
...
else if (attributeId.equals(Attributes.UserAccessLevel))
{
long lowerId = ((UUID) dataPoint.getNodeId().getValue()).getLeastSignificantBits();
if (OPCLowerNodeIDType.valueOf(lowerId).isWriteable())
{
value = AccessLevel.getMask(AccessLevel.READWRITE);
}
else
{
value = AccessLevel.getMask(AccessLevel.READONLY);
}
}
...
}
Only the UserAccessLevel is affected in UaExpert. Also before I did not set the user access level manually, it just worked. Now it makes no difference if I set the UserAccessLevel or not for each readNonValue call. Somehow the UserAccessLevel stays READONLY all the time like described.
Hope somebody can help. Thanks
Best regards