From b19b8d37b24ea5b57caa334293e2e45e3c7e1bbf Mon Sep 17 00:00:00 2001 From: appleb_m Date: Wed, 18 Feb 2026 10:56:39 +0100 Subject: [PATCH] pshell_client: added some further ifnoramtion for auto docs --- src/aare/devices/pshell_client.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/aare/devices/pshell_client.py b/src/aare/devices/pshell_client.py index e81a62c3..96caebb7 100644 --- a/src/aare/devices/pshell_client.py +++ b/src/aare/devices/pshell_client.py @@ -12,6 +12,7 @@ except ImportError: class TimeoutException(Exception): + """Timeout Exception raised by wait methods when a requested state or evenet doesn't arrive in time""" pass @@ -21,6 +22,9 @@ except: SSEClient = None class SSEReceiver: + """Background thread that parses incoming SSE (serveer-sent events) via an event thread and dispatches them to subscribers + :param url + :param subscribed_events""" def __init__(self, url, subscribed_events): if SSEClient is None: raise Exception("sseclient library is not installed: server events are not available") @@ -37,6 +41,7 @@ class SSEReceiver: self.thread.start() def task(self): + """SSE event loop task""" try: while not self._stop.is_set(): try: @@ -164,15 +169,18 @@ class SSEReceiver: pass def close(self): + """Close SSE client - stops the thread and closes resources""" self._stop.set() self._close_client() if self.debug: print("closed") def is_closed(self): + """Return True if SSE client is closed""" return self._stop.is_set() class PShellClient: + """High-level REST API wrapper for the P-Shell service""" def __init__(self, url): if not url.endswith('/'): url = url + "/"