UserAccessLevel Problems with UaExpert

Questions regarding the use of the Java SDK for Server or Client development or integration into customer products ...

Moderator: uasdkjava

Post Reply
tooLate
Sr. Member
Sr. Member
Posts: 10
Joined: 10 Jun 2013, 15:09

UserAccessLevel Problems with UaExpert

Post by tooLate »

Hello,

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);
                        }
                    }
                    ...
        }
I might add that the WriteMask and UserWriteMask are 0 and I dont override a writeNonValue method. So I think that overwriting my attributes (nonValues) should not be possible.

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

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: UserAccessLevel Problems with UaExpert

Post by Support Team »

Hello,

The problem seems to be that IoManager.readNonValue is no longer called for UserAccessLevel.

It would be better to override getUserAccessLevel().

readNonValue is still called for AccessLevel, but it is also easier to handle it in getAccessLevel().

Best regards
Support Team

tooLate
Sr. Member
Sr. Member
Posts: 10
Joined: 10 Jun 2013, 15:09

Re: UserAccessLevel Problems with UaExpert

Post by tooLate »

Thank you, that did it for me.

Best regards

Post Reply