Listening to changes on specific keys
This program shows how to listen for changes on two keys in NetworkTables using two different methods. One listens for changes of the key "X" in "/datatable" and the other listens for changes to the key "Y" in "datatable".
- Create a NetworkTableEntry object that refers to "/datatable/Y".
- Using a lambda, print a message every time the value "/datatable/X" is created or updated.
- Again using a lambda, print a message every time the value of "/datatable/Y" is created or changed.