RobotCore 1.0
WPILib port to raspberry Pi
Loading...
Searching...
No Matches
org.wpilib.system.RobotController Class Reference

Static Public Member Functions

static String getSerialNumber ()
static String getComments ()
static int getTeamNumber ()
static void setTimeSource (LongSupplier supplier)
static long getTime ()
static Time getMeasureTime ()
static long getMonotonicTime ()
static Time getMeasureMonotonicTime ()
static double getBatteryVoltage ()
static Voltage getMeasureBatteryVoltage ()
static boolean isSysActive ()
static boolean isBrownedOut ()
static int getCommsDisableCount ()
static boolean getRSLState ()
static boolean isSystemTimeValid ()
static double getInputVoltage ()
static Voltage getMeasureInputVoltage ()
static double getVoltage3V3 ()
static Voltage getMeasureVoltage3V3 ()
static double getCurrent3V3 ()
static Current getMeasureCurrent3V3 ()
static void setEnabled3V3 (boolean enabled)
static boolean getEnabled3V3 ()
static int getFaultCount3V3 ()
static void resetRailFaultCounts ()
static void setBrownoutVoltages (double brownoutVoltage, double recoveryVoltage)
static void setBrownoutVoltages (Voltage brownoutVoltage, Voltage recoveryVoltage)
static double getCPUTemp ()
static Temperature getMeasureCPUTemp ()
static CANStatus getCANStatus (CANPort busId)

Detailed Description

Contains functions for roboRIO functionality.

Definition at line 25 of file RobotController.java.

Member Function Documentation

◆ getBatteryVoltage()

double org.wpilib.system.RobotController.getBatteryVoltage ( )
static

Read the battery voltage.

Returns
The battery voltage in Volts.

Definition at line 117 of file RobotController.java.

◆ getCANStatus()

CANStatus org.wpilib.system.RobotController.getCANStatus ( CANPort busId)
static

Get the current status of the CAN bus.

Parameters
busIdThe bus ID
Returns
The status of the CAN bus

Definition at line 315 of file RobotController.java.

◆ getComments()

String org.wpilib.system.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.

Definition at line 49 of file RobotController.java.

◆ getCommsDisableCount()

int org.wpilib.system.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.

Definition at line 155 of file RobotController.java.

◆ getCPUTemp()

double org.wpilib.system.RobotController.getCPUTemp ( )
static

Get the current CPU temperature in degrees Celsius.

Returns
current CPU temperature in degrees Celsius

Definition at line 296 of file RobotController.java.

◆ getCurrent3V3()

double org.wpilib.system.RobotController.getCurrent3V3 ( )
static

Get the current output of the 3.3V rail.

Returns
The controller 3.3V rail output current value in Amps

Definition at line 218 of file RobotController.java.

◆ getEnabled3V3()

boolean org.wpilib.system.RobotController.getEnabled3V3 ( )
static

Get the enabled state of the 3.3V rail. The rail may be disabled due to a controller brownout, a short circuit on the rail, or controller over-voltage.

Returns
The controller 3.3V rail enabled value

Definition at line 246 of file RobotController.java.

◆ getFaultCount3V3()

int org.wpilib.system.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

Definition at line 255 of file RobotController.java.

◆ getInputVoltage()

double org.wpilib.system.RobotController.getInputVoltage ( )
static

Get the input voltage to the robot controller.

Returns
The controller input voltage value in Volts

Definition at line 182 of file RobotController.java.

◆ getMeasureBatteryVoltage()

Voltage org.wpilib.system.RobotController.getMeasureBatteryVoltage ( )
static

Read the battery voltage in a measure.

Returns
The battery voltage in a measure.

Definition at line 126 of file RobotController.java.

◆ getMeasureCPUTemp()

Temperature org.wpilib.system.RobotController.getMeasureCPUTemp ( )
static

Get the current CPU temperature in a measure.

Returns
current CPU temperature in a measure.

Definition at line 305 of file RobotController.java.

◆ getMeasureCurrent3V3()

Current org.wpilib.system.RobotController.getMeasureCurrent3V3 ( )
static

Get the current output in a measure of the 3.3V rail.

Returns
The controller 3.3V rail output current value in a measure.

Definition at line 227 of file RobotController.java.

◆ getMeasureInputVoltage()

Voltage org.wpilib.system.RobotController.getMeasureInputVoltage ( )
static

Get the input voltage to the robot controller in a measure.

Returns
The controller input voltage value in a measure.

Definition at line 191 of file RobotController.java.

◆ getMeasureMonotonicTime()

Time org.wpilib.system.RobotController.getMeasureMonotonicTime ( )
static

Read the nanosecond monotonic timer in a measure.

Returns
The current monotonic time in a measure.

Definition at line 108 of file RobotController.java.

◆ getMeasureTime()

Time org.wpilib.system.RobotController.getMeasureTime ( )
static

Read the nanosecond timestamp. By default, the time is based on the monotonic clock. 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 a measure.

Definition at line 90 of file RobotController.java.

◆ getMeasureVoltage3V3()

Voltage org.wpilib.system.RobotController.getMeasureVoltage3V3 ( )
static

Get the voltage in a measure of the 3.3V rail.

Returns
The controller 3.3V rail voltage value in a measure.

Definition at line 209 of file RobotController.java.

◆ getMonotonicTime()

long org.wpilib.system.RobotController.getMonotonicTime ( )
static

Read the nanosecond monotonic timer.

Returns
The current monotonic time in nanoseconds.

Definition at line 99 of file RobotController.java.

◆ getRSLState()

boolean org.wpilib.system.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

Definition at line 164 of file RobotController.java.

◆ getSerialNumber()

String org.wpilib.system.RobotController.getSerialNumber ( )
static

Return the serial number of the roboRIO.

Returns
The serial number of the roboRIO.

Definition at line 37 of file RobotController.java.

◆ getTeamNumber()

int org.wpilib.system.RobotController.getTeamNumber ( )
static

Returns the team number configured for the robot controller.

Returns
team number, or 0 if not found.

Definition at line 58 of file RobotController.java.

◆ getTime()

long org.wpilib.system.RobotController.getTime ( )
static

Read the nanosecond timestamp. By default, the time is based on the monotonic clock. 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 nanoseconds.

Definition at line 79 of file RobotController.java.

◆ getVoltage3V3()

double org.wpilib.system.RobotController.getVoltage3V3 ( )
static

Get the voltage of the 3.3V rail.

Returns
The controller 3.3V rail voltage value in Volts

Definition at line 200 of file RobotController.java.

◆ isBrownedOut()

boolean org.wpilib.system.RobotController.isBrownedOut ( )
static

Check if the system is browned out.

Returns
True if the system is browned out

Definition at line 145 of file RobotController.java.

◆ isSysActive()

boolean org.wpilib.system.RobotController.isSysActive ( )
static

Gets a value indicating whether 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.

Definition at line 136 of file RobotController.java.

◆ isSystemTimeValid()

boolean org.wpilib.system.RobotController.isSystemTimeValid ( )
static

Gets if the system time is valid.

Returns
True if the system time is valid, false otherwise

Definition at line 173 of file RobotController.java.

◆ resetRailFaultCounts()

void org.wpilib.system.RobotController.resetRailFaultCounts ( )
static

Reset the overcurrent fault counters for all user rails to 0.

Definition at line 260 of file RobotController.java.

◆ setBrownoutVoltages() [1/2]

void org.wpilib.system.RobotController.setBrownoutVoltages ( double brownoutVoltage,
double recoveryVoltage )
static

Set the voltages where the robot will enter and recover from brownout.

The brownout voltage must be between 5 V and 8 V, inclusive. The recovery voltage must be no greater than 8.5 V and at least 0.5 V above the brownout voltage.

Parameters
brownoutVoltagethe voltage where the robot will enter brownout
recoveryVoltagethe voltage where the robot will recover from brownout

Definition at line 273 of file RobotController.java.

◆ setBrownoutVoltages() [2/2]

void org.wpilib.system.RobotController.setBrownoutVoltages ( Voltage brownoutVoltage,
Voltage recoveryVoltage )
static

Set the voltages in measures where the robot will enter and recover from brownout.

The brownout voltage must be between 5 V and 8 V, inclusive. The recovery voltage must be no greater than 8.5 V and at least 0.5 V above the brownout voltage.

Parameters
brownoutVoltagethe voltage where the robot will enter brownout
recoveryVoltagethe voltage where the robot will recover from brownout

Definition at line 286 of file RobotController.java.

◆ setEnabled3V3()

void org.wpilib.system.RobotController.setEnabled3V3 ( boolean enabled)
static

Enables or disables the 3.3V rail.

Parameters
enabledwhether to enable the 3.3V rail.

Definition at line 236 of file RobotController.java.

◆ setTimeSource()

void org.wpilib.system.RobotController.setTimeSource ( LongSupplier supplier)
static

Sets a new source to provide the clock time in nanoseconds. Changing this affects the return value of getTime in Java.

Parameters
supplierFunction to return the time in nanoseconds.

Definition at line 68 of file RobotController.java.


The documentation for this class was generated from the following file: