9:30, EEST
June 2, 2019
Hello,
I have a server with objects/ nodes of different type definitions, spread across different folders. I need to list out all the nodes spread out inthe address space having a particular typedefinition. Which functionality of the SDK would help me herre?
Eg: Root
(1)Objects
Device
Boiler
Temperature –(A Type)
Pressure—(B TType)
Data (A Type)
Vendor
Manufacturer
Name –(A Type)
A structure like above. I have managed to get the NodeIDs of the Types. Need uidance on how to filter the browsing of address space. Please let me know
Regards,
Rakshan.
8:22, EEST
Moderators
February 11, 2020
16:08, EEST
June 2, 2019
Hi,
Going by your explnation, suppose if A type has the NodeId( ns=2. i=1010), and i have collected all nodes inside the object folder in a a collection,
Now I run a loop for all the items in the collection, and I want to compare their typeDefinitions to that of the A type.
Is my understanding of your suggestion correct?
List rf = client.getaddressspace().browse(new nodeId(2,1010)), browseDirection.inverse, Identifier.hasTypedefinition)
This should refer to the type definition having of the type(ns=2,i=1010)
Please let me know if my understanding is correct.
Regards,
Rakshan
8:53, EEST
Moderators
February 11, 2020
Hello,
You originally asked how to get a list of ALL Nodes with particular TypeDefinition. You can do that with the UaClient.getAddressSpace.browse(NodeId nodeId, BrowseDirection direction, NodeId referenceType) method as I told you.
If you need to further filter the search by only selecting the Nodes that are contained in a specific Folder, you would need to call the browse method again for that Folder and then make an intersection of the lists returned by the methods.
You shouldn’t need to loop the Nodes one by one.
Most Users Ever Online: 1919
Currently Online:
22 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 735
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1