oep-client-python 0.0.11__tar.gz → 0.0.12__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.
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/CHANGELOG.md +4 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/PKG-INFO +1 -1
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/pyproject.toml +1 -1
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/__init__.py +1 -1
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/capture.py +11 -2
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/tests/test_fake_capture.py +13 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/.gitignore +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/LICENSE +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/README.ja.md +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/README.md +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/__main__.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/arm.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/catalog.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/ch32_flash.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/cobs.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/config.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/console.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/core.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/decode.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/dump.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/endpoint.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/esp32_targets.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/fake.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/fake_capture.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/fake_serial.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/fake_serve.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/fixture.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/frames.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/hid_stream.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/host.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/interfaces.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/link.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/message.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/names.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/registry.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/riscv.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/rp2350.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/target.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/uiapduino.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/src/oep_client/usb_stream.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/tests/test_capabilities.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/tests/test_capture.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/tests/test_cobs.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/tests/test_config.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/tests/test_esp32_targets.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/tests/test_fake_spec.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/tests/test_flash_console.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/tests/test_hid_stream.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/tests/test_interfaces.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/tests/test_link_host.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/tests/test_link_serial.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/tests/test_session.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/tests/test_target_parts.py +0 -0
- {oep_client_python-0.0.11 → oep_client_python-0.0.12}/tests/test_usb_stream.py +0 -0
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.0.12
|
|
6
|
+
- (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.
|
|
7
|
+
- (JA) `LogicCapture.force()`: トリガを待っていれば、今すぐ始める。`wait()` は待つ間ロックを保つ(`keepalive_s`、既定 1 秒)。トリガはリースより後に来ることがある。
|
|
8
|
+
|
|
5
9
|
## 0.0.11
|
|
6
10
|
- (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
11
|
- (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.
|
|
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
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "oep-client-python"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.12"
|
|
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"
|
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|