mirror of
https://github.com/nasa/openmct.git
synced 2025-06-17 06:38:17 +00:00
[Telemetry] Add JSDoc
Add in-line documentation to scripts and methods that were changed/introduced to support telemetry subscriptions, which in turn were introduced to support autoflow tabular views, WTD-614.
This commit is contained in:
@ -5,8 +5,39 @@ define(
|
||||
function (TelemetrySubscription) {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* The TelemetrySubscriber is a service which allows
|
||||
* subscriptions to be made for new data associated with
|
||||
* domain objects. It is exposed as a service named
|
||||
* `telemetrySubscriber`.
|
||||
*
|
||||
* Subscriptions may also be made directly using the
|
||||
* `telemetry` capability of a domain objcet; the subscriber
|
||||
* uses this as well, but additionally handles delegation
|
||||
* (e.g. for telemetry panels) as well as latest-value
|
||||
* extraction.
|
||||
*
|
||||
* @constructor
|
||||
* @param $q Angular's $q
|
||||
* @param $timeout Angular's $timeout
|
||||
*/
|
||||
function TelemetrySubscriber($q, $timeout) {
|
||||
return {
|
||||
/**
|
||||
* Subscribe to streaming telemetry updates
|
||||
* associated with this domain object (either
|
||||
* directly or via capability delegation.)
|
||||
*
|
||||
* @param {DomainObject} domainObject the object whose
|
||||
* associated telemetry data is of interest
|
||||
* @param {Function} callback a function to invoke
|
||||
* when new data has become available.
|
||||
* @returns {TelemetrySubscription} the subscription,
|
||||
* which will provide access to latest values.
|
||||
*
|
||||
* @method
|
||||
* @memberof TelemetrySubscriber
|
||||
*/
|
||||
subscribe: function (domainObject, callback) {
|
||||
return new TelemetrySubscription(
|
||||
$q,
|
||||
|
Reference in New Issue
Block a user