WPILibC++  2019.1.1-beta-2-47-gd528a77
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
RecordingController.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 <memory>
11 #include <string>
12 
13 #include <networktables/NetworkTable.h>
14 #include <networktables/NetworkTableInstance.h>
15 #include <wpi/SmallVector.h>
16 #include <wpi/StringRef.h>
17 
18 #include "frc/shuffleboard/ShuffleboardEventImportance.h"
19 
20 namespace frc {
21 namespace detail {
22 
23 class RecordingController final {
24  public:
25  explicit RecordingController(nt::NetworkTableInstance ntInstance);
26  virtual ~RecordingController() = default;
27 
28  void StartRecording();
29  void StopRecording();
30  void SetRecordingFileNameFormat(wpi::StringRef format);
31  void ClearRecordingFileNameFormat();
32 
33  void AddEventMarker(wpi::StringRef name, wpi::StringRef description,
34  ShuffleboardEventImportance importance);
35 
36  private:
37  nt::NetworkTableEntry m_recordingControlEntry;
38  nt::NetworkTableEntry m_recordingFileNameFormatEntry;
39  std::shared_ptr<nt::NetworkTable> m_eventsTable;
40 };
41 
42 } // namespace detail
43 } // namespace frc
Definition: RecordingController.h:23
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
NetworkTables Instance.
Definition: NetworkTableInstance.h:53
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
NetworkTables Entry.
Definition: NetworkTableEntry.h:38