Enum Class SlotOpcode

java.lang.Object
java.lang.Enum<SlotOpcode>
com.reduxrobotics.sensors.canandcolor.digout.SlotOpcode
All Implemented Interfaces:
Serializable, Comparable<SlotOpcode>, Constable

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

    • kEqImmidiate

      public static final SlotOpcode kEqImmidiate
      equals immidiate
    • kLtImmidiate

      public static final SlotOpcode kLtImmidiate
      less than immidiate
    • kGtImmidiate

      public static final SlotOpcode kGtImmidiate
      greater than immidiate
    • kLeqImmidiate

      public static final SlotOpcode kLeqImmidiate
      less than or equals immidiate
    • kGeqImmidiate

      public static final SlotOpcode kGeqImmidiate
      greater than or equals immidiate
    • kEqAffine

      public static final SlotOpcode kEqAffine
      equals affine
    • kLtAffine

      public static final SlotOpcode kLtAffine
      less than affine
    • kGtAffine

      public static final SlotOpcode kGtAffine
      greater than affine
    • kLeqAffine

      public static final SlotOpcode kLeqAffine
      less than or equals affine
    • kGeqAffine

      public static final SlotOpcode kGeqAffine
      greater than or equals affine
    • kPrevSlotTrue

      public static final SlotOpcode kPrevSlotTrue
      previous slot true
    • kPrevClauseTrue

      public static final SlotOpcode kPrevClauseTrue
      previous clause true
  • Method Details

    • values

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