MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / datasetDomainDisplayOffset

Method datasetDomainDisplayOffset

pj_runtime/src/SessionManager.cpp:57–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57Timestamp SessionManager::datasetDomainDisplayOffset(DatasetId dataset_id) const {
58 // Base shift from the dataset's TimeDomain. Live lookup via the time-domain
59 // map: the dataset's own time_domain is a snapshot from createDataset, so
60 // reading its display_offset directly would go stale after setDisplayOffset.
61 Timestamp offset_ns = 0;
62 if (const DatasetInfo* dataset = data_engine_.getDataset(dataset_id);
63 dataset != nullptr && dataset->time_domain.id != 0) {
64 if (const TimeDomain* domain = data_engine_.getTimeDomain(dataset->time_domain.id)) {
65 offset_ns = domain->display_offset;
66 }
67 }
68 return offset_ns;
69}
70
71DisplayOffset SessionManager::sourceDisplayOffset(DatasetId dataset_id) const {
72 // The per-source ALIGNMENT shift only (display_time = raw_time - offset): the

Callers

nothing calls this directly

Calls 2

getDatasetMethod · 0.80
getTimeDomainMethod · 0.80

Tested by

no test coverage detected