list the sources with a stored session
known_sources() reads the session files the layout store already owns, keeping only those that name a signal: a development machine accumulates one file per probe run on a throwaway port, and all 140 of them here hold empty slots.
This commit is contained in:
1 parent
c604d62917
commit
eabdde34f9
2 files changed
+78
No files matched your search
@@ -53,6 +53,28 @@ struct LayoutState {
|
||||
std::vector<Measure> measures;
|
||||
};
|
||||
|
||||
/// A data source udpscope has a stored session for: one row of the startup chooser.
|
||||
struct KnownSource {
|
||||
std::string host; ///< the CONFIG server, even for a multicast session
|
||||
std::uint16_t port = 0;
|
||||
std::string multicast; ///< empty = unicast
|
||||
std::string interface_addr; ///< empty = the default route
|
||||
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
|
||||
};
|
||||
|
||||
/// Every session file that names at least one signal, newest first.
|
||||
///
|
||||
/// The filter is what makes the list usable: a development machine accumulates one session file
|
||||
/// per probe run on a throwaway port -- 140 of them when this was written -- and every one holds
|
||||
/// `signals = ["", "", "", ""]`. A listed source is one somebody actually configured.
|
||||
std::vector<KnownSource> known_sources();
|
||||
|
||||
/// Deletes one source's session file; the chooser's `x`. False means the file was already gone or
|
||||
/// could not be removed, which costs the caller nothing -- there is no state to roll back.
|
||||
bool forget_source(const KnownSource& src);
|
||||
|
||||
/// One `MathNode` as `kind|source|in_a|in_b|gain|offset|fc|q|lo|hi|x|y`, and back. The kind is the
|
||||
/// op's *index* into `math_op_at()`, which is why the enum's order is a stored format and not just
|
||||
/// an implementation detail: reordering it renames every saved graph's operations.
|
||||
|
||||
Reference in new issue
Block a user