oep-client-python 0.0.11__tar.gz → 0.0.13__tar.gz

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.
Files changed (54) hide show
  1. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/CHANGELOG.md +8 -0
  2. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/PKG-INFO +1 -1
  3. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/pyproject.toml +1 -1
  4. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/__init__.py +1 -1
  5. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/capture.py +11 -2
  6. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/tests/test_fake_capture.py +13 -0
  7. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/.gitignore +0 -0
  8. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/LICENSE +0 -0
  9. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/README.ja.md +0 -0
  10. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/README.md +0 -0
  11. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/__main__.py +0 -0
  12. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/arm.py +0 -0
  13. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/catalog.py +0 -0
  14. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/ch32_flash.py +0 -0
  15. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/cobs.py +0 -0
  16. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/config.py +0 -0
  17. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/console.py +0 -0
  18. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/core.py +0 -0
  19. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/decode.py +0 -0
  20. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/dump.py +0 -0
  21. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/endpoint.py +0 -0
  22. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/esp32_targets.py +0 -0
  23. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/fake.py +0 -0
  24. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/fake_capture.py +0 -0
  25. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/fake_serial.py +0 -0
  26. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/fake_serve.py +0 -0
  27. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/fixture.py +0 -0
  28. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/frames.py +0 -0
  29. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/hid_stream.py +0 -0
  30. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/host.py +0 -0
  31. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/interfaces.py +0 -0
  32. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/link.py +0 -0
  33. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/message.py +0 -0
  34. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/names.py +0 -0
  35. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/registry.py +0 -0
  36. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/riscv.py +0 -0
  37. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/rp2350.py +0 -0
  38. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/target.py +0 -0
  39. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/uiapduino.py +0 -0
  40. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/src/oep_client/usb_stream.py +0 -0
  41. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/tests/test_capabilities.py +0 -0
  42. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/tests/test_capture.py +0 -0
  43. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/tests/test_cobs.py +0 -0
  44. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/tests/test_config.py +0 -0
  45. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/tests/test_esp32_targets.py +0 -0
  46. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/tests/test_fake_spec.py +0 -0
  47. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/tests/test_flash_console.py +0 -0
  48. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/tests/test_hid_stream.py +0 -0
  49. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/tests/test_interfaces.py +0 -0
  50. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/tests/test_link_host.py +0 -0
  51. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/tests/test_link_serial.py +0 -0
  52. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/tests/test_session.py +0 -0
  53. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/tests/test_target_parts.py +0 -0
  54. {oep_client_python-0.0.11 → oep_client_python-0.0.13}/tests/test_usb_stream.py +0 -0
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.0.13
6
+ - (EN) No user-facing changes recorded.
7
+ - (JA) ユーザー向け変更の記録はありません。
8
+
9
+ ## 0.0.12
10
+ - (EN) `LogicCapture.force()`: waiting for the trigger, start now. `wait()` keeps the lock alive while it waits (`keepalive_s`, default 1 s): a trigger may come later than the lease.
11
+ - (JA) `LogicCapture.force()`: トリガを待っていれば、今すぐ始める。`wait()` は待つ間ロックを保つ(`keepalive_s`、既定 1 秒)。トリガはリースより後に来ることがある。
12
+
5
13
  ## 0.0.11
6
14
  - (EN) The fake analog declares its 16-bit slots as bit 4 of the channels tag (bit i = 2^i, oep-if-capture §3.5).
7
15
  - (JA) 偽の probe のアナログは、16 ビットの枠を channels の tag のビット 4 で宣言する(ビット i = 2^i、oep-if-capture §3.5)。
@@ -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.13
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
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "oep-client-python"
7
- version = "0.0.11"
7
+ version = "0.0.13"
8
8
  description = "Open Embedded Probe (OEP) v1 host: serial / USB / TCP transports, the session rules, the standard interfaces, and a fake probe"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -2,4 +2,4 @@
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "0.0.11"
5
+ __version__ = "0.0.13"
@@ -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()
@@ -75,6 +75,19 @@ def test_a_trigger_is_where_the_channel_does_it(kind, role, value, index):
75
75
  assert seg.trigger_index == index
76
76
 
77
77
 
78
+
79
+ def test_force_is_accepted_and_wait_keeps_the_lock():
80
+ ep, hst, lc, clock = bench()
81
+ core.plan_apply(hst, [(lc.fn, 0, 20), (lc.fn, 1, 21)])
82
+ lc.configure(rate=1_000_000, samples=64, trigger=(c.EDGE, 1, 1))
83
+ lc.start()
84
+ lc.force() # the fake finds its trigger at start: nothing is waiting
85
+ sent = []
86
+ keepalive = hst.keepalive
87
+ hst.keepalive = lambda: (sent.append(1), keepalive())
88
+ (seg,) = lc.wait(keepalive_s=1e-9)
89
+ assert sent and seg.trigger_index is not None
90
+
78
91
  def test_slipped_segments_say_so():
79
92
  ep, hst, lc, _ = bench()
80
93
  ep.capture_slipped = True