mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 21:27:52 +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;
|
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}
|
* @type {module:openmct.ObjectAPI}
|
||||||
* @memberof module:openmct.MCT#
|
* @memberof module:openmct.MCT#
|
||||||
@ -74,6 +75,15 @@ define([
|
|||||||
*/
|
*/
|
||||||
MCT.Objects = api.Objects;
|
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) {
|
MCT.prototype.legacyExtension = function (category, extension) {
|
||||||
this.legacyBundle.extensions[category] =
|
this.legacyBundle.extensions[category] =
|
||||||
this.legacyBundle.extensions[category] || [];
|
this.legacyBundle.extensions[category] || [];
|
||||||
|
@ -53,7 +53,12 @@ define([
|
|||||||
FORMAT_MAP.generic;
|
FORMAT_MAP.generic;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An interface for retrieving telemetry data associated with a domain
|
||||||
|
* object.
|
||||||
|
* @interface TelemetryAPI
|
||||||
|
* @memberof module:openmct
|
||||||
|
*/
|
||||||
function TelemetryAPI(
|
function TelemetryAPI(
|
||||||
formatService
|
formatService
|
||||||
) {
|
) {
|
||||||
@ -201,13 +206,55 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
var Telemetry = {
|
var Telemetry = {
|
||||||
|
/**
|
||||||
|
* Register a new telemetry provider.
|
||||||
|
* @method registerProvider
|
||||||
|
* @memberof module:openmct.TelemetryAPI#
|
||||||
|
*/
|
||||||
registerProvider: registerProvider,
|
registerProvider: registerProvider,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register a new limit evaluator.
|
||||||
|
* @method registerEvaluator
|
||||||
|
* @memberof module:openmct.TelemetryAPI#
|
||||||
|
*/
|
||||||
registerEvaluator: registerEvaluator,
|
registerEvaluator: registerEvaluator,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request historical telemetry data.
|
||||||
|
* @method request
|
||||||
|
* @memberof module:openmct.TelemetryAPI#
|
||||||
|
*/
|
||||||
request: request,
|
request: request,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Subscribe to updates to telemetry data.
|
||||||
|
* @method subscribe
|
||||||
|
* @memberof module:openmct.TelemetryAPI#
|
||||||
|
*/
|
||||||
subscribe: subscribe,
|
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) {
|
getMetadata: function (domainObject) {
|
||||||
return domainObject.getCapability('telemetry').getMetadata();
|
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) {
|
Formatter: function (domainObject) {
|
||||||
if (!FORMATTER_CACHE.has(domainObject)) {
|
if (!FORMATTER_CACHE.has(domainObject)) {
|
||||||
FORMATTER_CACHE.set(
|
FORMATTER_CACHE.set(
|
||||||
@ -217,6 +264,15 @@ define([
|
|||||||
}
|
}
|
||||||
return FORMATTER_CACHE.get(domainObject);
|
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) {
|
LimitEvaluator: function (domainObject) {
|
||||||
if (!EVALUATOR_CACHE.has(domainObject)) {
|
if (!EVALUATOR_CACHE.has(domainObject)) {
|
||||||
EVALUATOR_CACHE.set(
|
EVALUATOR_CACHE.set(
|
||||||
|
Loading…
Reference in New Issue
Block a user