WPILibC++  2020.3.2
ShuffleboardEventImportance.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2018-2020 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 namespace frc {
13 
14 // Maintainer note: this enum is mirrored in WPILibJ and in Shuffleboard
15 // Modifying the enum or enum strings requires a corresponding change to the
16 // Java enum and the enum in Shuffleboard
17 
18 enum ShuffleboardEventImportance { kTrivial, kLow, kNormal, kHigh, kCritical };
19 
20 inline wpi::StringRef ShuffleboardEventImportanceName(
21  ShuffleboardEventImportance importance) {
22  switch (importance) {
23  case kTrivial:
24  return "TRIVIAL";
25  case kLow:
26  return "LOW";
27  case kNormal:
28  return "NORMAL";
29  case kHigh:
30  return "HIGH";
31  case kCritical:
32  return "CRITICAL";
33  default:
34  return "NORMAL";
35  }
36 }
37 
38 } // namespace frc
wpi::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
frc
A class that enforces constraints on the differential drive kinematics.
Definition: SPIAccelerometerSim.h:16