Enum Class Rio

java.lang.Object
java.lang.Enum<Rio>
frc.spectrumLib.hardware.Rio
All Implemented Interfaces:
Serializable, Comparable<Rio>, Constable

public enum Rio extends Enum<Rio>
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

  • Enum Constant Details

    • PHOTON2026

      public static final Rio PHOTON2026
    • PM_2026

      public static final Rio PM_2026
    • FM_2025

      public static final Rio FM_2025
    • FM_2024

      public static final Rio FM_2024
    • SIM

      public static final Rio SIM
    • UNKNOWN

      public static final Rio UNKNOWN
  • Field Details

    • id

      public static final Rio id
      The Rio constant that matches the hardware running this code.
    • CANIVORE

      public static final String CANIVORE
      CANivore bus selector that chooses the first CANivore found on the system.
      See Also:
    • RIO_CANBUS

      public static final String RIO_CANBUS
      CAN bus name for the native RoboRIO CAN interface.
      See Also:
  • Method Details

    • values

      public static Rio[] 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

      public static Rio valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • isRio2

      public boolean isRio2()
      Returns true if this RoboRIO is a second-generation (RIO 2.0) controller.
      Returns:
      true for RIO 2.0, false for RIO 1.0