OPCUA Node questions

Hi Forum,

I am currently working with your C# OPCUA package.

When I create a new ServerIntegerNode with:

public ServerIntegerNode(int namespaceIndex, string identifier, VariableType variableType, IServerNode parent);

the NodeID is identified by a ā€˜sā€™ which as far as I am aware is the identifier for strings in OPCUA.

Thus when I call the BrowseChildren() I get a collecton of IClientNodes which all have a NodeID as property.
As mentioned above even a IntegerNode has the tag for a string set in this NodeID, thus I cant tell what datatypes my queried nodes have.

How can I find out, which datatype the IClientNodes have after calling BrowseChildren()?

Thank you!

Hi @rtpeuqinu

all Nodes in our OPCUA package have the same identifier type no matter the actual node type.
The IdentifierType only indicates, which datatype should be used to represent the NodeId.
We decided to go with strings for all NodeIds.

If you want to find out which type the IClientNodes in the collection you get from BrowseChildren() have, you can simply go with Object.GetType().

I hope this helps.

Cheers
Chris

1 Like

Hi @Chris ,

thank you, I only found the datatype property in the python documentation and the GetType() in the C++ documentation and was looking for a equivalent in C# but couldnt find one.

Thank you for pointing me in the right direction.