source: a synthetic probe kind, and sessions that remember their source kind

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Martino FerrariandClaude Opus 4.6 committed 2026-10-31 20:04:42 +01:00
1 parent 4ae91bd58b
commit 059b660586
9 files changed
+231 -3

No files matched your search

+9
View File
@@ -8,6 +8,7 @@
#include "math_channel.hpp"
#include "measure.hpp"
#include "source/source_config.hpp"
namespace udpscope {
@@ -54,6 +55,12 @@ struct LayoutState {
/// unicast; empty `interface_addr` is the default route.
std::string multicast;
std::string interface_addr;
/// Which source kind this session belongs to. Empty means `udps`: every file written before the
/// plugins existed. Only a kind other than `udps` is written, so a UDPS session file is
/// byte-identical to what earlier versions wrote.
std::string source_kind;
/// That kind's settings (`SourceConfig`), stored as top-level `source_opt_<key>` entries.
SourceConfig source_opts;
/// The derived channels, graphs and all: the editor's work is part of the session, not of the
/// process. A graph is stored as one string per node so the file stays in this store's TOML
@@ -144,6 +151,8 @@ struct KnownSource {
std::uint16_t port = 0;
std::string multicast; ///< empty = unicast
std::string interface_addr; ///< empty = the default route
std::string kind = "udps"; ///< the session's source kind
SourceConfig opts; ///< that kind's settings (empty for UDPS, whose fields are above)
int rows = 0; ///< plots the session had
int signals = 0; ///< named slots across those plots
std::int64_t mtime = 0; ///< orders the list; never shown