From 716d0f556d0f5231cf35af961e1317819c9d8e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Bourdeauducq?= Date: Mon, 26 Feb 2024 11:03:59 +0800 Subject: [PATCH] grabber: timeout fixes --- RELEASE_NOTES.rst | 2 +- artiq/coredevice/grabber.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index ed9ca7ca5..04bb5567d 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -46,7 +46,7 @@ Highlights: * MSYS2 packaging for Windows, which replaces Conda. Conda packages are still available to support legacy installations, but may be removed in a future release. * Experiments can now be submitted with revisions set to a branch / tag name instead of only git hashes. -* Grabber image input now has an optional timeout +* Grabber image input now has an optional timeout. Breaking changes: diff --git a/artiq/coredevice/grabber.py b/artiq/coredevice/grabber.py index c17486514..509e84b9a 100644 --- a/artiq/coredevice/grabber.py +++ b/artiq/coredevice/grabber.py @@ -101,8 +101,8 @@ class Grabber: ROI engines that produced output, an exception will be raised during this call or the next. - If the timeout is reached before data is available, a RuntimeError is - raised. + If the timeout is reached before data is available, the exception + GrabberTimeoutException is raised. :param timeout_mu: Timestamp at which a timeout will occur. Set to -1 (default) to disable timeout. @@ -120,5 +120,6 @@ class Grabber: if roi_output == self.sentinel: raise OutOfSyncException if timestamp == -1: - raise GrabberTimeoutException("Timeout retrieving ROIs") + raise GrabberTimeoutException( + "Timeout retrieving ROIs (attempting to read more ROIs than enabled?)") data[i] = roi_output