mirror of
https://github.com/nasa/openmct.git
synced 2025-06-02 23:50:49 +00:00
parent
f5eacc504b
commit
9f079255f1
@ -88,7 +88,7 @@ export default class TelemetryAPI {
|
|||||||
* @memberof module:openmct.TelemetryAPI~TelemetryProvider#
|
* @memberof module:openmct.TelemetryAPI~TelemetryProvider#
|
||||||
*/
|
*/
|
||||||
canProvideTelemetry(domainObject) {
|
canProvideTelemetry(domainObject) {
|
||||||
return Boolean(this.#findSubscriptionProvider(domainObject))
|
return Boolean(this.findSubscriptionProvider(domainObject))
|
||||||
|| Boolean(this.findRequestProvider(domainObject));
|
|| Boolean(this.findRequestProvider(domainObject));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,9 +123,10 @@ export default class TelemetryAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* Returns a telemetry subscription provider that supports
|
||||||
|
* a given domain object and options.
|
||||||
*/
|
*/
|
||||||
#findSubscriptionProvider() {
|
findSubscriptionProvider() {
|
||||||
const args = Array.prototype.slice.apply(arguments);
|
const args = Array.prototype.slice.apply(arguments);
|
||||||
function supportsDomainObject(provider) {
|
function supportsDomainObject(provider) {
|
||||||
return provider.supportsSubscribe.apply(provider, args);
|
return provider.supportsSubscribe.apply(provider, args);
|
||||||
@ -348,7 +349,7 @@ export default class TelemetryAPI {
|
|||||||
return () => {};
|
return () => {};
|
||||||
}
|
}
|
||||||
|
|
||||||
const provider = this.#findSubscriptionProvider(domainObject);
|
const provider = this.findSubscriptionProvider(domainObject);
|
||||||
|
|
||||||
if (!this.subscribeCache) {
|
if (!this.subscribeCache) {
|
||||||
this.subscribeCache = {};
|
this.subscribeCache = {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user