Enum Class CanandcolorDigoutSlot.Opcode

java.lang.Object
java.lang.Enum<CanandcolorDigoutSlot.Opcode>
com.reduxrobotics.sensors.canandcolor.CanandcolorDigoutSlot.Opcode
All Implemented Interfaces:
Serializable, Comparable<CanandcolorDigoutSlot.Opcode>, Constable
Enclosing class:
CanandcolorDigoutSlot

public static enum CanandcolorDigoutSlot.Opcode extends Enum<CanandcolorDigoutSlot.Opcode>
Enums corresponding to digout slot opcodes. For more information see the Canandcolor CAN spec
  • Enum Constant Details

  • Method Details

    • values

      public static CanandcolorDigoutSlot.Opcode[] 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 CanandcolorDigoutSlot.Opcode 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
    • getIndex

      public byte getIndex()
      Gets the corresponding index for the value in question.
      Returns:
      the index for the opcode (used in serialization)
    • fromIndex

      public static CanandcolorDigoutSlot.Opcode fromIndex(int idx)
      Returns a corresponding opcode from the given index.
      Parameters:
      idx - the index to fetch.
      Returns:
      a valid opcode. If invalid, returns equals immidiate.