MCPcopy Create free account
hub / github.com/FastLED/FastLED / read_lines

Method read_lines

ci/util/ble_interface.py:98–116  ·  view source on GitHub ↗

Async iterator yielding lines received via BLE NOTIFY. Args: timeout: Maximum time to wait for lines in seconds. Yields: Lines from BLE notifications (stripped of whitespace).

(self, timeout: float)

Source from the content-addressed store, hash-verified

96 await self._client.write_gatt_char(BLE_CHAR_RX_UUID, payload, response=True)
97
98 async def read_lines(self, timeout: float) -> AsyncIterator[str]:
99 """Async iterator yielding lines received via BLE NOTIFY.
100
101 Args:
102 timeout: Maximum time to wait for lines in seconds.
103
104 Yields:
105 Lines from BLE notifications (stripped of whitespace).
106 """
107 deadline = asyncio.get_event_loop().time() + timeout
108 while True:
109 remaining = deadline - asyncio.get_event_loop().time()
110 if remaining <= 0:
111 break
112 try:
113 line = await asyncio.wait_for(self._rx_queue.get(), timeout=remaining)
114 yield line
115 except asyncio.TimeoutError:
116 break

Callers 8

run_ble_autoresearchFunction · 0.95
_wait_for_responseMethod · 0.45
run_testMethod · 0.45
run_monitorFunction · 0.45
drain_boot_outputMethod · 0.45
send_and_matchMethod · 0.45
_wait_for_responseMethod · 0.45
wait_for_signalFunction · 0.45

Calls 3

timeMethod · 0.80
wait_forMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected