Reading a variable: how can I get AccessLevel property

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

Moderator: uasdkcpp

Post Reply
lorenzodelpino
Full Member
Full Member
Posts: 9
Joined: 20 Feb 2017, 09:41

Reading a variable: how can I get AccessLevel property

Post by lorenzodelpino »

Hi,
I'm developing an opc ua client using the C++ SDK.
I read the value of variable but I don't know how to read the AccessLevel and UserAccessLevel property of a node.

Could you help me please?

Thanks in advance.

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

Re: Reading a variable: how can I get AccessLevel property

Post by Support Team »

Hello lorenzodelpino,

when you fill the nodesToRead parameter (that you pass into UaSession::read) you need to specify NodeId and AttributeId.
To read the AccessLevel you specify OpcUa_Attributes_AccessLevel instead of OpcUa_Attributes_Value.
Best regards
Unified Automation Support Team

lorenzodelpino
Full Member
Full Member
Posts: 9
Joined: 20 Feb 2017, 09:41

Re: Reading a variable: how can I get AccessLevel property

Post by lorenzodelpino »

Ok, and I use UaVariant to get the value of OpcUa_Attributes_AccessLevel, as I reading the OpcUa_Attributes_Value?

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

Re: Reading a variable: how can I get AccessLevel property

Post by Support Team »

Hello lorenzodelpino,

what you get back is a list of DataValues - that's defined by the read service:

http://documentation.unified-automation ... 12d5fe9758

It's exactly the same procedure as reading the value attribute.
Best regards
Unified Automation Support Team

lorenzodelpino
Full Member
Full Member
Posts: 9
Joined: 20 Feb 2017, 09:41

Re: Reading a variable: how can I get AccessLevel property

Post by lorenzodelpino »

Ok!
Thanks a lot!

Post Reply