WPILibC++  2019.4.1-5-gaab4c49
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
ShuffleboardEventImportance.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 namespace frc {
11 
12 // Maintainer note: this enum is mirrored in WPILibJ and in Shuffleboard
13 // Modifying the enum or enum strings requires a corresponding change to the
14 // Java enum and the enum in Shuffleboard
15 
16 enum ShuffleboardEventImportance { kTrivial, kLow, kNormal, kHigh, kCritical };
17 
18 inline wpi::StringRef ShuffleboardEventImportanceName(
19  ShuffleboardEventImportance importance) {
20  switch (importance) {
21  case kTrivial:
22  return "TRIVIAL";
23  case kLow:
24  return "LOW";
25  case kNormal:
26  return "NORMAL";
27  case kHigh:
28  return "HIGH";
29  case kCritical:
30  return "CRITICAL";
31  default:
32  return "NORMAL";
33  }
34 }
35 
36 } // namespace frc
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49