Attempt to find path of node from root node and return it as a list of Nodes. There might several possible paths to a node, this function will return one Some nodes may be missing references, so this method may return an empty list Since address space may hav
(self, max_length=20, as_string=False)
| 404 | return references[0].NodeId |
| 405 | |
| 406 | def get_path(self, max_length=20, as_string=False): |
| 407 | """ |
| 408 | Attempt to find path of node from root node and return it as a list of Nodes. |
| 409 | There might several possible paths to a node, this function will return one |
| 410 | Some nodes may be missing references, so this method may |
| 411 | return an empty list |
| 412 | Since address space may have circular references, a max length is specified |
| 413 | |
| 414 | """ |
| 415 | path = self._get_path(max_length) |
| 416 | path = [Node(self.server, ref.NodeId) for ref in path] |
| 417 | path.append(self) |
| 418 | if as_string: |
| 419 | path = [el.get_browse_name().to_string() for el in path] |
| 420 | return path |
| 421 | |
| 422 | def _get_path(self, max_length=20): |
| 423 | """ |