oep-client-python 0.0.40__py3-none-any.whl → 0.0.41__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 +1 -1
- oep_client/__main__.py +8 -8
- oep_client/acquire.py +1866 -0
- oep_client/discovery.py +1 -1
- oep_client/link.py +122 -42
- oep_client/pins.py +16 -2
- oep_client/virtual_bench_serve.py +3 -0
- {oep_client_python-0.0.40.dist-info → oep_client_python-0.0.41.dist-info}/METADATA +14 -11
- {oep_client_python-0.0.40.dist-info → oep_client_python-0.0.41.dist-info}/RECORD +12 -11
- {oep_client_python-0.0.40.dist-info → oep_client_python-0.0.41.dist-info}/WHEEL +0 -0
- {oep_client_python-0.0.40.dist-info → oep_client_python-0.0.41.dist-info}/entry_points.txt +0 -0
- {oep_client_python-0.0.40.dist-info → oep_client_python-0.0.41.dist-info}/licenses/LICENSE +0 -0
oep_client/__init__.py
CHANGED
oep_client/__main__.py
CHANGED
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
host's time - the reading with the shortest round trip of n)
|
|
21
21
|
oep restart <probe> [--reopen-s S] (oep.probe.restart: the probe restarts; waits until it is back, its new boot_id)
|
|
22
22
|
|
|
23
|
-
<probe>:
|
|
24
|
-
|
|
23
|
+
<probe>: an OEP address, oep://UNIT_ID[?via=usb|bulk|hid|cdc|net|tcp:HOST:PORT|tty:PATH] (host guide §5.3), or, for a
|
|
24
|
+
probe whose unit_id is not known, a serial port, tcp://HOST[:PORT] (no port: the one DNS-SD finds) or usb (the only one). A change takes the lock (owner "oep settings") and
|
|
25
25
|
ends the session after it; it takes effect at once, and stays over a restart only after `save` (or --save).
|
|
26
26
|
"""
|
|
27
27
|
|
|
@@ -47,7 +47,7 @@ def _open_host(target: str, **kw):
|
|
|
47
47
|
return link.open_host(target, **kw)
|
|
48
48
|
except (OSError, ValueError, ImportError, host.OepError) as e:
|
|
49
49
|
why = " ".join(str(e).split()).rstrip(".") or type(e).__name__
|
|
50
|
-
hint = f" Hint: {USB_HINT}." if isinstance(e, FileNotFoundError) and (target == "usb" or target.startswith("
|
|
50
|
+
hint = f" Hint: {USB_HINT}." if isinstance(e, FileNotFoundError) and (target == "usb" or target.lower().startswith("oep://")) \
|
|
51
51
|
else ""
|
|
52
52
|
raise SystemExit(f"oep: cannot open {target}: {why}.{hint}") from None
|
|
53
53
|
|
|
@@ -81,7 +81,7 @@ def main(argv=None) -> int:
|
|
|
81
81
|
sp.add_argument("--baud", type=int, default=link.BASE_BAUD, help="the boot speed (default 115200)")
|
|
82
82
|
sp.add_argument("--json", action="store_true")
|
|
83
83
|
lt = sub.add_parser("linktest", help="measure the link: traffic patterns at rates the host asks for, what breaks")
|
|
84
|
-
lt.add_argument("probe", help="a probe: a serial port, tcp://HOST:PORT or usb
|
|
84
|
+
lt.add_argument("probe", help="a probe: oep://UNIT_ID[?via=...], a serial port, tcp://HOST:PORT or usb")
|
|
85
85
|
lt.add_argument("--rates", default="", help="comma-separated rates to switch to with port_speed and measure at "
|
|
86
86
|
"(each on its own; 0 or 'now' = the speed in force). Default: only the speed in force")
|
|
87
87
|
lt.add_argument("--patterns", default="in,out,duplex", help="in (probe->host), out (host->probe), duplex")
|
|
@@ -96,7 +96,7 @@ def main(argv=None) -> int:
|
|
|
96
96
|
lt.add_argument("--json", action="store_true", help="one JSON object per cell")
|
|
97
97
|
pn = sub.add_parser("pins", help="find where a target is wired: classify the channels, scan the wire, find the "
|
|
98
98
|
"reset line, suggest labels (writes nothing without --save)")
|
|
99
|
-
pn.add_argument("probe", help="a probe: a serial port, tcp://HOST:PORT or usb
|
|
99
|
+
pn.add_argument("probe", help="a probe: oep://UNIT_ID[?via=...], a serial port, tcp://HOST:PORT or usb")
|
|
100
100
|
pn.add_argument("--power", type=int, help="the gpio channel that powers the target: switched off, then on, to "
|
|
101
101
|
"see which channels follow it (never touched without this)")
|
|
102
102
|
pn.add_argument("--exclude", default="", help="channels never to read, scan or hold, comma-separated")
|
|
@@ -116,11 +116,11 @@ def main(argv=None) -> int:
|
|
|
116
116
|
"<name>.swio), <name>.nrst, <name>.power_hi; the probe is then opened as oep://<unit_id>/<name>")
|
|
117
117
|
pn.add_argument("--json", action="store_true", help="the report as JSON (the steps' lines go to stderr)")
|
|
118
118
|
ck = sub.add_parser("clock", help="the probe's clock (fn 0 clock, core §7.6) against this host's: lock-free")
|
|
119
|
-
ck.add_argument("probe", help="a probe: a serial port, tcp://HOST:PORT or usb
|
|
119
|
+
ck.add_argument("probe", help="a probe: oep://UNIT_ID[?via=...], a serial port, tcp://HOST:PORT or usb")
|
|
120
120
|
ck.add_argument("-n", type=int, default=8, help="readings; the one with the shortest round trip is kept (default 8)")
|
|
121
121
|
ck.add_argument("--json", action="store_true")
|
|
122
122
|
rs = sub.add_parser("restart", help="restart the probe (oep.probe.restart, optional) and wait until it is back")
|
|
123
|
-
rs.add_argument("probe", help="a probe: a serial port, tcp://HOST:PORT or usb
|
|
123
|
+
rs.add_argument("probe", help="a probe: oep://UNIT_ID[?via=...], a serial port, tcp://HOST:PORT or usb")
|
|
124
124
|
rs.add_argument("--force", action="store_true", help="take the lock from its holder")
|
|
125
125
|
rs.add_argument("--reopen-s", type=float, default=0.0, metavar="S",
|
|
126
126
|
help="when the probe is not back within its restart_max_ms, open it again for up to S more seconds "
|
|
@@ -138,7 +138,7 @@ def main(argv=None) -> int:
|
|
|
138
138
|
d = sub.add_parser("dump", help="list and describe every interface a probe offers")
|
|
139
139
|
src = d.add_mutually_exclusive_group(required=True)
|
|
140
140
|
src.add_argument("--virtual", choices=sorted(virtual_bench.PROFILES), help="an in-process virtual bench (no hardware)")
|
|
141
|
-
src.add_argument("--port", help="a probe: a serial port, tcp://HOST:PORT or usb
|
|
141
|
+
src.add_argument("--port", help="a probe: oep://UNIT_ID[?via=...], a serial port, tcp://HOST:PORT or usb (lock-free reads only)")
|
|
142
142
|
d.add_argument("--prefix", default="", help="only names under this namespace (label boundaries)")
|
|
143
143
|
d.add_argument("--exact", action="store_true", help="the prefix is a whole name")
|
|
144
144
|
d.add_argument("--json", action="store_true", help="machine-readable output")
|