akhenry / openmct-yamcs

Open MCT YAMCS plugin
14 stars 9 forks source link

Limits should be fetched from the mdb and not the parameter archive #190

Closed akhenry closed 1 year ago

akhenry commented 1 year ago

Is your feature request related to a problem? Please describe. The Open MCT-Yamcs limit provider currently fetches limit definitions from the parameter archive. This has a couple of downsides:

  1. We will not be able to render limit lines for parameters with no values yet. This would require the user to reload a plot once values have been received
  2. Requests to the parameter archive are expensive

Additionally, limit information should be cached to avoid having to make an extra request to the server for limit information every time we want to render limits in a plot.

Describe the solution you'd like Static limit information is provided by the MDB API which is already used for fetching the dictionary. So, it could be fetched once when the dictionary is loaded and cached in memory with other telemetry metadata.

scottbell commented 1 year ago

One issue with this is that alarms come from the parameter archive like so:

"alarmRange": [
    {
        "level": "WARNING",
        "minExclusive": -5,
        "maxExclusive": 10
    },
    {
        "level": "CRITICAL",
        "minExclusive": -20,
        "maxExclusive": 15
    }
]

From MDB, they're closer to how they're represented in XTCE, e.g.:

"defaultAlarm": {
    "minViolations": 1,
    "staticAlarmRange": [
        {
            "level": "WARNING",
            "minExclusive": -5,
            "maxExclusive": 10
        },
        {
            "level": "CRITICAL",
            "minExclusive": -20,
            "maxExclusive": 15
        }
    ]
}

I'll see if there's a way to ask the MDB to give us alarms closer to how the parameter archive does.

scottbell commented 1 year ago

@akhenry Though I suppose if we really only support staticAlarmRange, I could just look for this explicitly.

scottbell commented 1 year ago

@akhenry to ask Mark Rose for how XTCE alarms will be defined for 👆

scottbell commented 1 year ago

After discussion, we decided to go with the assumption we'll have a defaultAlarm with a staticAlarmRange.

scottbell commented 1 year ago

To test:

shefalijoshi commented 1 year ago

Verified - I do see limits for the navcamPanAngle endpoint:

image