WPILibC++  2018.4.1-20180819050225-1157-gb44f27d
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
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
static int GetFaultCount3V3()
Get the count of the total current faults on the 3.3V rail since the controller has booted...
static double GetInputVoltage()
Get the input voltage to the robot controller.
static int GetFaultCount6V()
Get the count of the total current faults on the 6V rail since the controller has booted...
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
static double GetVoltage6V()
Get the voltage of the 6V rail.
static double GetVoltage5V()
Get the voltage of the 5V rail.
static double GetCurrent6V()
Get the current output of the 6V rail.
static bool IsBrownedOut()
Check if the system is browned out.
static double GetCurrent3V3()
Get the current output of the 3.3V rail.
static bool IsSysActive()
Check if the FPGA outputs are enabled.
static bool GetEnabled3V3()
Get the enabled state of the 3.3V rail.
Definition: RobotController.h:22
static int GetFaultCount5V()
Get the count of the total current faults on the 5V rail since the controller has booted...
static uint64_t GetFPGATime()
Read the microsecond-resolution timer on the FPGA.
static bool GetEnabled5V()
Get the enabled state of the 5V rail.
static bool GetEnabled6V()
Get the enabled state of the 6V rail.
static int GetFPGAVersion()
Return the FPGA Version number.
static bool GetUserButton()
Get the state of the "USER" button on the roboRIO.
static double GetVoltage3V3()
Get the voltage of the 3.3V rail.
Definition: RobotController.h:14
static int64_t GetFPGARevision()
Return the FPGA Revision number.
static double GetCurrent5V()
Get the current output of the 5V rail.
static double GetInputCurrent()
Get the input current to the robot controller.