C#: How to find/access an ANode (belong to ANodeManager) in BNodeManager|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
C#: How to find/access an ANode (belong to ANodeManager) in BNodeManager
Avatar
Loko Vik
Member
Members
Forum Posts: 15
Member Since:
08/10/2022
sp_UserOfflineSmall Offline
1
11/30/2022 - 08:51
sp_Permalink sp_Print sp_EditHistory

Hello All,

I have following scenario. I have 2 Node Manager as follows ANodeManager (contains ANode) and BNodeManager. Then how can I access/find ANode from BNodeManager. In the end, I want to link an object from BNodeManager to ANode.

 

In BNodeManager, I tried using Find or FindPredefinedNode as shown below. But the result is null.

NodeId nodeId = new NodeId(Objects.ANode, NamespaceIndexofANodeManager);

BaseObjectState ANode = (BaseObjectState)FindPredefinedNode(nodeId, typeof(BaseObjectState));

 

For checking, I also tried to check whether the FindPredefinedNode method work for in ANodeManager. At that time, it find the node correctly.

As per the boiler example, it should works. Am I missing anything here?

Thanks in advance!

Avatar
Loko Vik
Member
Members
Forum Posts: 15
Member Since:
08/10/2022
sp_UserOfflineSmall Offline
2
12/08/2022 - 04:18
sp_Permalink sp_Print

Use a FindNodeInAddressSpace instead of FindPredefinedNode. Also input NodeId with correct Namespace.

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
3
12/08/2022 - 08:35
sp_Permalink sp_Print

You need a reference to ANodeManager in BNodeManager and call a Method on ANodeManager .

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 34
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855