class documentation
class RemoteServer(BaseServer[
Constructor: RemoteServer(url, username, password, application_uri, ...)
The remote interface for a server-side Server.
After connecting to a server for the first time, it's address space needs to be browsed. If your application only requires certain parts of the address space, i.e. only components, you can skip unnecessary browsing by setting the browse_* options of the constructor accordingly. This will speed up the connection speed.
| Async Method | __aenter__ |
Enter the asynchronous context manager. |
| Async Method | __aexit__ |
Exit the asynchronous context manager and shut down the server. |
| Method | __init__ |
Create new RemoteServer instance. |
| Async Method | connect |
Connect to the remote server. |
| Async Method | disconnect |
Disconnect from the remote server. |
| Async Method | ua |
Undocumented |
| Instance Variable | logger |
Undocumented |
| Instance Variable | status |
Fired each time the status of the remote server is changed. |
| Instance Variable | subscription |
Undocumented |
| Instance Variable | time |
Fired each time the remote server time updates. Can be used for checking if the connection is alive. |
| Property | browse |
Browse rules for automatically recursively browsing the remote server. |
| Property | connected |
Whether we are currently connected to the remote module. |
| Property | machines |
Provide all available machines in dictionary form using the name of the machine as the key. |
| Property | path |
Always /. |
| Property | status |
Return the status of the client. |
| Property | ua |
Return the internal OPC UA client. Make sure you know what you are doing. |
| Property | username |
Username used to connect to the remote server. |
| Async Method | _browse |
Iterate through all machines. |
| Async Method | _connect |
Undocumented |
| Async Method | _set |
Undocumented |
| Async Method | _set |
Undocumented |
| Async Method | _setup |
Undocumented |
| Async Method | _status |
Undocumented |
| Async Method | _write |
Undocumented |
| Instance Variable | _application |
Undocumented |
| Instance Variable | _browse |
Undocumented |
| Instance Variable | _machines |
Undocumented |
| Instance Variable | _security |
Undocumented |
| Instance Variable | _state |
Undocumented |
| Instance Variable | _status |
Undocumented |
| Instance Variable | _ua |
Undocumented |
| Instance Variable | _ua |
Undocumented |
| Instance Variable | _username |
Undocumented |
def __init__(self, url:
str, *, username: str, password: str, application_uri: str | None = None, timeout: float = 10.0, watchdog_interval: float = 1.0, auto_reconnect: bool = True, reconnect_max_delay: float = 30.0, reconnect_request_timeout: float = 60.0, security_policy: SecurityPolicyType = SecurityPolicyType.NoSecurity, browse_rules: Iterable[ BrowseRule] | None = None):
¶
Create new RemoteServer instance.
| Parameters | |
url:str | The URL of the OPC UA server to connect to, i.e. opc.tcp://localhost:4843/ |
username:str | Username used for authentication of the given OPC UA server. |
password:str | Password used for authentication of the given OPC UA server. |
applicationstr | None | Undocumented |
timeout:float | Timeout in seconds for connection tries. |
watchdogfloat | Undocumented |
autobool | Whether to automatically reconnect when connection to remove server is lost. |
reconnectfloat | How many seconds maximum to wait before reconnect (Exponential backoff). |
reconnectfloat | How long requests block waiting for the connection to be ready. |
securitySecurityPolicyType | OPC UA security policy used for the connection. Default: No security policy. |
browseIterable[ | The browse rules for automatic browsing. Browse everything by default (None), an empty iterable means browse nothing. |
Connect to the remote server.
| Raises | |
ConnectionError | if connection could not be established after max_retries. |
time_updated =
¶
Fired each time the remote server time updates. Can be used for checking if the connection is alive.