![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Immutable dataset adapter; GUI calls never perform observation database reads. More...
#include <timeseriesrunlayer.h>
Classes | |
| struct | Work |
| Shared worker state; done publishes all result writes with release/acquire ordering. More... | |
Signals | |
| void | dataReady () |
| A display/statistics cache was published on the GUI thread; refresh views. | |
Public Member Functions | |
| TimeSeriesRunLayer (std::shared_ptr< const OpenSWMM::TimeSeries::TimeSeriesDataset > dataset) | |
| ~TimeSeriesRunLayer () override | |
| Cancel queued work and join the current bounded-reader worker. | |
| QString | scenarioName () const override |
| UnitSystem | unitSystem () const override |
| double | startDateJulian () const override |
| int | periodCount () const override |
| int | reportStepSeconds () const override |
| QString | persistenceKey () const override |
| bool | supportsAttribute (PlotAttribute) const override |
| void | getSeriesAt (const ObjectRef &, PlotAttribute, SeriesData &out) const override |
| Fixed attributes are deliberately unsupported for native observations. | |
| void | getSeriesAt (const ObjectRef &ref, const ResultDescriptor &descriptor, SeriesData &out) const override |
| Return a cached display window and schedule missing work without synchronous IO. | |
| void | requestWindow (const QStringList &ids, QDateTime from={}, QDateTime to={}) |
| Request a bounded display window for selected series. | |
| void | setModelClockOffset (int seconds) |
| Explicitly map UTC observation instants to a fixed-offset model wall clock. | |
| bool | hasModelClockMapping () const |
| ResultDescriptor | descriptorFor (const QString &id) const |
| const OpenSWMM::TimeSeries::SeriesInfo * | series (const QString &id) const |
| auto | dataset () const |
Public Member Functions inherited from openswmmvis::plot::IRunLayer | |
| virtual | ~IRunLayer ()=default |
| Destroy the concrete run source through the interface; callers own the lifetime unless a concrete QObject owner supplies it. | |
| virtual void | getSeriesBatch (const QVector< SeriesRequest > &requests, QVector< SeriesData > &out) const |
| virtual QVector< ResultDescriptor > | resultDescriptorsForKind (ObjectRef::Kind kind) const |
Y2b-1 (amendment D-Y4): everything plottable for kind on THIS run — the fixed attribute set as descriptors, plus any dynamic species the run carries. Base impl serves the fixed set only, which is exactly right for sources with no species (observed CSV, mesh layers, a legacy .out with no quality). SwmmOutRunLayer overrides to append the open run's species by name. | |
Static Public Member Functions | |
| static SeriesData | readWindow (const OpenSWMM::TimeSeries::TimeSeriesDataset &dataset, const QString &id, QDateTime from, QDateTime to, std::atomic_bool *cancel=nullptr) |
| Build one worker-owned display window; also used by deterministic tests. | |
| static bool | exportCsv (const QVector< QPair< std::shared_ptr< const OpenSWMM::TimeSeries::TimeSeriesDataset >, QString > > &sources, const QString &path, QString *error, std::atomic_bool *cancel=nullptr) |
| Stream full-resolution observations to a new CSV; no display buffers are used. | |
Immutable dataset adapter; GUI calls never perform observation database reads.
Workers own their database handles. Published display buffers are capped at 12000 points per series; exact summaries are computed separately from all selected samples. Raw source times remain in the dataset. Calendar dates use an explicitly labelled calendar axis, without suggesting midnight UTC observations. No model clock or fit pairing is inferred.
|
explicit |
| [in] | dataset | Immutable validated collection; no plugin lifetime is retained. |
|
override |
Cancel queued work and join the current bounded-reader worker.
|
signal |
A display/statistics cache was published on the GUI thread; refresh views.
|
inline |
| ResultDescriptor openswmmvis::plot::TimeSeriesRunLayer::descriptorFor | ( | const QString & | id | ) | const |
| [in] | id | Stable source series identity. |
|
static |
Stream full-resolution observations to a new CSV; no display buffers are used.
| [in] | sources | Dataset/series pairs, independent of plot windows and decimation. |
| [in] | path | Destination CSV; atomically replaced only after successful complete write. |
| [out] | error | Failure or cancellation detail. |
| [in] | cancel | Cooperative cancellation flag. |
|
overridevirtual |
Fixed attributes are deliberately unsupported for native observations.
| [in,out] | out | Receives the unsupported-attribute diagnostic. |
Implements openswmmvis::plot::IRunLayer.
|
overridevirtual |
Return a cached display window and schedule missing work without synchronous IO.
| [in] | ref | Observed reference whose name is a stable series UUID. |
| [in] | descriptor | Exact descriptor returned by descriptorFor(). |
| [in,out] | out | Receives cached values or loading/error state. |
Reimplemented from openswmmvis::plot::IRunLayer.
|
inline |
|
overridevirtual |
Implements openswmmvis::plot::IRunLayer.
|
overridevirtual |
Reimplemented from openswmmvis::plot::IRunLayer.
|
static |
Build one worker-owned display window; also used by deterministic tests.
| [in] | dataset | Source metadata; sample IO occurs on the calling thread. |
| [in] | id | Stable series identity. |
| [in] | from | Inclusive display-coordinate range start, invalid for whole coverage. |
| [in] | to | Inclusive range end. |
| [in] | cancel | Cooperative cancellation flag. |
|
inlineoverridevirtual |
Implements openswmmvis::plot::IRunLayer.
| void openswmmvis::plot::TimeSeriesRunLayer::requestWindow | ( | const QStringList & | ids, |
| QDateTime | from = {}, |
||
| QDateTime | to = {} |
||
| ) |
Request a bounded display window for selected series.
| [in] | ids | Stable series identifiers. |
| [in] | from | Optional UTC display coordinate; invalid requests complete coverage. |
| [in] | to | Optional inclusive display end; calendar series interpret its date fields. |
|
overridevirtual |
Implements openswmmvis::plot::IRunLayer.
| const SeriesInfo * openswmmvis::plot::TimeSeriesRunLayer::series | ( | const QString & | id | ) | const |
| [in] | id | Stable source series identity. |
| void openswmmvis::plot::TimeSeriesRunLayer::setModelClockOffset | ( | int | seconds | ) |
Explicitly map UTC observation instants to a fixed-offset model wall clock.
| [in] | seconds | Signed UTC offset in [-50400,50400]. Calendar dates retain their date. |
|
overridevirtual |
Implements openswmmvis::plot::IRunLayer.
|
inlineoverridevirtual |
Reimplemented from openswmmvis::plot::IRunLayer.
|
inlineoverridevirtual |
Implements openswmmvis::plot::IRunLayer.