I feel like I'm missing something obvious here.
When I am browsing a service's namespace, UaSession::browse returns a list of OpcUa_ReferenceDescription structures that contain the mandatory parts of the base nodeclass information (part 3, section 5.2.1, table 2 of the spec). How do I retrieve additional information about that node? If the node is an object, for instance, how would I retrieve the Table 6 object nodeclass data so I can check the EventNotifier value?
I want to be able to indicate to the user which nodes support subscriptions, and there's probably other information in the subclasses that would be useful, too.
Getting node sub-class data while browsing
Moderator: uasdkcpp
-
- Jr. Member
- Posts: 4
- Joined: 01 Aug 2016, 16:00
- Support Team
- Hero Member
- Posts: 3071
- Joined: 18 Mar 2011, 15:09
Re: Getting node sub-class data while browsing
Hello aaronmj,
as you already mentioned the Browse service does only return the mandatory attributes common to all nodes.
To read any attribute from a node you need to use the Read service.
You find some sample code here:
http://documentation.unified-automation ... son01.html
Best Regards
Unified Automation Support Team
as you already mentioned the Browse service does only return the mandatory attributes common to all nodes.
To read any attribute from a node you need to use the Read service.
You find some sample code here:
http://documentation.unified-automation ... son01.html
Best Regards
Unified Automation Support Team
-
- Jr. Member
- Posts: 4
- Joined: 01 Aug 2016, 16:00
Re: Getting node sub-class data while browsing
Cool!
What about properties, though? The read function only appears to support attributes.
What about properties, though? The read function only appears to support attributes.
- Support Team
- Hero Member
- Posts: 3071
- Joined: 18 Mar 2011, 15:09
Re: Getting node sub-class data while browsing
Hello aaronmj,
Properties are Server-defined characteristics of Objects, DataVariables and other Nodes. A Property is a subtype of the BaseVariableType with the restriction that it can't have any further children. That means any other Node can have Property Nodes as children.
Again you can use the Browse Service (or TranslateBrowsePathToNodeIds service) to detect the Nodes and the Read service to get the attributes of the Property Nodes.
There is no extra service to Read or detect Properties.
Best Regards
Unified Automation Support Team
Properties are Server-defined characteristics of Objects, DataVariables and other Nodes. A Property is a subtype of the BaseVariableType with the restriction that it can't have any further children. That means any other Node can have Property Nodes as children.
Again you can use the Browse Service (or TranslateBrowsePathToNodeIds service) to detect the Nodes and the Read service to get the attributes of the Property Nodes.
There is no extra service to Read or detect Properties.
Best Regards
Unified Automation Support Team