Enum Class SlotOpcode
- All Implemented Interfaces:
Serializable
,Comparable<SlotOpcode>
,Constable
Enum corresponding to digout slot opcodes.
For more information see the Canandcolor CAN spec
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionequals affineequals immidiategreater than or equals affinegreater than or equals immidiategreater than affinegreater than immidiateless than or equals affineless than or equals immidiateless than affineless than immidiateprevious clause trueprevious slot true -
Method Summary
Modifier and TypeMethodDescriptionstatic SlotOpcode
fromIndex
(int idx) Returns a corresponding opcode from the given index.byte
getIndex()
Gets the corresponding index for the value in question.static SlotOpcode
Returns the enum constant of this class with the specified name.static SlotOpcode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
kEqImmidiate
equals immidiate -
kLtImmidiate
less than immidiate -
kGtImmidiate
greater than immidiate -
kLeqImmidiate
less than or equals immidiate -
kGeqImmidiate
greater than or equals immidiate -
kEqAffine
equals affine -
kLtAffine
less than affine -
kGtAffine
greater than affine -
kLeqAffine
less than or equals affine -
kGeqAffine
greater than or equals affine -
kPrevSlotTrue
previous slot true -
kPrevClauseTrue
previous clause true
-
-
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
-
getIndex
public byte getIndex()Gets the corresponding index for the value in question.- Returns:
- the index for the opcode (used in serialization)
-
fromIndex
Returns a corresponding opcode from the given index.- Parameters:
idx
- the index to fetch.- Returns:
- a valid opcode. If invalid, returns equals immidiate.
-