mirror of
https://github.com/nasa/openmct.git
synced 2025-06-17 06:38:17 +00:00
[Telemetry] Implement subscription pools
Implement data structures which support lossless/lossy behaviors for telemetry subscriptions (that is, allow users of the telemetrySubscriber to decide whether or not they are willing to drop updates in favor of only being notified with the latest available values.) WTD-784.
This commit is contained in:
@ -32,18 +32,23 @@ define(
|
||||
* associated telemetry data is of interest
|
||||
* @param {Function} callback a function to invoke
|
||||
* when new data has become available.
|
||||
* @param {boolean} lossless flag to indicate whether the
|
||||
* callback should be notified for all values
|
||||
* (otherwise, multiple values in quick succession
|
||||
* will call back with only the latest value.)
|
||||
* @returns {TelemetrySubscription} the subscription,
|
||||
* which will provide access to latest values.
|
||||
*
|
||||
* @method
|
||||
* @memberof TelemetrySubscriber
|
||||
*/
|
||||
subscribe: function (domainObject, callback) {
|
||||
subscribe: function (domainObject, callback, lossless) {
|
||||
return new TelemetrySubscription(
|
||||
$q,
|
||||
$timeout,
|
||||
domainObject,
|
||||
callback
|
||||
callback,
|
||||
lossless
|
||||
);
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user