Implemented history writer
This commit is contained in:
@@ -232,6 +232,18 @@ public:
|
||||
/** @brief Full key "src:sig" for an assignment (empty if invalid). */
|
||||
std::string slotKey(const PlotAssignment& a) const;
|
||||
|
||||
/* ---- History ------------------------------------------------------------ */
|
||||
|
||||
/** @brief History info received from the hub. */
|
||||
const HistoryInfoMsg& historyInfo() const { return historyInfo_; }
|
||||
|
||||
/** @brief Send a historyZoom request. */
|
||||
void requestHistoryZoom(int plotIdx, double t0, double t1,
|
||||
const std::string& signalsCsv);
|
||||
|
||||
/** @brief Hi-res history zoom cache (per plot, parallel to zoomCache_). */
|
||||
PlotZoomCache& histZoomCache(int i) { return histZoomCache_[i]; }
|
||||
|
||||
/** @brief True if the stats panel is open. */
|
||||
bool& showStats() { return showStats_; }
|
||||
bool& showAddSrc() { return showAddSrc_; }
|
||||
@@ -253,6 +265,8 @@ private:
|
||||
void onStats(const std::string& json);
|
||||
void onTriggerState(const std::string& json);
|
||||
void onZoom(const std::string& json);
|
||||
void onHistoryZoom(const std::string& json);
|
||||
void onHistoryInfo(const std::string& json);
|
||||
void onMaxPointsUpdated(const std::string& json);
|
||||
|
||||
/* ---- Rendering ------------------------------------------------------ */
|
||||
@@ -296,8 +310,12 @@ private:
|
||||
/* Zoom history + hi-res zoom cache */
|
||||
std::vector<std::pair<double,double>> zoomHist_[kMaxPlotSlots];
|
||||
PlotZoomCache zoomCache_[kMaxPlotSlots];
|
||||
PlotZoomCache histZoomCache_[kMaxPlotSlots];
|
||||
uint32_t nextZoomReqId_ = 1;
|
||||
|
||||
/* History info from the hub */
|
||||
HistoryInfoMsg historyInfo_;
|
||||
|
||||
/* UI state */
|
||||
bool showStats_ = false;
|
||||
bool showAddSrc_ = false;
|
||||
|
||||
Reference in New Issue
Block a user