mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Provide more extensive listener features.
This enables listeners to be notified of not only value updates, but also flag changes and deletions by using a bitmask to specify what notifications are desired. The old API (which only provided a new/not new) flag is still supported. This also subsumes the feature to listen to local changes (that's one of the bitmask options).
This commit is contained in:
@@ -181,15 +181,15 @@ void Flush();
|
||||
*/
|
||||
|
||||
typedef std::function<void(unsigned int uid, StringRef name,
|
||||
std::shared_ptr<Value> value, bool is_new)>
|
||||
EntryListenerCallback;
|
||||
std::shared_ptr<Value> value,
|
||||
unsigned int flags)> EntryListenerCallback;
|
||||
|
||||
typedef std::function<void(unsigned int uid, bool connected,
|
||||
const ConnectionInfo& conn)>
|
||||
ConnectionListenerCallback;
|
||||
|
||||
unsigned int AddEntryListener(StringRef prefix, EntryListenerCallback callback,
|
||||
bool immediate_notify, bool local_notify);
|
||||
unsigned int flags);
|
||||
void RemoveEntryListener(unsigned int entry_listener_uid);
|
||||
unsigned int AddConnectionListener(ConnectionListenerCallback callback,
|
||||
bool immediate_notify);
|
||||
|
||||
Reference in New Issue
Block a user