#include <frc/RobotController.h>
|
static int | GetFPGAVersion () |
| Return the FPGA Version number.
|
|
static int64_t | GetFPGARevision () |
| Return the FPGA Revision number.
|
|
static std::string | GetSerialNumber () |
| Return the serial number of the roboRIO.
|
|
static std::string | GetComments () |
| Return the comments from the roboRIO web interface.
|
|
static int32_t | GetTeamNumber () |
| Returns the team number configured for the robot controller.
|
|
static void | SetTimeSource (std::function< uint64_t()> supplier) |
| Sets a new source to provide the clock time in microseconds.
|
|
static uint64_t | GetTime () |
| Read the microsecond timestamp.
|
|
static uint64_t | GetFPGATime () |
| Read the microsecond-resolution timer on the FPGA.
|
|
static units::volt_t | GetBatteryVoltage () |
| Read the battery voltage.
|
|
static bool | IsSysActive () |
| Check if the FPGA outputs are enabled.
|
|
static bool | IsBrownedOut () |
| Check if the system is browned out.
|
|
static int | GetCommsDisableCount () |
| Gets the number of times the system has been disabled due to communication errors with the Driver Station.
|
|
static bool | GetRSLState () |
| Gets the current state of the Robot Signal Light (RSL)
|
|
static bool | IsSystemTimeValid () |
| Gets if the system time is valid.
|
|
static double | GetInputVoltage () |
| Get the input voltage to the robot controller.
|
|
static double | GetVoltage3V3 () |
| Get the voltage of the 3.3V rail.
|
|
static double | GetCurrent3V3 () |
| Get the current output of the 3.3V rail.
|
|
static void | SetEnabled3V3 (bool enabled) |
| Enables or disables the 3.3V rail.
|
|
static bool | GetEnabled3V3 () |
| Get the enabled state of the 3.3V rail.
|
|
static int | GetFaultCount3V3 () |
| Get the count of the total current faults on the 3.3V rail since the code started.
|
|
static void | ResetRailFaultCounts () |
| Reset the overcurrent fault counters for all user rails to 0.
|
|
static units::volt_t | GetBrownoutVoltage () |
| Get the current brownout voltage setting.
|
|
static void | SetBrownoutVoltage (units::volt_t brownoutVoltage) |
| Set the voltage the roboRIO will brownout and disable all outputs.
|
|
static units::celsius_t | GetCPUTemp () |
| Get the current CPU temperature.
|
|
static CANStatus | GetCANStatus (int busId) |
| Get the current status of the CAN bus.
|
|
◆ RobotController()
frc::RobotController::RobotController |
( |
| ) |
|
|
delete |
◆ GetBatteryVoltage()
static units::volt_t frc::RobotController::GetBatteryVoltage |
( |
| ) |
|
|
static |
Read the battery voltage.
- Returns
- The battery voltage in Volts.
◆ GetBrownoutVoltage()
static units::volt_t frc::RobotController::GetBrownoutVoltage |
( |
| ) |
|
|
static |
Get the current brownout voltage setting.
- Returns
- The brownout voltage
◆ GetCANStatus()
static CANStatus frc::RobotController::GetCANStatus |
( |
int | busId | ) |
|
|
static |
Get the current status of the CAN bus.
- Parameters
-
- Returns
- The status of the CAN bus
◆ GetComments()
static std::string frc::RobotController::GetComments |
( |
| ) |
|
|
static |
Return the comments from the roboRIO web interface.
The comments string is cached after the first call to this function on the RoboRIO - restart the robot code to reload the comments string after changing it in the web interface.
- Returns
- The comments from the roboRIO web interface.
◆ GetCommsDisableCount()
static int frc::RobotController::GetCommsDisableCount |
( |
| ) |
|
|
static |
Gets the number of times the system has been disabled due to communication errors with the Driver Station.
- Returns
- number of disables due to communication errors.
◆ GetCPUTemp()
static units::celsius_t frc::RobotController::GetCPUTemp |
( |
| ) |
|
|
static |
Get the current CPU temperature.
- Returns
- current CPU temperature
◆ GetCurrent3V3()
static double frc::RobotController::GetCurrent3V3 |
( |
| ) |
|
|
static |
Get the current output of the 3.3V rail.
- Returns
- The controller 3.3V rail output current value in Amps
◆ GetEnabled3V3()
static bool frc::RobotController::GetEnabled3V3 |
( |
| ) |
|
|
static |
Get the enabled state of the 3.3V rail.
The rail may be disabled due to calling SetEnabled3V3(), a controller brownout, a short circuit on the rail, or controller over-voltage.
- Returns
- The controller 3.3V rail enabled value. True for enabled.
◆ GetFaultCount3V3()
static int frc::RobotController::GetFaultCount3V3 |
( |
| ) |
|
|
static |
Get the count of the total current faults on the 3.3V rail since the code started.
- Returns
- The number of faults
◆ GetFPGARevision()
static int64_t frc::RobotController::GetFPGARevision |
( |
| ) |
|
|
static |
Return the FPGA Revision number.
The format of the revision is 3 numbers. The 12 most significant bits are the Major Revision. The next 8 bits are the Minor Revision. The 12 least significant bits are the Build Number.
- Returns
- FPGA Revision number.
◆ GetFPGATime()
static uint64_t frc::RobotController::GetFPGATime |
( |
| ) |
|
|
static |
Read the microsecond-resolution timer on the FPGA.
- Returns
- The current time in microseconds according to the FPGA (since FPGA reset).
◆ GetFPGAVersion()
static int frc::RobotController::GetFPGAVersion |
( |
| ) |
|
|
static |
Return the FPGA Version number.
For now, expect this to be competition year.
- Returns
- FPGA Version number.
◆ GetInputVoltage()
static double frc::RobotController::GetInputVoltage |
( |
| ) |
|
|
static |
Get the input voltage to the robot controller.
- Returns
- The controller input voltage value in Volts
◆ GetRSLState()
static bool frc::RobotController::GetRSLState |
( |
| ) |
|
|
static |
Gets the current state of the Robot Signal Light (RSL)
- Returns
- The current state of the RSL- true if on, false if off
◆ GetSerialNumber()
static std::string frc::RobotController::GetSerialNumber |
( |
| ) |
|
|
static |
Return the serial number of the roboRIO.
- Returns
- The serial number of the roboRIO.
◆ GetTeamNumber()
static int32_t frc::RobotController::GetTeamNumber |
( |
| ) |
|
|
static |
Returns the team number configured for the robot controller.
- Returns
- team number, or 0 if not found.
◆ GetTime()
static uint64_t frc::RobotController::GetTime |
( |
| ) |
|
|
static |
Read the microsecond timestamp.
By default, the time is based on the FPGA hardware clock in microseconds since the FPGA started. However, the return value of this method may be modified to use any time base, including non-monotonic and non-continuous time bases.
- Returns
- The current time in microseconds.
◆ GetVoltage3V3()
static double frc::RobotController::GetVoltage3V3 |
( |
| ) |
|
|
static |
Get the voltage of the 3.3V rail.
- Returns
- The controller 3.3V rail voltage value in Volts
◆ IsBrownedOut()
static bool frc::RobotController::IsBrownedOut |
( |
| ) |
|
|
static |
Check if the system is browned out.
- Returns
- True if the system is browned out
◆ IsSysActive()
static bool frc::RobotController::IsSysActive |
( |
| ) |
|
|
static |
Check if the FPGA outputs are enabled.
The outputs may be disabled if the robot is disabled or e-stopped, the watchdog has expired, or if the roboRIO browns out.
- Returns
- True if the FPGA outputs are enabled.
◆ IsSystemTimeValid()
static bool frc::RobotController::IsSystemTimeValid |
( |
| ) |
|
|
static |
Gets if the system time is valid.
- Returns
- True if the system time is valid, false otherwise
◆ ResetRailFaultCounts()
static void frc::RobotController::ResetRailFaultCounts |
( |
| ) |
|
|
static |
Reset the overcurrent fault counters for all user rails to 0.
◆ SetBrownoutVoltage()
static void frc::RobotController::SetBrownoutVoltage |
( |
units::volt_t | brownoutVoltage | ) |
|
|
static |
Set the voltage the roboRIO will brownout and disable all outputs.
Note that this only does anything on the roboRIO 2. On the roboRIO it is a no-op.
- Parameters
-
brownoutVoltage | The brownout voltage |
◆ SetEnabled3V3()
static void frc::RobotController::SetEnabled3V3 |
( |
bool | enabled | ) |
|
|
static |
Enables or disables the 3.3V rail.
- Parameters
-
enabled | whether to enable the 3.3V rail. |
◆ SetTimeSource()
static void frc::RobotController::SetTimeSource |
( |
std::function< uint64_t()> | supplier | ) |
|
|
static |
Sets a new source to provide the clock time in microseconds.
Changing this affects the return value of GetTime
.
- Parameters
-
supplier | Function to return the time in microseconds. |
The documentation for this class was generated from the following file: