Topic RSS9:30, EEST
June 2, 2019
OfflineHello,
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
Offline16:08, EEST
June 2, 2019
OfflineHi,
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
OfflineHello,
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.
1 Guest(s)

Log In
Register