udpscope: an oscilloscope view for a UDPStreamer source
GTK4 and libadwaita. It receives one UDP stream through the vendored udpsclient, buffers it in a large ring, and draws it with the vendored plotter: a trigger with a pre/post event window, a pause that freezes the window, cursors, measurements, math channels in a node editor, an event cache, named configurations, preferences, and an export of the visible window to .npy/.csv. Waveform files can be opened and analysed in place. The interface is two threads -- a producer that owns the socket and the GTK main thread that owns every widget and the GL context -- sharing one model under one mutex, with samples crossing through lock-free rings. deps/plotter is a submodule pinned to the commit this tree builds against; deps/udpsclient is vendored in place. docs/claude/ documents the rules that cost a defect to learn, and SPECS.md is the requirement document.
This commit is contained in:
1 parent
8f54841c2c
commit
0e256764d5
41 files changed
+2081
-154
No files matched your search
@@ -455,7 +455,7 @@ Trigger mode keeps the last **32 triggered acquisitions** in a cache, so an even
|
||||
time to look at is still there:
|
||||
|
||||
```
|
||||
~/.cache/udpscope/192.168.1.40-8000/events/
|
||||
~/.cache/udpscope/events/192.168.1.40-8000/
|
||||
20261009-123250-0001.npy # the event, in the export format
|
||||
20261009-123250-0001.txt # when, how long, how many signals, the rate, the edge
|
||||
20261009-123250-0001.bmp # a picture of it, drawn from the samples
|
||||
@@ -600,6 +600,28 @@ A session written before configurations existed is imported on first use as the
|
||||
named `default`: copied into the directory, remembered as active, and the old file renamed to
|
||||
`<host>_<port>.toml.imported` rather than deleted, so the import can be undone by hand.
|
||||
|
||||
## Preferences
|
||||
|
||||
`~/.config/udpscope/settings.toml`, written by **Preferences…** -- in the overflow menu or the source
|
||||
chooser -- and read at start-up. It holds the event cache's directory, how many events to keep (`0`
|
||||
keeps every one), whether relative time is on, and the interface's theme. Whether anything is cached at
|
||||
all is the trigger pane's own switch, and there is deliberately no second one here; the directory is
|
||||
the one place every source gets a folder inside, `<cache>/udpscope/events` by default. The cache
|
||||
directory and relative time are *start-up* settings -- the buffers are planned and the cache directory
|
||||
is opened before any source is known -- and the dialog says so; the theme applies as soon as it is
|
||||
chosen. A key that is absent means its default, so the file only mentions what changed, and a missing
|
||||
file is a first run rather than an error. The directory field shows the directory in use: the default
|
||||
is filled in rather than described, and typing it back leaves the setting unset, so it goes on
|
||||
following the cache directory instead of pinning one path for good. It can be typed, or picked with the folder
|
||||
button beside it, which writes what it found into the same field -- the field stays the one value, and
|
||||
there is nothing to keep in step.
|
||||
|
||||
The same dialog is reachable from the source chooser, the one window that exists before a run is
|
||||
planned. From the app the cache directory and relative time take effect on the next start; from the
|
||||
chooser they reach the run about to start. A preference applied there also beats a source's stored
|
||||
configuration, exactly as `--relative-time` does: it is the more recent statement of intent, and it
|
||||
works in both directions, so turning relative time off in the dialog is not undone by the row you click
|
||||
afterwards.
|
||||
## The session layout file
|
||||
|
||||
A configuration's file holds the display
|
||||
|
||||
Reference in new issue
Block a user