class documentation
class BaseUaObject(Generic[
Constructor: BaseUaObject(name, segment, server, parent, ...)
Base class for all UA objects, both client- and server-side.
| Method | __init__ |
Cooperative constructor. |
| Method | find |
Return all objects below this one whose path matches the relative glob pattern, e.g. "**/SkillSet/*". |
| Method | parent |
Set the parent of the UA object. Given parent must be an instance of BaseUaObject. |
| Method | resolve |
Return the object at relative below this one, e.g. "Components/Gripper". |
| Method | resolve |
Return the object at relative below this one, or None. |
| Method | server |
Undocumented |
| Method | ua |
Set main OPC UA node to an existing node (due to XML import, etc.). Only possible once. |
| Property | aliases |
Further paths of this object, e.g. of a variable also listed in other containers; path is canonical. |
| Property | full |
Undocumented |
| Property | logger |
Logger associated with the UaObject instance. |
| Property | name |
Name of the object. |
| Property | parent |
Return the untyped parent of the UA object. |
| Property | path |
Return the full path of the object: the parent's path, the OpenSMI folder (if any) and the segment. |
| Property | server |
Return the associated server. |
| Property | ua |
Return the internal OPC UA node. |
| Static Method | _check |
Undocumented |
| Method | _absolute |
Undocumented |
| Method | _add |
Add path as a further path of this object; server.resolve() finds it once the object has a node. |
| Method | _set |
Set the parent; subclasses overriding the parent setter call this instead of setting _parent. |
| Class Variable | _folder |
OpenSMI folder between the parent and this object in the path, e.g. "SkillSet"; None for none. |
| Instance Variable | _aliases |
Undocumented |
| Instance Variable | _logger |
Undocumented |
| Instance Variable | _name |
Undocumented |
| Instance Variable | _parent |
Undocumented |
| Instance Variable | _segment |
Undocumented |
| Instance Variable | _server |
Undocumented |
| Instance Variable | _ua |
Undocumented |
def __init__(self, *, name:
str | None = None, segment: str | None = None, server: _ServerType | None = None, parent: BaseUaObject[ _ServerType] | None = None, **kwargs):
¶
Cooperative constructor.
| Parameters | |
name:str | None | The name of the UA object, as on the server (may be empty on servers we don't control; the segment never is). Defaults to the class name. |
segment:str | None | The last segment of the object's path. Defaults to the sanitized name; clients pass the unique segment from opensmi.core.paths.unique_segments(). |
server:_ServerType | None | The associated server of the UA object. Note that there must be at least one non None in the hierarchy. |
parent:BaseUaObject[ | The parent of the UA object. Only Machines are allowed to have no parent. Can be set later before asynchronous initialization. |
| **kwargs | Undocumented |
Return all objects below this one whose path matches the relative glob pattern, e.g. "**/SkillSet/*".
| Raises | |
ValueError | If pattern starts with / or is no valid pattern. |
Return the object at relative below this one, e.g. "Components/Gripper".
| Raises | |
KeyError | If no object has this path. |
ValueError | If relative starts with / or is no valid relative path. |
Return the object at relative below this one, or None.
| Raises | |
ValueError | If relative starts with / or is no valid relative path. |
Further paths of this object, e.g. of a variable also listed in other containers; path is canonical.
Set the parent; subclasses overriding the parent setter call this instead of setting _parent.
| Raises | |
RuntimeError | If the object already has a node: its path is registered and must not change. |