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 roboRIO that is running, keyed by its serial number, so a robot-specific config can be selected at startup.

Serial numbers are on the label on the back of the roboRIO, and a short one needs a leading zero. Reflashing the roboRIO can change the serial number.

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_2026

      public static final Rio FM_2026
    • OM_2026

      public static final Rio OM_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 constant matching the roboRIO this code is running on.
    • CANIVORE

      public static final String CANIVORE
      Bus name that selects the first CANivore the system has.
      See Also:
    • RIO_CANBUS

      public static final String RIO_CANBUS
      Bus name of the roboRIO's own 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()
      True for a RIO 2.0 controller, false for a RIO 1.0.