Apr-23-2021, 05:32 PM
(Apr-22-2021, 01:53 PM)ibreeden Wrote: I am not familiar with Jython, so the objects you are using are a bit foreign to me. But I see you are calling "BrowseServer(server, nodeId)" and it seems to work. So nodeID contains a path. Can you try to change "print(nodeName)" on line 15 to "print(nodeId)"? Does that show a useful path?
There's no need to print the nodeID because it'll be the same outcome, except it'll be a string integer for example: "122344".
We use nodeID to identify the folder we are going into because the nodeName is not enough and that's how the opcServer identifies the different element types within its structure.
You don't have to worry about the objects or jython because I can assure you the objects that are being used are going in/out of the server tree in the right path because originally I used a nested for loop but I could only go so far in the tree but the output was in the correct order as I expected . I just couldn't go deeper in the tree that's what brought me to use recursion? Take a look at the code below:
The output is what I want, but I need to go deeper in the tree because there's more folders?
You can take a look at the OPC Browse pane in the image towards the left and then you can look under the "bacnet Port" folder and see more folders I need to grab but the nested for loop is not enough?