Network Tables constant value staleness ("reiteration")

I think this is a question for @Peter_Johnson ?

We use python NT raspberry pi clients to send vision targets to the java NT server in the rio, which uses a listener for updates. the server code has a timeout for updates, to avoid using stale target data. in testing today one of our students noticed that if the target didn’t move (e.g. camera and target stationary) then the listener never heard any updates. they tried keepDuplicates and sendAll on the python side but that didn’t change anything.

Is this working as intended? is the client forced-update failing? Is there another way to listen for updates on the server side that would work better? In general, if the transport elides duplicates then staleness seems like a tough thing to implement. Is the expectation to add domain-level timestamps, just to force non-duplication?

I was able to duplicate the situation here if you want to look at it but i think i’m more interested in the principle than the specific code: if an NT client “reiterates” a value, what’s the expected pattern for how the server or another client to perceive the freshness of the reiteration?

Thanks!

1 Like

Does the subscriber on the Rio side also have keepDuplicates=true (from your test code, it doesn’t look like it)? Currently, it needs to be set on both publisher and subscriber side. It’s on the TODO list to have these options driven by subscribers, so it would not be necessary to set on the publisher side at all, but setting the option only on the publisher side is insufficient (and always will be).

how do you do that with a listener? there’s no subscriber per se.

Create a MultiSubscriber (which in retrospect might have been better called PrefixSubscriber; naming things is hard) and listen to it.

perfect! thank you!