Write a Variable node with Current Read accessLevel

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

Moderator: uasdkcpp

Post Reply
RafaelCrespi
Hero Member
Hero Member
Posts: 26
Joined: 22 Jun 2017, 09:41

Write a Variable node with Current Read accessLevel

Post by RafaelCrespi »

Hi,

I have a Variable node with accessLevel=Current Read for access via UaExpert. Now I need to modify the Value Attribute with the
internalSession of the OpcServer. How can I do it without changing the accessLevel for UaExpert?

Thanks a lot,

Rafa Crespí

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

Re: Write a Variable node with Current Read accessLevel

Post by Support Team »

Hello Rafa,

you can't do that using the internalSession because the internal session is doing all the validation and access checks that are also done for service calls coming from a client.

Solution 1:
You configure the NodeAccessInfo on that specific node to only grant write access for a special user and assign that role to the internal session.

Solution 2:
Don't use ServerManager::Write but instead access the Node directly using setValue() for example.
Best regards
Unified Automation Support Team

RafaelCrespi
Hero Member
Hero Member
Posts: 26
Joined: 22 Jun 2017, 09:41

Re: Write a Variable node with Current Read accessLevel

Post by RafaelCrespi »

Hello,

Thanks for the answer, with Solution 2 it worked!

Rafa Crespí

Post Reply