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
@@ -11,11 +11,11 @@
|
||||
- time is simply: `((<N_frame> - <N_last>) * <n_samples_per_frame> - <sample_index>) / <sample rate>` (or something like that)
|
||||
- [x] (3) ~~named configurations~~ **done**: one directory per source holding `<name>.toml` per configuration plus `active`; a configuration carries a note and the startup settings (`buffer_mb`, `relative_time`, `capture_packets`); the chooser lists them and the menu's _Configurations…_ opens/saves/deletes them.
|
||||
- [x] (4) ~~optional udp frame storage for debugging of strange behaviours~~ **done**: `--capture-packets N`; see README and the design note in `docs/superpowers/specs/` for the ring file, the popover toggle and `tools/capture_to_pcap.py`.
|
||||
- [x] (5) ~~open exported binary waveforms to view/analyse~~ **done**: `--open FILE` and the chooser's **Waveforms** page (the files opened before, newest first, plus *Open…*); the `.npy`'s dtype names the columns, so a load restores the signals, the samples and the axis the export had, and every instrument works on it — see README and `docs/claude/invariants-data-path.md`.
|
||||
- [x] (5) ~~open exported binary waveforms to view/analyse~~ **done**: `--open FILE` and the chooser's **Waveforms** page (the files opened before, newest first, plus _Open…_); the `.npy`'s dtype names the columns, so a load restores the signals, the samples and the axis the export had, and every instrument works on it — see README and `docs/claude/invariants-data-path.md`.
|
||||
- [x] (6) ~~imporve right click menu on the plots~~ **done**: the plot's context menu uses the main menu's row style (`menu_button` + `.udpscope-menu`, asserted by `UDPSCOPE_PROBE_ROWMENU_MS`: uniform `label_x=26`, `h=18`, the shortcut flush right), and deleting a signal is a **Remove signal** submenu listing that plot's traces plus _All traces on this plot_.
|
||||
- [ ] (7) in layout edit mode add the option to drag plot border to resize them
|
||||
- [x] (8) ~~add option to automatic save the last <N> triggered acquisitions in a cache folder and let the user replay them~~ **done**: every latch is written to `<cache>/<source>/events/` as a `.npy` (the export format), a `.txt` sidecar and a `.bmp` preview drawn from the samples; the **events pane** (revealed with trigger mode, switchable) lists them with time, duration, signals and rate, shows the preview, replays one through the `--open` loader and has *Live* to go back -- see README and `docs/claude/invariants-trigger-and-pinning.md`.
|
||||
- [ ] (9) preferences dialog:
|
||||
- [ ] (7) in layout edit mode add the option to drag plot border to resize them (sizing should be persistant between sessesions as the layout)
|
||||
- [x] (8) ~~add option to automatic save the last <N> triggered acquisitions in a cache folder and let the user replay them~~ **done**: every latch is written to `<cache>/<source>/events/` as a `.npy` (the export format), a `.txt` sidecar and a `.bmp` preview drawn from the samples; the **events pane** (revealed with trigger mode, switchable) lists them with time, duration, signals and rate, shows the preview, replays one through the `--open` loader and has _Live_ to go back -- see README and `docs/claude/invariants-trigger-and-pinning.md`.
|
||||
- [x] (9) ~~preferences dialog~~ **done**: `src/settings.{hpp,cpp}` (the store: load/save/defaults, GTK-free) + `src/ui_prefs.cpp` (the dialog, opened from the overflow menu); the cache directory and keep count reach `EventStore`, the cache directory (one `events/` directory for every source, each source a folder inside) and the keep count reach `EventStore`, and relative time is a start-up default; whether anything is cached at all stays the trigger pane's own switch. The same dialog opens from the **host selection dialog** too (a `PrefsForm` has no owner, so both windows hold one), where a change still reaches the run about to start.
|
||||
- user can choose evnt cache directory (default <home>/.cache/udpscope/<source>/events/)
|
||||
- maximum number of events to cache
|
||||
- disable completly the events storage option
|
||||
@@ -23,3 +23,8 @@
|
||||
- interface dark/light/auto color
|
||||
- defaults
|
||||
- other parameters
|
||||
|
||||
10. [ ] move the interface into `.ui` resources, and to current GTK4/libadwaita widgets while doing it:
|
||||
- the shortcut overview is **done** (`src/ui/shortcuts.ui`, with the mouse gestures drawn as icons, and `[help]`'s `ui=` against `tables=` as the guard)
|
||||
- next: the preferences (`AdwPreferencesDialog` + `AdwEntryRow`/`AdwSpinRow`/`AdwSwitchRow`), the help window's chrome, the source chooser and its host form, then the main window's skeleton
|
||||
- plan, conventions and acceptance for each slice: `docs/superpowers/plans/2026-10-11-ui-files-and-gtk4-practice.md`
|
||||
Reference in new issue
Block a user