|
Re: Timing of NetworkTables
The values written in SmartDashboard are marked as dirty. Dirty elements are sent to the other subscribers based on a clock. The default value for this clock is 100ms in LV. I'm not sure what it is on other implementations. The LV implementation lets you specify the update time value when the client or server are started.
Why is it done this way?
Making every write send a message over the network wouldn't work very well if/when someone writes to a SD variable a million times per second. So this amortization of updates is a pretty common approach for how you make a super fast thing link to a relatively slow thing, the last value is the most important, and you want to keep up to date.
The LV implementation also contains a VI called flush. This is there so that you can leave the update clock set to a relatively slow value, but when you have an image to process or something else that is timely, you can flush the update immediately after writing.
Greg McKaskle
|