From 13beb51a520e9ef6569fff45807bd50d076ce787 Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Thu, 29 Aug 2024 18:19:52 +0200 Subject: [PATCH] feat(endpoint): added stop_all_devices endpoint --- bec_lib/bec_lib/endpoints.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bec_lib/bec_lib/endpoints.py b/bec_lib/bec_lib/endpoints.py index b697e723..4affcb4c 100644 --- a/bec_lib/bec_lib/endpoints.py +++ b/bec_lib/bec_lib/endpoints.py @@ -451,6 +451,21 @@ class MessageEndpoints: message_op=MessageOp.SEND, ) + @staticmethod + def stop_all_devices() -> EndpointInfo: + """ + Endpoint for stopping all devices. This endpoint is used to publish a message + to stop all devices and is used by the scan server's scan queue if a scan queue + modification was requested and accepted and requires to stop all devices. + + Returns: + EndpointInfo: Endpoint for stopping all devices. + """ + endpoint = "internal/queue/stop_all_devices" + return EndpointInfo( + endpoint=endpoint, message_type=messages.VariableMessage, message_op=MessageOp.SEND + ) + @staticmethod def scan_queue_status() -> EndpointInfo: """