mirror of
https://github.com/nasa/openmct.git
synced 2024-12-18 20:57:53 +00:00
[API] Telemetry JSdoc
This commit is contained in:
parent
8cafd2da7e
commit
7ce9bd969a
12
src/MCT.js
12
src/MCT.js
@ -66,7 +66,8 @@ define([
|
||||
MCT.prototype.MCT = MCT;
|
||||
|
||||
/**
|
||||
* Utilities for interacting with domain objects.
|
||||
* An interface for interacting with domain objects and the domain
|
||||
* object hierarchy.
|
||||
*
|
||||
* @type {module:openmct.ObjectAPI}
|
||||
* @memberof module:openmct.MCT#
|
||||
@ -74,6 +75,15 @@ define([
|
||||
*/
|
||||
MCT.Objects = api.Objects;
|
||||
|
||||
/**
|
||||
* An interface for retrieving and interpreting telemetry data associated
|
||||
* with a domain object.
|
||||
*
|
||||
* @type {module:openmct.TelemetryAPI}
|
||||
* @memberof module:openmct.MCT#
|
||||
* @name Telemetry
|
||||
*/
|
||||
|
||||
MCT.prototype.legacyExtension = function (category, extension) {
|
||||
this.legacyBundle.extensions[category] =
|
||||
this.legacyBundle.extensions[category] || [];
|
||||
|
@ -53,7 +53,12 @@ define([
|
||||
FORMAT_MAP.generic;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* An interface for retrieving telemetry data associated with a domain
|
||||
* object.
|
||||
* @interface TelemetryAPI
|
||||
* @memberof module:openmct
|
||||
*/
|
||||
function TelemetryAPI(
|
||||
formatService
|
||||
) {
|
||||
@ -201,13 +206,55 @@ define([
|
||||
}
|
||||
|
||||
var Telemetry = {
|
||||
/**
|
||||
* Register a new telemetry provider.
|
||||
* @method registerProvider
|
||||
* @memberof module:openmct.TelemetryAPI#
|
||||
*/
|
||||
registerProvider: registerProvider,
|
||||
|
||||
/**
|
||||
* Register a new limit evaluator.
|
||||
* @method registerEvaluator
|
||||
* @memberof module:openmct.TelemetryAPI#
|
||||
*/
|
||||
registerEvaluator: registerEvaluator,
|
||||
|
||||
/**
|
||||
* Request historical telemetry data.
|
||||
* @method request
|
||||
* @memberof module:openmct.TelemetryAPI#
|
||||
*/
|
||||
request: request,
|
||||
|
||||
/**
|
||||
* Subscribe to updates to telemetry data.
|
||||
* @method subscribe
|
||||
* @memberof module:openmct.TelemetryAPI#
|
||||
*/
|
||||
subscribe: subscribe,
|
||||
|
||||
/**
|
||||
* Get metadata associated with telemetry for this domain object.
|
||||
* @param {module:openmct.DomainObject} domainObject the domain
|
||||
* object for which to request telemetry
|
||||
* @returns {module:openmct.TelemetryAPI~TelemetryMetadata}
|
||||
* telemetry metadata
|
||||
* @method getMetadata
|
||||
* @memberof module:openmct.TelemetryAPI#
|
||||
*/
|
||||
getMetadata: function (domainObject) {
|
||||
return domainObject.getCapability('telemetry').getMetadata();
|
||||
},
|
||||
|
||||
/**
|
||||
* Get a telemetry formatter for this domain object.
|
||||
* @param {module:openmct.DomainObject} domainObject the domain
|
||||
* object for which to format telemetry
|
||||
* @returns {module:openmct.TelemetryAPI~TelemetryFormatter}
|
||||
* @method Formatter
|
||||
* @memberof module:openmct.TelemetryAPI#
|
||||
*/
|
||||
Formatter: function (domainObject) {
|
||||
if (!FORMATTER_CACHE.has(domainObject)) {
|
||||
FORMATTER_CACHE.set(
|
||||
@ -217,6 +264,15 @@ define([
|
||||
}
|
||||
return FORMATTER_CACHE.get(domainObject);
|
||||
},
|
||||
|
||||
/**
|
||||
* Get a limit evaluator for this domain object.
|
||||
* @param {module:openmct.DomainObject} domainObject the domain
|
||||
* object for which to evaluate limits
|
||||
* @returns {module:openmct.TelemetryAPI~LimitEvaluator}
|
||||
* @method LimitEvaluator
|
||||
* @memberof module:openmct.TelemetryAPI#
|
||||
*/
|
||||
LimitEvaluator: function (domainObject) {
|
||||
if (!EVALUATOR_CACHE.has(domainObject)) {
|
||||
EVALUATOR_CACHE.set(
|
||||
|
Loading…
Reference in New Issue
Block a user