added math signals
This commit is contained in:
1 parent
02620ca946
commit
aa2508e431
10 files changed
+1773
-27
No files matched your search
@@ -6,6 +6,9 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "math_channel.hpp"
|
||||
#include "measure.hpp"
|
||||
|
||||
namespace udpscope {
|
||||
|
||||
/// The user-arranged part of a session, persisted per data source in
|
||||
@@ -28,8 +31,28 @@ struct LayoutState {
|
||||
double offset = 0.0;
|
||||
};
|
||||
std::vector<Calibration> calibration;
|
||||
|
||||
/// Signals the session had enabled. Enabling is what starts acquisition, so this is what makes a
|
||||
/// reopened scope look like the one that was closed -- and it is saved by *name*, like every other
|
||||
/// identity here, because a CONFIG renumbers the channels.
|
||||
std::vector<std::string> enabled;
|
||||
|
||||
/// 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
|
||||
/// subset (tables, string arrays, scalars) rather than growing a nested-table parser for it; see
|
||||
/// `math_node_text()` for the field order.
|
||||
std::vector<MathChannel> math;
|
||||
|
||||
/// The measurements pane, by signal *name* and with the type and options a row was built with.
|
||||
std::vector<Measure> measures;
|
||||
};
|
||||
|
||||
/// 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.
|
||||
std::string math_node_text(const MathNode& node);
|
||||
bool math_node_from_text(const std::string& text, MathNode& out);
|
||||
|
||||
/// `~/.config/udpscope/<host>_<port>.toml`, with the directory created.
|
||||
/// Characters unsafe in a filename are replaced in the host part.
|
||||
std::string layout_path(const std::string& host, std::uint16_t port);
|
||||
|
||||
Reference in new issue
Block a user