v0.12.6 #10
+6
-7
@@ -885,13 +885,12 @@ def device_event_blastware_file(
|
|||||||
def _do():
|
def _do():
|
||||||
with _build_client(port, baud, host, tcp_port, timeout=120.0) as client:
|
with _build_client(port, baud, host, tcp_port, timeout=120.0) as client:
|
||||||
info = client.connect()
|
info = client.connect()
|
||||||
# Use full_waveform=True (stop_after_metadata=False) so the device
|
# Use full_waveform=False (stop_after_metadata=True) — downloads until
|
||||||
# signals its own end-of-stream rather than us stopping at "Project:".
|
# "Project:" is found in the 5A stream, which covers the compliance
|
||||||
# BW downloads until natural end-of-stream for each event — for this
|
# metadata section. For simple Continuous/Single-Shot mode events this
|
||||||
# 5-chunk event that gives the correct body + footer. For events with
|
# produces the correct body content. Histogram+Continuous mode requires
|
||||||
# many silence chunks (35+) the file will be larger than BW's, but
|
# different handling (TODO: handle multi-mode events).
|
||||||
# correctness takes priority over size matching for now.
|
events = client.get_events(full_waveform=False, stop_after_index=index)
|
||||||
events = client.get_events(full_waveform=True, stop_after_index=index)
|
|
||||||
matching = [ev for ev in events if ev.index == index]
|
matching = [ev for ev in events if ev.index == index]
|
||||||
return matching[0] if matching else None, info
|
return matching[0] if matching else None, info
|
||||||
ev, info = _run_with_retry(_do, is_tcp=_is_tcp(host))
|
ev, info = _run_with_retry(_do, is_tcp=_is_tcp(host))
|
||||||
|
|||||||
Reference in New Issue
Block a user