WPILibC++  2019.1.1-beta-2-39-gff58c51
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Shuffleboard.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 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 <wpi/StringRef.h>
11 
12 #include "frc/shuffleboard/RecordingController.h"
13 #include "frc/shuffleboard/ShuffleboardEventImportance.h"
14 #include "frc/shuffleboard/ShuffleboardInstance.h"
15 
16 namespace frc {
17 
18 class ShuffleboardTab;
19 
60 class Shuffleboard final {
61  public:
66  static constexpr const char* kBaseTableName = "/Shuffleboard";
67 
74  static void Update();
75 
83  static ShuffleboardTab& GetTab(wpi::StringRef title);
84 
92  static void SelectTab(int index);
93 
99  static void SelectTab(wpi::StringRef title);
100 
108  static void EnableActuatorWidgets();
109 
116  static void DisableActuatorWidgets();
117 
122  static void StartRecording();
123 
128  static void StopRecording();
129 
147  static void SetRecordingFileNameFormat(wpi::StringRef format);
148 
155  static void ClearRecordingFileNameFormat();
156 
169  static void AddEventMarker(wpi::StringRef name, wpi::StringRef description,
170  ShuffleboardEventImportance importance);
171 
183  static void AddEventMarker(wpi::StringRef name,
184  ShuffleboardEventImportance importance);
185 
186  private:
187  static detail::ShuffleboardInstance& GetInstance();
188  static detail::RecordingController& GetRecordingController();
189 
190  // TODO usage reporting
191 
192  Shuffleboard() = default;
193 };
194 
195 } // namespace frc
196 
197 // Make use of references returned by member functions usable
198 #include "frc/shuffleboard/ShuffleboardTab.h"
Definition: RecordingController.h:23
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
static void ClearRecordingFileNameFormat()
Clears the custom name format for recording files.
static void SelectTab(int index)
Selects the tab in the dashboard with the given index in the range [0..n-1], where n is the number of...
Definition: ShuffleboardInstance.h:18
static void SetRecordingFileNameFormat(wpi::StringRef format)
Sets the file name format for new recording files to use.
static void StopRecording()
Stops data recording on the dashboard.
The Shuffleboard class provides a mechanism with which data can be added and laid out in the Shuffleb...
Definition: Shuffleboard.h:60
static void Update()
Updates all the values in Shuffleboard.
static void StartRecording()
Starts data recording on the dashboard.
static void DisableActuatorWidgets()
Disables user control of widgets containing actuators.
static ShuffleboardTab & GetTab(wpi::StringRef title)
Gets the Shuffleboard tab with the given title, creating it if it does not already exist...
Represents a tab in the Shuffleboard dashboard.
Definition: ShuffleboardTab.h:29
static void EnableActuatorWidgets()
Enables user control of widgets containing actuators: speed controllers, relays, etc.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
static constexpr const char * kBaseTableName
The name of the base NetworkTable into which all Shuffleboard data will be added. ...
Definition: Shuffleboard.h:66
static void AddEventMarker(wpi::StringRef name, wpi::StringRef description, ShuffleboardEventImportance importance)
Notifies Shuffleboard of an event.