mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
[ntcore] Change Java event mask to EnumSet (#4564)
Also convert NetworkTableInstance.getNetworkMode() to return EnumSet.
This commit is contained in:
@@ -223,6 +223,14 @@ class Event {
|
||||
*/
|
||||
unsigned int flags{0};
|
||||
|
||||
/**
|
||||
* Test event flags.
|
||||
*
|
||||
* @param kind event flag(s) to test
|
||||
* @return True if flags matches kind
|
||||
*/
|
||||
bool Is(unsigned int kind) const { return (flags & kind) != 0; }
|
||||
|
||||
/** Event data; content depends on flags. */
|
||||
std::variant<ConnectionInfo, TopicInfo, ValueEventData, LogMessage> data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user