[ntcore] NetworkTables 4 (#3217)

This commit is contained in:
Peter Johnson
2022-10-08 10:01:31 -07:00
committed by GitHub
parent 90cfa00115
commit 77301b126c
380 changed files with 34573 additions and 22095 deletions

View File

@@ -7,6 +7,7 @@
#include <memory>
#include <string_view>
#include <networktables/BooleanTopic.h>
#include <networktables/NetworkTable.h>
#include <networktables/NetworkTableInstance.h>
@@ -23,9 +24,16 @@ class NetworkButton : public Button {
/**
* Creates a NetworkButton that commands can be bound to.
*
* @param entry The entry that is the value.
* @param topic The boolean topic that contains the value.
*/
explicit NetworkButton(nt::NetworkTableEntry entry);
explicit NetworkButton(nt::BooleanTopic topic);
/**
* Creates a NetworkButton that commands can be bound to.
*
* @param sub The boolean subscriber that provides the value.
*/
explicit NetworkButton(nt::BooleanSubscriber sub);
/**
* Creates a NetworkButton that commands can be bound to.
@@ -43,5 +51,15 @@ class NetworkButton : public Button {
* @param field The field that is the value.
*/
NetworkButton(std::string_view table, std::string_view field);
/**
* Creates a NetworkButton that commands can be bound to.
*
* @param inst The NetworkTable instance to use
* @param table The table where the networktable value is located.
* @param field The field that is the value.
*/
NetworkButton(nt::NetworkTableInstance inst, std::string_view table,
std::string_view field);
};
} // namespace frc2