From 71b84525ddffe053b4409ab42a6f6fa2e6f50b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Tue, 23 Jan 2024 16:49:34 +0100 Subject: [PATCH] updates DeviceConnection docstring --- .../components/device_connection/device_connection.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pydase/components/device_connection/device_connection.py b/src/pydase/components/device_connection/device_connection.py index 31c0888..5153715 100644 --- a/src/pydase/components/device_connection/device_connection.py +++ b/src/pydase/components/device_connection/device_connection.py @@ -15,7 +15,13 @@ class DeviceConnection(pydase.DataService, ABC): connection status. An instance of this class automatically starts a task that periodically checks the - device's availability and attempts reconnection if necessary. + device's availability and attempts reconnection if necessary. The periodicity can be + controlled by setting `self._handle_connection_wait_time`, e.g. + + >>> class MyConnection(pydase.components.DeviceConnection): + ... def __init__(self) -> None: + ... self._handle_connection_wait_time = 20.0 # only check every 20 seconds + ... ... In the frontend, this class is represented without directly exposing the `connect` method and `connected` attribute. Instead, it displays user-defined attributes,