WPILibC++  2018.4.1-20180729181730-1145-g898076f
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
NetworkButton.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2011-2018 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 #include <memory>
11 
12 #include <networktables/NetworkTable.h>
13 #include <networktables/NetworkTableEntry.h>
14 #include <wpi/Twine.h>
15 
16 #include "frc/buttons/Button.h"
17 
18 namespace frc {
19 
20 class NetworkButton : public Button {
21  public:
22  NetworkButton(const wpi::Twine& tableName, const wpi::Twine& field);
23  NetworkButton(std::shared_ptr<nt::NetworkTable> table,
24  const wpi::Twine& field);
25  virtual ~NetworkButton() = default;
26 
27  virtual bool Get();
28 
29  private:
30  nt::NetworkTableEntry m_entry;
31 };
32 
33 } // namespace frc
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
Definition: NetworkButton.h:20
This class provides an easy way to link commands to OI inputs.
Definition: Button.h:26
NetworkTables Entry.
Definition: NetworkTableEntry.h:38
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:79