oep-client-python 0.0.11__py3-none-any.whl → 0.0.12__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
oep_client/__init__.py CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "0.0.11"
5
+ __version__ = "0.0.12"
oep_client/capture.py CHANGED
@@ -287,6 +287,10 @@ class LogicCapture(Interface):
287
287
  def stop(self) -> None:
288
288
  self._call(self.STOP)
289
289
 
290
+ def force(self) -> None:
291
+ """Waiting for the trigger: start now (the segment's trigger_index marks where)."""
292
+ self._call(self.FORCE)
293
+
290
294
  def status(self) -> tuple[int, int, int, int]:
291
295
  """-> state, segments done, write position, flags."""
292
296
  return m.Reader(self._call(self.STATUS, locked=False).payload).take("BIQB")
@@ -301,10 +305,15 @@ class LogicCapture(Interface):
301
305
  rd.tail()
302
306
  return out
303
307
 
304
- def wait(self, timeout: float = 5.0) -> list[Segment]:
305
- """Poll status until the one-shot is done (or failed). -> its segments."""
308
+ def wait(self, timeout: float = 5.0, keepalive_s: float = 1.0) -> list[Segment]:
309
+ """Poll status until the one-shot is done (or failed). -> its segments. Waiting for a trigger may take longer
310
+ than the lease: the lock is kept alive every `keepalive_s` (status needs no lock, so it does not)."""
306
311
  deadline = time.monotonic() + timeout
312
+ kept = time.monotonic()
307
313
  while time.monotonic() < deadline:
314
+ if keepalive_s and self.host.session is not None and time.monotonic() - kept >= keepalive_s:
315
+ self.host.keepalive()
316
+ kept = time.monotonic()
308
317
  state = self.status()[0]
309
318
  if state == STATE["done"]:
310
319
  return self.segments()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: oep-client-python
3
- Version: 0.0.11
3
+ Version: 0.0.12
4
4
  Summary: Open Embedded Probe (OEP) v1 host: serial / USB / TCP transports, the session rules, the standard interfaces, and a fake probe
5
5
  Project-URL: Homepage, https://github.com/Open-Embedded-Probe/oep-client-python
6
6
  Project-URL: Repository, https://github.com/Open-Embedded-Probe/oep-client-python
@@ -1,7 +1,7 @@
1
- oep_client/__init__.py,sha256=zoER3jPklFrVtO-a1b4O46Z4-FPJ7LPOyGzhFNc2HoQ,164
1
+ oep_client/__init__.py,sha256=YvJHYTjvF0MlHW--fxOEg7Csbh7ecalzfHDJu3T9umk,164
2
2
  oep_client/__main__.py,sha256=qtVGdpAHULBtLY2SedabJf-uwDZZhMf_YmrbqRzM57U,14669
3
3
  oep_client/arm.py,sha256=JLyUhLSPcmsk73schZcaJYoOKuHzrvnU8kPmfrEvVuo,12331
4
- oep_client/capture.py,sha256=mL_C2_5hK9D9nR_F4f4YNN-uaRVegMN-8vnwHR7rQkg,24962
4
+ oep_client/capture.py,sha256=e4GtLr4DpZQKngJnm4KLqK7TztL3FCbLa-JoVwfyMHw,25501
5
5
  oep_client/catalog.py,sha256=EqAQnSgHFxGbCO2GQ_Ee-uheJKbBBUUpL1-0qHfNMXU,6574
6
6
  oep_client/ch32_flash.py,sha256=Fc-6jEj15cQtMSKmfC5dmDetMXJ8hAdAuJ9d9odwrsA,12651
7
7
  oep_client/cobs.py,sha256=hqddQI_X7rsBvBvcP_MBE3bXPyB13-Azjqp_9JfdQ1g,2288
@@ -30,8 +30,8 @@ oep_client/rp2350.py,sha256=7OMyj270k3AY1e3-ljicPwOjf9jOlokbT6QNkA0b0yY,4227
30
30
  oep_client/target.py,sha256=R8BvYfFfYNhZF0MysJkNb8b69YgBlmeGXNX8ReZIe5k,1068
31
31
  oep_client/uiapduino.py,sha256=IEPG3LbZPksi8g3wmAf6T0CRWSfYKW1_qrH_GBVQdxY,6090
32
32
  oep_client/usb_stream.py,sha256=VJMCxsOlQCk005FcS92pqTh33fRSFBizoL__L0VbUMA,10242
33
- oep_client_python-0.0.11.dist-info/METADATA,sha256=yLSFf7KWp9QQormUfUeR-SBbpdmvH9tFqVl00QZVPDg,8590
34
- oep_client_python-0.0.11.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
35
- oep_client_python-0.0.11.dist-info/entry_points.txt,sha256=h6_8QX89Ww1ogALEGG5g4kspT3IOV6O51lwKqf5BWco,49
36
- oep_client_python-0.0.11.dist-info/licenses/LICENSE,sha256=ntlalztb3L1OaNAxmQdHlubu5fVhjMc9oRZi3PeQhXg,1076
37
- oep_client_python-0.0.11.dist-info/RECORD,,
33
+ oep_client_python-0.0.12.dist-info/METADATA,sha256=pk-QatI6HI-xSEd4Nq4f2ek3dRH79yP-52VteuvI1cY,8590
34
+ oep_client_python-0.0.12.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
35
+ oep_client_python-0.0.12.dist-info/entry_points.txt,sha256=h6_8QX89Ww1ogALEGG5g4kspT3IOV6O51lwKqf5BWco,49
36
+ oep_client_python-0.0.12.dist-info/licenses/LICENSE,sha256=ntlalztb3L1OaNAxmQdHlubu5fVhjMc9oRZi3PeQhXg,1076
37
+ oep_client_python-0.0.12.dist-info/RECORD,,