WPILibC++  2019.1.1-beta-2-14-gdf347e3
 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 EnableActuatorWidgets();
93 
100  static void DisableActuatorWidgets();
101 
106  static void StartRecording();
107 
112  static void StopRecording();
113 
131  static void SetRecordingFileNameFormat(wpi::StringRef format);
132 
139  static void ClearRecordingFileNameFormat();
140 
153  static void AddEventMarker(wpi::StringRef name, wpi::StringRef description,
154  ShuffleboardEventImportance importance);
155 
167  static void AddEventMarker(wpi::StringRef name,
168  ShuffleboardEventImportance importance);
169 
170  private:
171  static detail::ShuffleboardInstance& GetInstance();
172  static detail::RecordingController& GetRecordingController();
173 
174  // TODO usage reporting
175 
176  Shuffleboard() = default;
177 };
178 
179 } // namespace frc
180 
181 // Make use of references returned by member functions usable
182 #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.
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.