mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
Adds SetDefault methods to NetworkTables (#54)
There was no way to atomically check for a key in the table, and then setting if it if non existant. Back before persistent this was not a problem, however now it is, as its possible for values to be added before team's robot programs start. This makes the old method of calling Put*** methods in RobotInit invalid. This adds SetDefault methods, which do this atomically.
This commit is contained in:
committed by
Peter Johnson
parent
6615a34e99
commit
58092c5190
@@ -67,6 +67,7 @@ class Storage {
|
||||
// User functions. These are the actual implementations of the corresponding
|
||||
// user API functions in ntcore_cpp.
|
||||
std::shared_ptr<Value> GetEntryValue(StringRef name) const;
|
||||
bool SetDefaultEntryValue(StringRef name, std::shared_ptr<Value> value);
|
||||
bool SetEntryValue(StringRef name, std::shared_ptr<Value> value);
|
||||
void SetEntryTypeValue(StringRef name, std::shared_ptr<Value> value);
|
||||
void SetEntryFlags(StringRef name, unsigned int flags);
|
||||
|
||||
Reference in New Issue
Block a user