Enum Class PcdError

java.lang.Object
java.lang.Enum<PcdError>
com.pi4j.crowpi.components.internal.rfid.PcdError
All Implemented Interfaces:
Serializable, Comparable<PcdError>, Constable

public enum PcdError extends Enum<PcdError>
Error types which can be signalled by the PCD
  • Enum Constant Details

    • PROTOCOL_ERR

      public static final PcdError PROTOCOL_ERR
    • PARITY_ERR

      public static final PcdError PARITY_ERR
    • CRC_ERR

      public static final PcdError CRC_ERR
    • COLL_ERR

      public static final PcdError COLL_ERR
    • BUFFER_OVFL

      public static final PcdError BUFFER_OVFL
    • TEMP_ERR

      public static final PcdError TEMP_ERR
    • WR_ERR

      public static final PcdError WR_ERR
  • Method Details

    • values

      public static PcdError[] 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 PcdError 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
    • getValue

      public byte getValue()
    • getDescription

      public String getDescription()
    • matchErrReg

      public static PcdError matchErrReg(byte errReg, PcdError... errors)
      Compares the given ERR register (previously read elsewhere) against a list of errors and returns the first match. If none of the specified errors are currently set in the ERR register, null is returned.
      Parameters:
      errReg - Value of ERR register
      errors - One or more errors to check for
      Returns:
      First active error found or null if none
    • isSet

      public boolean isSet(byte errReg)
      Helper method to determine if the ERR register (previously read elsewhere) has this specific error set.
      Parameters:
      errReg - Value of ERR register
      Returns:
      True if set, false if unset