Enum Class CANBus.CANState

java.lang.Object
java.lang.Enum<CANBus.CANState>
com.ctre.phoenix6.CANBus.CANState
All Implemented Interfaces:
Serializable, Comparable<CANBus.CANState>, Constable
Enclosing class:
CANBus

public static enum CANBus.CANState extends Enum<CANBus.CANState>
Possible states of the CAN bus.
  • Enum Constant Details

    • ErrorActive

      public static final CANBus.CANState ErrorActive
      The controller is in normal operation.
    • ErrorWarning

      public static final CANBus.CANState ErrorWarning
      The controller has detected errors and is approaching the Error Passive state.
    • ErrorPassive

      public static final CANBus.CANState ErrorPassive
      The controller is in the "Error Passive" state and has detected many errors.
    • BusOff

      public static final CANBus.CANState BusOff
      The controller is in the "Bus Off" state after detecting too many errors.
    • Stopped

      public static final CANBus.CANState Stopped
      The controller has been manually stopped.
    • Sleeping

      public static final CANBus.CANState Sleeping
      The controller has entered low-power sleep mode.
  • Field Details

    • value

      public final int value
      Unique integer value for this CANState.
  • Method Details

    • values

      public static CANBus.CANState[] 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 CANBus.CANState 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
    • valueOf

      public static CANBus.CANState valueOf(int value)
      Gets CANState from specified value
      Parameters:
      value - Value of CANState
      Returns:
      CANState of specified value