public enum ModbusErrorCode extends Enum<ModbusErrorCode> implements ModbusError
| Enum Constant | Description |
|---|---|
Acknowledge |
Server has accepted request and is processing it, but a long duration of
time is required.
|
GatewayPathUnavailable |
Specialized for Modbus gateways.
|
GatewayTimeout |
Specialized for Modbus gateways.
|
IllegalDataAddress |
Data address of some or all the required entities are not allowed or do
not exist in server.
|
IllegalDataValue |
Value is not accepted by server.
|
IllegalFunction |
Function code received in the query is not recognized or allowed by
server.
|
MemoryParityError |
Server detected a parity error in memory.
|
NegativeAcknowledge |
Server cannot perform the programming functions.
|
ServerDeviceBusy |
Server is engaged in processing a long-duration command.
|
ServerDeviceFailure |
Unrecoverable error occurred while server was attempting to perform
requested action.
|
| Modifier and Type | Method | Description |
|---|---|---|
ModbusErrorCode |
errorCode() |
Get this error as a
ModbusErrorCode. |
static ModbusErrorCode |
forCode(byte code) |
Get an enum instance for a code value.
|
byte |
getCode() |
Get the error code value.
|
static ModbusError |
valueOf(byte code) |
|
static ModbusErrorCode |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static ModbusErrorCode[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfgetClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCodepublic static final ModbusErrorCode IllegalFunction
public static final ModbusErrorCode IllegalDataAddress
public static final ModbusErrorCode IllegalDataValue
public static final ModbusErrorCode ServerDeviceFailure
public static final ModbusErrorCode Acknowledge
public static final ModbusErrorCode ServerDeviceBusy
public static final ModbusErrorCode NegativeAcknowledge
public static final ModbusErrorCode MemoryParityError
public static final ModbusErrorCode GatewayPathUnavailable
public static final ModbusErrorCode GatewayTimeout
public static ModbusErrorCode[] values()
for (ModbusErrorCode c : ModbusErrorCode.values()) System.out.println(c);
public static ModbusErrorCode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic byte getCode()
ModbusErrorgetCode in interface ModbusErrorpublic ModbusErrorCode errorCode()
ModbusErrorModbusErrorCode.errorCode in interface ModbusErrorpublic static ModbusError valueOf(byte code)
public static ModbusErrorCode forCode(byte code)
code - the codeIllegalArgumentException - if code is not a valid value