WPILibC++  2020.3.2-60-g3011ebe
RobotController.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2017-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 <stdint.h>
11 
12 namespace frc {
13 
14 struct CANStatus {
15  float percentBusUtilization;
16  int busOffCount;
17  int txFullCount;
18  int receiveErrorCount;
19  int transmitErrorCount;
20 };
21 
23  public:
24  RobotController() = delete;
25 
33  static int GetFPGAVersion();
34 
44  static int64_t GetFPGARevision();
45 
52  static uint64_t GetFPGATime();
53 
59  static bool GetUserButton();
60 
69  static bool IsSysActive();
70 
76  static bool IsBrownedOut();
77 
83  static double GetInputVoltage();
84 
90  static double GetInputCurrent();
91 
97  static double GetVoltage3V3();
98 
104  static double GetCurrent3V3();
105 
113  static bool GetEnabled3V3();
114 
121  static int GetFaultCount3V3();
122 
128  static double GetVoltage5V();
129 
135  static double GetCurrent5V();
136 
144  static bool GetEnabled5V();
145 
152  static int GetFaultCount5V();
153 
159  static double GetVoltage6V();
160 
166  static double GetCurrent6V();
167 
175  static bool GetEnabled6V();
176 
183  static int GetFaultCount6V();
184 
185  static CANStatus GetCANStatus();
186 };
187 
188 } // namespace frc
frc::RobotController::GetUserButton
static bool GetUserButton()
Get the state of the "USER" button on the roboRIO.
frc::RobotController
Definition: RobotController.h:22
frc::RobotController::GetEnabled5V
static bool GetEnabled5V()
Get the enabled state of the 5V rail.
frc::RobotController::GetInputCurrent
static double GetInputCurrent()
Get the input current to the robot controller.
frc::RobotController::GetFPGARevision
static int64_t GetFPGARevision()
Return the FPGA Revision number.
frc::RobotController::GetVoltage3V3
static double GetVoltage3V3()
Get the voltage of the 3.3V rail.
frc::RobotController::GetVoltage6V
static double GetVoltage6V()
Get the voltage of the 6V rail.
frc::RobotController::GetCurrent5V
static double GetCurrent5V()
Get the current output of the 5V rail.
frc::RobotController::GetInputVoltage
static double GetInputVoltage()
Get the input voltage to the robot controller.
frc::RobotController::GetFaultCount3V3
static int GetFaultCount3V3()
Get the count of the total current faults on the 3.3V rail since the controller has booted.
frc::RobotController::GetFaultCount6V
static int GetFaultCount6V()
Get the count of the total current faults on the 6V rail since the controller has booted.
frc::RobotController::GetEnabled3V3
static bool GetEnabled3V3()
Get the enabled state of the 3.3V rail.
frc::RobotController::GetVoltage5V
static double GetVoltage5V()
Get the voltage of the 5V rail.
frc::RobotController::IsBrownedOut
static bool IsBrownedOut()
Check if the system is browned out.
frc
A class that enforces constraints on the differential drive kinematics.
Definition: PDPSim.h:16
frc::RobotController::GetCurrent6V
static double GetCurrent6V()
Get the current output of the 6V rail.
frc::CANStatus
Definition: RobotController.h:14
frc::RobotController::GetFaultCount5V
static int GetFaultCount5V()
Get the count of the total current faults on the 5V rail since the controller has booted.
frc::RobotController::GetCurrent3V3
static double GetCurrent3V3()
Get the current output of the 3.3V rail.
frc::RobotController::IsSysActive
static bool IsSysActive()
Check if the FPGA outputs are enabled.
frc::RobotController::GetFPGAVersion
static int GetFPGAVersion()
Return the FPGA Version number.
frc::RobotController::GetEnabled6V
static bool GetEnabled6V()
Get the enabled state of the 6V rail.
frc::RobotController::GetFPGATime
static uint64_t GetFPGATime()
Read the microsecond-resolution timer on the FPGA.