- All Implemented Interfaces:
Serializable
,Comparable<PcdError>
,Constable
Error types which can be signalled by the PCD
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte
getValue()
boolean
isSet
(byte errReg) Helper method to determine if the ERR register (previously read elsewhere) has this specific error set.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.static PcdError
Returns the enum constant of this class with the specified name.static PcdError[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PROTOCOL_ERR
-
PARITY_ERR
-
CRC_ERR
-
COLL_ERR
-
BUFFER_OVFL
-
TEMP_ERR
-
WR_ERR
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getValue
public byte getValue() -
getDescription
-
matchErrReg
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 registererrors
- 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
-