pylabrobot.brooks.precise_flex.PreciseFlexSimulationDriver.read_next_vision_server_result#
- async PreciseFlexSimulationDriver.read_next_vision_server_result(timeout: float | None = None) Tuple[str, bytes] | None#
Read the next complete
(name, data)result off the held image stream, or None at its end.Returns a result already buffered if there is one, otherwise reads until a whole result has arrived. Partial bytes from a timed-out read stay buffered, so the next call resumes frame-aligned. One reader at a time, so concurrent callers take whole results in call order.
- Parameters:
timeout (float | None) – per-read timeout in seconds;
vision_server_timeoutwhen None.- Returns:
The next
(name, data)result, or None if the stream closed before a full result.- Raises:
RuntimeError – If the vision server is not connected.
TimeoutError – if no bytes arrive within
timeout.ValueError – if the stream has desynchronised (see
_drain_named_result).
- Return type: