mirror of
https://github.com/nasa/openmct.git
synced 2025-05-20 01:13:22 +00:00
output telemetry to views
This commit is contained in:
parent
0915aaea3b
commit
4456633010
@ -26,7 +26,7 @@ export default class ConditionSetMetadataProvider {
|
|||||||
{
|
{
|
||||||
name: 'Output',
|
name: 'Output',
|
||||||
key: 'output',
|
key: 'output',
|
||||||
type: 'string',
|
format: 'string',
|
||||||
hints: {
|
hints: {
|
||||||
range: 1
|
range: 1
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ export default class ConditionSetTelemetryProvider {
|
|||||||
constructor(openmct) {
|
constructor(openmct) {
|
||||||
this.openmct = openmct;
|
this.openmct = openmct;
|
||||||
}
|
}
|
||||||
|
|
||||||
isTelemetryObject(domainObject) {
|
isTelemetryObject(domainObject) {
|
||||||
return domainObject.type === 'conditionSet';
|
return domainObject.type === 'conditionSet';
|
||||||
}
|
}
|
||||||
@ -18,7 +19,7 @@ export default class ConditionSetTelemetryProvider {
|
|||||||
|
|
||||||
subscribe(domainObject, callback) {
|
subscribe(domainObject, callback) {
|
||||||
let conditionManager = new ConditionManager(domainObject, this.openmct);
|
let conditionManager = new ConditionManager(domainObject, this.openmct);
|
||||||
conditionManager.on('conditionSetResultUpdated', (output) => output);
|
conditionManager.on('conditionSetResultUpdated', callback);
|
||||||
|
|
||||||
return function unsubscribe() {
|
return function unsubscribe() {
|
||||||
conditionManager.off('conditionSetResultUpdated');
|
conditionManager.off('conditionSetResultUpdated');
|
||||||
|
@ -68,7 +68,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
provideTelemetry() {
|
provideTelemetry() {
|
||||||
this.stopProvidingTelemetry = this.openmct.telemetry.subscribe(this.domainObject);
|
this.stopProvidingTelemetry = this.openmct.telemetry.subscribe(this.domainObject, (output) => output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user