Add debug graph to static network

This commit is contained in:
2026-05-09 08:59:19 +02:00
parent 011b5eb35f
commit da8f4d9926
5 changed files with 104 additions and 29 deletions
+16
View File
@@ -172,4 +172,20 @@ private:
ChannelStats stats_;
};
// ── Channel probe — type-erased snapshot accessor ─────────────────────────────
// Used by both Network and StaticNetwork for diagnostics.
struct IChannelProbe {
virtual ~IChannelProbe() = default;
virtual ChannelSnapshot snapshot() const = 0;
};
template<typename T>
struct ChannelProbe : IChannelProbe {
const Channel<T>& ch;
std::string name;
ChannelProbe(const Channel<T>& c, std::string n) : ch(c), name(std::move(n)) {}
ChannelSnapshot snapshot() const override { return ch.snapshot(name); }
};
} // namespace kpn