Package frc.spectrumLib.hardware
Enum Class Rio
- All Implemented Interfaces:
Serializable,Comparable<Rio>,Constable
Identifies the specific RoboRIO that is running, keyed by its serial number. Used to select
robot-specific configurations at startup.
Serial numbers are printed on the label on the back of the RoboRIO — prefix with a leading zero if needed. Keep entries in lexical order. Note that the serial number may change after reflashing the RoboRIO.
Based on: https://github.com/Team100/all24/blob/2a109b28467cfddcafb93c7fc85ef60b56a628a2/lib/src/main/java/org/team100/lib/config/Identity.java
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanisRio2()Returnstrueif this RoboRIO is a second-generation (RIO 2.0) controller.static RioReturns the enum constant of this class with the specified name.static Rio[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PHOTON2026
-
PM_2026
-
FM_2025
-
FM_2024
-
SIM
-
UNKNOWN
-
-
Field Details
-
id
TheRioconstant that matches the hardware running this code. -
CANIVORE
CANivore bus selector that chooses the first CANivore found on the system.- See Also:
-
RIO_CANBUS
CAN bus name for the native RoboRIO CAN interface.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isRio2
public boolean isRio2()Returnstrueif this RoboRIO is a second-generation (RIO 2.0) controller.- Returns:
truefor RIO 2.0,falsefor RIO 1.0
-