Visualizer #3

Merged
thomas merged 12 commits from rudi_s into main 2024-05-28 11:21:00 +02:00

12 commits

Author SHA1 Message Date
Simon Ruderich d5aeb6c0bc visualizer: make it optional to dup JSON to file 2024-05-28 08:59:06 +02:00
Simon Ruderich 570c379bc5 visualizer: always use === for comparisons 2024-05-28 08:51:56 +02:00
Simon Ruderich 21220deed7 visualizer: draw marker in history plot after selecting a packet 2024-05-28 08:51:56 +02:00
Simon Ruderich 7024964cae visualizer: use multiple plots for history 2024-05-28 08:51:56 +02:00
Simon Ruderich a2e23fceff visualizer: limit history plot to 300 packets
The drawing gets slow with too many points.
2024-05-28 08:51:56 +02:00
Simon Ruderich bc2f5ca76c visualizer: assign id to identify packets
The id is displayed in the graph, the packet information and in the
trace (on mouse over).
2024-05-28 08:51:56 +02:00
Simon Ruderich c5024a0b30 visualizer: skip redraws when they take too long 2024-05-28 08:51:56 +02:00
Simon Ruderich c63f7e8b57 visualizer: treat -1e38 as NaN
I considered updating jsonlogger.c to represent NaN as "null" in the
JSON. However, this makes the hand-written JSON generator much more
complicated.
2024-05-28 08:51:56 +02:00
Simon Ruderich 53190cd17c visualizer: don't use fixed scales
We might get (unexpected) input which is outside of the usual range.
2024-05-28 08:51:56 +02:00
Simon Ruderich 6fc4df205c Add HTML/JS visualizer with plots and graphs 2024-05-28 08:51:56 +02:00
Simon Ruderich 5fb5a2908d jsonlogger: increase pipe buffer to reduce likelihood of corrupted messages
Our JSON messages can get rather large which can cause a buffer overrun
when the reading program is not scheduled at the same time. When the
kernel returns EAGAIN we abort writing the current JSON message.
However, the unfinished (and thus invalid) JSON message is still in the
pipe and will be processed by the reading program.

Increase the pipe buffer from the default 65536 to reduce the likelihood
of this happening. It's difficult to completely prevent the issue as we
don't want to slow down the main program due to slow logging.
2024-05-28 08:51:56 +02:00
Simon Ruderich 657ac4faa3 test_rx_file: add JSON logging (controllable via JSONLOGGER define) 2024-05-28 08:51:56 +02:00