Enum Class CANBus.CANState
- All Implemented Interfaces:
Serializable, Comparable<CANBus.CANState>, Constable
- Enclosing class:
CANBus
Possible states of the CAN bus.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe controller is in the "Bus Off" state after detecting too many errors.The controller is in normal operation.The controller is in the "Error Passive" state and has detected many errors.The controller has detected errors and is approaching the Error Passive state.The controller has entered low-power sleep mode.The controller has been manually stopped. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic CANBus.CANStatevalueOf(int value) Gets CANState from specified valuestatic CANBus.CANStateReturns the enum constant of this class with the specified name.static CANBus.CANState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ErrorActive
The controller is in normal operation. -
ErrorWarning
The controller has detected errors and is approaching the Error Passive state. -
ErrorPassive
The controller is in the "Error Passive" state and has detected many errors. -
BusOff
The controller is in the "Bus Off" state after detecting too many errors. -
Stopped
The controller has been manually stopped. -
Sleeping
The controller has entered low-power sleep mode.
-
-
Field Details
-
value
public final int valueUnique integer value for this CANState.
-
-
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
-
valueOf
Gets CANState from specified value- Parameters:
value- Value of CANState- Returns:
- CANState of specified value
-