Is there a way to "clear" a parameter's value from an algorithm?

21 views
Skip to first unread message

Sharon Lin

unread,
Nov 3, 2026, 3:09:28 PM (5 days ago) Nov 3
to yamcs
I am writing an algorithm to set some values based on incoming packets but will also need to clear other values to not have stale data. Is there a way to do that? I have tried setting the engineering value to null but that doesn't seem to work. Thanks!

Regards,
Sharon

Nicolae Mihalache

unread,
Nov 4, 2026, 4:32:56 AM (5 days ago) Nov 4
to ya...@googlegroups.com
Unfortunately there is no way to clear a parameter value. Conceptually this is questionable - a parameter had a value at one time, you cannot say after a while that that value was not there.

There is an expiration setting on the parameter; I don't know if it's feasible in your case to set the validity time for the parameter when you first set its value. If you can do that, then the parameter will appear as expired after that time passes.

Probably we need to expose that expiration time in the algorithm API and that's something which we can easily do if it will help you.

nicolae

--
You received this message because you are subscribed to the Google Groups "yamcs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yamcs+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/yamcs/3d7fdee4-419f-4a94-9235-4a6f7431fc99n%40googlegroups.com.

Sharon Lin

unread,
Nov 4, 2026, 12:05:38 PM (5 days ago) Nov 4
to yamcs
I see. Let me explain my use cases a little better. I think I was meaning more of whether it would be possible to set the current engineering value of a parameter to be null rather than clearing the value history of that parameter. The idea I am trying to implement is maintaining the state of a multiple clusters of nodes and here are a couple edge cases where there will be stale data (ex. a cluster disappears) that we want to clear. Right now, I am setting the "cleared" arrays to be 0 length but it is a bit more difficult to do the same sort of things with an aggregate through an algorithm. If there is a better way to do this, I am eager to hear your suggestions!

Thanks,
Sharon

Nicolae Mihalache

unread,
Nov 4, 2026, 1:51:53 PM (4 days ago) Nov 4
to ya...@googlegroups.com
The latest value of each parameter is maintained into a map in memory.  I guess we could add a function to the algorithms to remove a parameter from that map. Which means when you open a new display, it will not get any value for that parameter. But if you have it in a display, it will not disappear from there without refreshing the display.

What type is the parameter you want to clear?

Sharon Lin

unread,
Nov 5, 2026, 12:12:59 PM (4 days ago) Nov 5
to yamcs
Right now, I would need to clear arrays and aggregate parameters. When you say opening a new display, do you mean a yamcs web page? If the parameter is removed from the map, it will not automatically update in yamcs web under the parameters tab and will need a page refresh up show the parameter not having a value anymore? What would happen if I did a get request for the value of the parameter afterwards?
Reply all
Reply to author
Forward
0 new messages