How to find the typedefination of a node

Unified Architecture topics related to OPC UA Specification, compliant behavior and any technical issues of OPC UA, like Security, Information Model, Companion Specs DI, PLCopen, ADI, ...

Moderator: Support Team

Post Reply
milublues
Sr. Member
Sr. Member
Posts: 13
Joined: 12 Mar 2014, 10:50

How to find the typedefination of a node

Post by milublues »

Hello,

While adding a node in the object tree, I want to check the type definition of the parent node. If it satisfies the condition , then only we can add else not.
My prob. is how to check the type definition there.

For ex.
say, I have a node of type XYZ.
Now, I am adding a node in my object tree and the user have given me following information
Node To Add :---- NewNode
Parent Node :---- ParentNode (i;e the new node will be added below parent node )

Here, I want to check if the ParentNode Type definition is XYZ. If so, I will add the node else not.

Now, How can I check the type definition of parent Node ?

Regards
Milan

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

Re: How to find the typedefination of a node

Post by Support Team »

Hi Milan,

If you have the NodeId of the parent node you can just call Browse with a reference type filter set to the HasTypeDefinition.

If you have a Node object in a server SDK, the availability of a simplified access depends on the SDK. In the C++ SDK, there is a getter for the TypeDefinition NodeId.

Best Regards,
Unified Automation Support Team

Post Reply