WPILibC++  unspecified
NetworkButton.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2011-2017 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 <llvm/StringRef.h>
13 
14 #include "Buttons/Button.h"
15 #include "networktables/NetworkTable.h"
16 #include "networktables/NetworkTableEntry.h"
17 
18 namespace frc {
19 
20 class NetworkButton : public Button {
21  public:
23  NetworkButton(std::shared_ptr<nt::NetworkTable> table, llvm::StringRef field);
24  virtual ~NetworkButton() = default;
25 
26  virtual bool Get();
27 
28  private:
29  nt::NetworkTableEntry m_entry;
30 };
31 
32 } // namespace frc
Definition: Timer.cpp:18
Definition: NetworkButton.h:20
This class provides an easy way to link commands to OI inputs.
Definition: Button.h:27
NetworkTables Entry.
Definition: NetworkTableEntry.h:30
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:42