======= Browser ======= Browser is returned by :func:`ua.Model:browse` method. It is used to browse the address space. .. function:: browser.children() Get the children of the parent node. :returns: Array of browser objects. .. function:: browser.path(pathElements) Resolve a path in the address space starting from the root node. :pathElements: path elements can be a string, table wirh parameters. You can mix strings and tables in the path. * for **strings** and :ref:`QualifiedName` it will browsed hierarhical references * for **tables** it will browsed references by the ReferenceTypeId Parameters for table path element: * **TargetName** - (required, string or :ref:`QualifiedName`) browse name of a node * **ReferenceTypeId** (optional, :ref:`NodeId`, Hierarchical References by default) - type of references to follow. * **IsInverse** (optional, boolean, false by default) - Direction to follow: forward or inverse * **IncludeSubtypes** (optional, boolean, true by default) - Include subtypes of the ReferenceTypeId or not :returns: Browser object. :raises: if the path is not found, or other error occurs. **Examples:** Get one child node by browse name: .. literalinclude:: ../examples/server/server_model_browse.lua :language: lua :linenos: :lines: 17-18 Follow hierarchical references: .. literalinclude:: ../examples/server/server_model_browse.lua :language: lua :linenos: :lines: 22-23 Mix browse names and table parameters: .. literalinclude:: ../examples/server/server_model_browse.lua :language: lua :linenos: :lines: 27-43 `Full source <../_static/server/server_model_browse.lua>`__ .. function:: browser.getNode(nodeId) Get the browser object by identifier. Result object will have methods according to the node class. :nodeId: Node identifier. :returns: Browser object. .. function:: browser.objectsFolder() Returns an node under which all the objects are placed. :nodeId: Node identifier. :returns: Browser object. **Example:** .. literalinclude:: ../examples/server/server_model_browse.lua :language: lua :linenos: :lines: 12-15 `Full source <../_static/server/server_model_browse.lua>`__ .. function:: browser.typesFolder() Returns an node under which all the types are placed. :nodeId: Node identifier. :returns: Browser object. **Example:** .. literalinclude:: ../examples/server/server_model_browse.lua :language: lua :linenos: :lines: 50-57 `Full source <../_static/server/server_model_browse.lua>`__