Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nix/lock.x86_64-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,4 @@
}
},
"invalidationHash": "272066a7710bd8e92f6f9a334e589f1cc7645e0f863d09f55c8000b0665f0065"
}
}
5 changes: 1 addition & 4 deletions benchkit/communication/extensions/status.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
# Copyright (C) 2026 Vrije Universiteit Brussel. All rights reserved.
# SPDX-License-Identifier: MIT


class StatusAware:
"""
Abstract class for communication layers that are aware of their connection status.
"""


def is_open(self) -> bool:
"""
Returns whether the communication layer is open.
"""
...


def start_comm(self) -> None:
"""
Starts the communication layer.
"""
...


def close_comm(self) -> None:
"""
Performs checks then, closes the communication layer.
"""
...


def _unchecked_close_comm(self) -> None:
"""
Closes the communication layer without checking whether it is open.
Expand Down
10 changes: 7 additions & 3 deletions benchkit/communication/uart.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,13 @@ def listen(
"""
Listen to the UART for a given amount of time and return the output.
Args:
chunk_size (int, optional): number of bytes to read at a time. Defaults to 16.
timeout (float, optional): number of seconds to listen for. Defaults to 1.
timeout_per_input (bool, optional): whether to reset the timeout after each input is received. Defaults to False.
chunk_size (int, optional):
number of bytes to read at a time. Defaults to 16.
timeout (float, optional):
number of seconds to listen for. Defaults to 1.
timeout_per_input (bool, optional):
whether to reset the timeout after each input is received.
Defaults to False.
Returns:
str: the output received from the UART.
"""
Expand Down
Loading