7#include <networktables/DoubleTopic.h>
8#include <networktables/NetworkTableInstance.h>
37 std::function<
void(
double)> onUpdateCallback,
38 const double defaultValue = 0.0,
39 const bool forceUpdate =
true);
Subscribes to Network Tables entry updates and calls a specified callback to use the new value.
Definition nt_subscriber.h:17
void AddMonitor(const std::string &keyName, std::function< void(double)> onUpdateCallback, const double defaultValue=0.0, const bool forceUpdate=true)
Register a new listener for the specified key and send values to callback on update.
Definition nt_subscriber.cpp:27
~NTSubscriber()
Definition nt_subscriber.cpp:17
std::vector< NT_Entry > m_ntEntries
Publish/subscribe entries.
Definition nt_subscriber.h:43
std::vector< NT_Listener > m_ntListeners
Entry listeners.
Definition nt_subscriber.h:44
const std::string m_tableName
Table containing keys to monitor.
Definition nt_subscriber.h:42
Definition swap_controllers_command.h:12