mirror of
https://github.com/nasa/openmct.git
synced 2025-05-31 22:50:49 +00:00
[Time Controller] Simplify retrieval of datum objects
...for historical data. Supports WTD-1515
This commit is contained in:
parent
351181d38e
commit
d2dfec3ce7
@ -102,7 +102,6 @@ define(
|
||||
telemetryObject.getCapability('limit'),
|
||||
datum = telemetryObject && handle.getDatum(
|
||||
telemetryObject,
|
||||
telemetrySeries,
|
||||
index
|
||||
);
|
||||
|
||||
|
@ -106,10 +106,24 @@ define(
|
||||
.then(issueRequests);
|
||||
};
|
||||
|
||||
self.getDatum = function (telemetryObject, series, index) {
|
||||
return arguments.length > 1 ?
|
||||
/**
|
||||
* Get the latest telemetry datum for this domain object. This
|
||||
* will be from real-time telemetry, unless an index is specified,
|
||||
* in which case it will be pulled from the historical telemetry
|
||||
* series at the specified index.
|
||||
*
|
||||
* @param {DomainObject} domainObject the object of interest
|
||||
* @param {number} [index] the index of the data of interest
|
||||
* @returns {TelemetryDatum} the most recent datum
|
||||
*/
|
||||
self.getDatum = function (telemetryObject, index) {
|
||||
return typeof index !== 'number' ?
|
||||
subscription.getDatum(telemetryObject) :
|
||||
subscription.makeDatum(telemetryObject, series, index);
|
||||
subscription.makeDatum(
|
||||
telemetryObject,
|
||||
this.getSeries(telemetryObject),
|
||||
index
|
||||
);
|
||||
};
|
||||
|
||||
return self;
|
||||
|
Loading…
x
Reference in New Issue
Block a user