WebUI: per-signal vscale toolbar, active-signal highlighting, zoom fix

- Per-signal, per-plot vertical scale state (sigVScale keyed by plotId:signalKey)
  so the same signal in two plots has fully independent vscale config
- Active signal redrawn on top of all series with 2× line width for clear
  visual identification; badge click toggles selection and opens/closes the
  embedded vscale toolbar (click same badge again to deselect)
- Vscale configurator moved from floating popup to a slim toolbar strip
  anchored inside the plot card, with an × close button
- Trigger dropdown shows one entry per array signal with [0…N-1] label;
  opening it shows an index-picker dialog to choose the element
- Zoom resampling: when server returns no data for a zoomed range, fall
  back to the local circular buffer instead of returning empty arrays

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Martino Ferrari
2026-05-27 15:42:00 +02:00
parent b15e637f14
commit 3dd0d863fa
13 changed files with 1508 additions and 231 deletions
@@ -236,7 +236,7 @@ bool UDPStreamerTest::TestInitialise_AutoMode_Valid() {
UDPStreamer ds;
ConfigurationDatabase cdb;
cdb.Write("Port", 44502u);
cdb.Write("PublishingMode", "Auto");
cdb.Write("PublishingMode", "Accumulate");
cdb.Write("MinRefreshRate", 120.0);
cdb.CreateRelative("Signals");
cdb.MoveToRoot();
@@ -248,7 +248,7 @@ bool UDPStreamerTest::TestInitialise_AutoMode_MissingRefreshRate() {
UDPStreamer ds;
ConfigurationDatabase cdb;
cdb.Write("Port", 44503u);
cdb.Write("PublishingMode", "Auto");
cdb.Write("PublishingMode", "Accumulate");
/* MinRefreshRate intentionally omitted */
cdb.CreateRelative("Signals");
cdb.MoveToRoot();
+11 -1
View File
@@ -3,7 +3,9 @@
*
* Three independent RT threads demonstrate all four UDPStreamer time modes:
*
* Thread1 "Streamer" port 44500 (scalar signals, PacketTime)
* Thread1 "Streamer" port 44500 TCP control / 44503 UDP multicast 239.0.0.1
* (scalar signals, auto-accumulated to arrays[10], multicast mode,
* 100 Hz flush = 10 samples per packet, 1 kHz source)
* Counter uint32 cycle counter
* Time uint32 time in microseconds (LinuxTimer, 1 kHz)
* Sine1 float32, 1 Hz, quantised to uint16 on wire (PacketTime)
@@ -413,10 +415,18 @@ $TestApp = {
}
// ── Streamer: scalar signals, PacketTime (port 44500) ─────────────────
// Multicast mode: clients connect via TCP on port 44500 to receive the
// CONFIG packet, then join 239.0.0.1:44503 to receive DATA datagrams.
// Auto publishing ensures data is sent every RT cycle (1 kHz = 1 ms
// temporal resolution) but never faster, so the rate is bounded.
+Streamer = {
Class = UDPStreamer
Port = 44500
MulticastGroup = "239.0.0.1"
DataPort = 44503
MaxPayloadSize = 1400
PublishingMode = "Accumulate"
MinRefreshRate = 100
Signals = {
Counter = {
Type = uint32
+1 -1
View File
@@ -167,7 +167,7 @@ WEBUI_PID=""
if [ "${START_WEBUI}" -eq 1 ]; then
echo "==> Starting WebUI on http://localhost:8080..."
"${WEBUI_BIN}" \
--source "Streamer@127.0.0.1:44500" \
--source "Streamer@127.0.0.1:44500/239.0.0.1:44503" \
--source "FastStreamer@127.0.0.1:44501" \
--source "FullArrStreamer@127.0.0.1:44502" \
--listen :8080 &