mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[ntcore] NetworkTables 4 (#3217)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user