Implemented client datasource
This commit is contained in:
+13
-3
@@ -26,7 +26,7 @@ namespace StreamHubClient {
|
||||
/** One signal as known to the client. */
|
||||
struct Signal {
|
||||
SignalMeta meta;
|
||||
SignalBuffer buf{20000};
|
||||
SignalBuffer buf{1000000};
|
||||
ImVec4 color{0.4f, 0.8f, 1.0f, 1.0f};
|
||||
float lineWidth = 1.5f;
|
||||
int marker = -1; /* ImPlotMarker (-1 = none) */
|
||||
@@ -244,10 +244,15 @@ public:
|
||||
/** @brief Hi-res history zoom cache (per plot, parallel to zoomCache_). */
|
||||
PlotZoomCache& histZoomCache(int i) { return histZoomCache_[i]; }
|
||||
|
||||
/* ---- Trigger zoom (per plot, used in trigger capture view) ----------- */
|
||||
bool& trigZoomed(int i) { return trigZoomed_[i]; }
|
||||
void resetTrigZoom() { for (int i = 0; i < kMaxPlotSlots; i++) trigZoomed_[i] = false; }
|
||||
|
||||
/** @brief True if the stats panel is open. */
|
||||
bool& showStats() { return showStats_; }
|
||||
bool& showAddSrc() { return showAddSrc_; }
|
||||
bool& showTrigBar() { return showTrigBar_; }
|
||||
bool& showHistBar() { return showHistBar_; }
|
||||
|
||||
/** @brief Find source index by id (-1 if not found). */
|
||||
int findSource(const std::string& id) const;
|
||||
@@ -270,8 +275,8 @@ private:
|
||||
void onMaxPointsUpdated(const std::string& json);
|
||||
|
||||
/* ---- Rendering ------------------------------------------------------ */
|
||||
void renderMenuBar();
|
||||
void renderToolbar();
|
||||
void renderHistoryBar();
|
||||
void renderTriggerBar();
|
||||
void renderSidebar();
|
||||
void renderPlotGrid();
|
||||
@@ -285,7 +290,7 @@ private:
|
||||
|
||||
TriggerState trigger_;
|
||||
PlotLayout layout_ = PlotLayout::kLayout1x1;
|
||||
uint32_t maxPoints_ = 20000u;
|
||||
uint32_t maxPoints_ = 1000000u;
|
||||
bool globalPaused_ = false;
|
||||
|
||||
/* Plot slots: one vector of assignments per plot panel */
|
||||
@@ -304,6 +309,9 @@ private:
|
||||
double cursorA_ = 0.0;
|
||||
double cursorB_ = 0.0;
|
||||
|
||||
/* Trigger zoom per plot (capture view zoom state) */
|
||||
bool trigZoomed_[kMaxPlotSlots] = {};
|
||||
|
||||
/* Frozen view per plot (valid while the plot is paused) */
|
||||
PlotSnapshot plotSnap_[kMaxPlotSlots];
|
||||
|
||||
@@ -315,11 +323,13 @@ private:
|
||||
|
||||
/* History info from the hub */
|
||||
HistoryInfoMsg historyInfo_;
|
||||
double lastHistInfoReq_ = 0.0;
|
||||
|
||||
/* UI state */
|
||||
bool showStats_ = false;
|
||||
bool showAddSrc_ = false;
|
||||
bool showTrigBar_ = false;
|
||||
bool showHistBar_ = false;
|
||||
bool sidebarOpen_ = true;
|
||||
|
||||
/* Connection fields (populated by init(), editable in menu bar) */
|
||||
|
||||
Reference in New Issue
Block a user