mirror of
https://github.com/nasa/openmct.git
synced 2026-05-31 06:26:06 -05:00
* When realtime data is received by the plotSeries, do not assume that it's in chronological order. Note that this will cause the data to be resorted every time new realtime data arrives. * Some notes about performance * Add sorting for real time data and a check to prevent unnecessary binary search * Fix a couple of typos * Fix lint issues * Add option to generate out of order telemetry for state generator. * add visual test for out of order data plot display * Remove visual spec. Add e2d test instead. * Fix typo * skip the test for now * Revert changes to existing state generator util. Create a new function for out of order generator util * Remove unnecessary changes to appActions * use out of order telemetry util --------- Co-authored-by: Joshi <sjoshi6@ndc.nasa.gov> Co-authored-by: Andrew Henry <andrew.k.henry@nasa.gov> Co-authored-by: Andrew Henry <akhenry@gmail.com>
149 lines
2.9 KiB
JavaScript
149 lines
2.9 KiB
JavaScript
const METADATA_BY_TYPE = {
|
|
generator: {
|
|
values: [
|
|
{
|
|
key: 'name',
|
|
name: 'Name',
|
|
format: 'string'
|
|
},
|
|
{
|
|
key: 'utc',
|
|
name: 'Time',
|
|
format: 'utc',
|
|
hints: {
|
|
domain: 1
|
|
}
|
|
},
|
|
{
|
|
key: 'yesterday',
|
|
name: 'Yesterday',
|
|
format: 'utc',
|
|
hints: {
|
|
domain: 2
|
|
}
|
|
},
|
|
{
|
|
key: 'wavelengths',
|
|
name: 'Wavelength',
|
|
unit: 'nm',
|
|
format: 'string[]',
|
|
hints: {
|
|
range: 4
|
|
}
|
|
},
|
|
// Need to enable "LocalTimeSystem" plugin to make use of this
|
|
// {
|
|
// key: "local",
|
|
// name: "Time",
|
|
// format: "local-format",
|
|
// source: "utc",
|
|
// hints: {
|
|
// domain: 3
|
|
// }
|
|
// },
|
|
{
|
|
key: 'sin',
|
|
name: 'Sine',
|
|
unit: 'Hz',
|
|
formatString: '%0.2f',
|
|
hints: {
|
|
range: 1
|
|
}
|
|
},
|
|
{
|
|
key: 'cos',
|
|
name: 'Cosine',
|
|
unit: 'deg',
|
|
formatString: '%0.2f',
|
|
hints: {
|
|
range: 2
|
|
}
|
|
},
|
|
{
|
|
key: 'intensities',
|
|
name: 'Intensities',
|
|
format: 'number[]',
|
|
hints: {
|
|
range: 3
|
|
}
|
|
}
|
|
]
|
|
},
|
|
'example.state-generator': {
|
|
values: [
|
|
{
|
|
key: 'name',
|
|
name: 'Name',
|
|
format: 'string'
|
|
},
|
|
{
|
|
key: 'utc',
|
|
name: 'Time',
|
|
format: 'utc',
|
|
hints: {
|
|
domain: 1
|
|
}
|
|
},
|
|
{
|
|
key: 'local',
|
|
name: 'Time',
|
|
format: 'utc',
|
|
source: 'utc',
|
|
hints: {
|
|
domain: 2
|
|
}
|
|
},
|
|
{
|
|
key: 'state',
|
|
source: 'value',
|
|
name: 'State',
|
|
format: 'enum',
|
|
enumerations: [
|
|
{
|
|
value: 0,
|
|
string: 'OFF'
|
|
},
|
|
{
|
|
value: 1,
|
|
string: 'ON'
|
|
},
|
|
{
|
|
value: 99,
|
|
string: 'OUT OF ORDER'
|
|
}
|
|
],
|
|
filters: [
|
|
{
|
|
singleSelectionThreshold: true,
|
|
comparator: 'equals',
|
|
possibleValues: [
|
|
{ label: 'OFF', value: 0 },
|
|
{ label: 'ON', value: 1 }
|
|
]
|
|
}
|
|
],
|
|
hints: {
|
|
range: 1
|
|
}
|
|
},
|
|
{
|
|
key: 'value',
|
|
name: 'Value',
|
|
hints: {
|
|
range: 2
|
|
}
|
|
}
|
|
]
|
|
}
|
|
};
|
|
|
|
export default function GeneratorMetadataProvider() {}
|
|
|
|
GeneratorMetadataProvider.prototype.supportsMetadata = function (domainObject) {
|
|
return Object.prototype.hasOwnProperty.call(METADATA_BY_TYPE, domainObject.type);
|
|
};
|
|
|
|
GeneratorMetadataProvider.prototype.getMetadata = function (domainObject) {
|
|
return Object.assign({}, domainObject.telemetry, METADATA_BY_TYPE[domainObject.type]);
|
|
};
|