Enum Class ModbusSlaveErrorResponseException.KnownExceptionCode
java.lang.Object
java.lang.Enum<ModbusSlaveErrorResponseException.KnownExceptionCode>
org.openhab.core.io.transport.modbus.exception.ModbusSlaveErrorResponseException.KnownExceptionCode
- All Implemented Interfaces:
Serializable
,Comparable<ModbusSlaveErrorResponseException.KnownExceptionCode>
,Constable
- Enclosing class:
- ModbusSlaveErrorResponseException
public static enum ModbusSlaveErrorResponseException.KnownExceptionCode
extends Enum<ModbusSlaveErrorResponseException.KnownExceptionCode>
Enum for known exception codes that modbus slaves (servers) can used to indicate exceptions
- Author:
- Sami Salonen - Initial contribution
-
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 TypeMethodDescriptionint
tryFromExceptionCode
(int exceptionCode) Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ILLEGAL_FUNCTION
-
ILLEGAL_DATA_ACCESS
-
ILLEGAL_DATA_VALUE
-
SLAVE_DEVICE_FAILURE
-
ACKNOWLEDGE
-
SLAVE_DEVICE_BUSY
-
NEGATIVE_ACKNOWLEDGE
-
MEMORY_PARITY_ERROR
-
GATEWAY_PATH_UNVAVAILABLE
-
GATEWAY_TARGET_DEVICE_FAILED_TO_RESPOND
public static final ModbusSlaveErrorResponseException.KnownExceptionCode GATEWAY_TARGET_DEVICE_FAILED_TO_RESPOND
-
-
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
-
getExceptionCode
public int getExceptionCode() -
tryFromExceptionCode
public static Optional<ModbusSlaveErrorResponseException.KnownExceptionCode> tryFromExceptionCode(int exceptionCode)
-