net.wimpi.modbus
Interface Modbus


public interface Modbus

Interface defining all constants related to the Modbus protocol.

Version:
@version@ (@date@)
Author:
Dieter Wimberger

Field Summary
static int COIL_OFF
          Defines the byte representation of the coil state pos.
static byte[] COIL_OFF_BYTES
          Defines the word representation of the coil state pos.
static int COIL_ON
          Defines the byte representation of the coil state on.
static byte[] COIL_ON_BYTES
          Defines the word representation of the coil state on.
static boolean debug
          JVM flag for debug mode.
static int DEFAULT_PORT
          Defines the default port number of Modbus (=502).
static int DEFAULT_PROTOCOL_ID
          Defines the default protocol identifier (=0).
static boolean DEFAULT_RECONNECTING
          Defines the default reconnecting setting for transactions (=false).
static int DEFAULT_RETRIES
          Defines the default amount of retires for opening a connection (=3).
static String DEFAULT_SERIAL_ENCODING
          Defines the default serial encoding (ASCII).
static int DEFAULT_TIMEOUT
          Defines the default setting for I/O operation timeouts in milliseconds (=3000).
static int DEFAULT_TRANSACTION_ID
          Defines the default transaction identifier (=0).
static int DEFAULT_TRANSMIT_DELAY
          Defines the default number of msec to delay before transmission (=50).
static int DEFAULT_UNIT_ID
          Defines the default unit identifier (=0).
static boolean DEFAULT_VALIDITYCHECK
          Defines the default setting for validity checking in transactions (=true).
static int EXCEPTION_OFFSET
          Defines the Modbus slave exception offset that is added to the function code, to flag an exception.
static int ILLEGAL_ADDRESS_EXCEPTION
          Defines the Modbus slave exception type illegal data address.
static int ILLEGAL_FUNCTION_EXCEPTION
          Defines the Modbus slave exception type illegal function.
static int ILLEGAL_VALUE_EXCEPTION
          Defines the Modbus slave exception type illegal data value.
static int MAX_BITS
          Defines the maximum number of bits in multiple read/write of input discretes or coils (2000).
static int MAX_MESSAGE_LENGTH
          Defines the maximum message length in bytes (=256).
static int MAX_TRANSACTION_ID
          Defines the maximum value of the transaction identifier.
static int READ_COILS
          Defines the class 1 function code for read coils.
static int READ_INPUT_DISCRETES
          Defines a class 1 function code for read input discretes.
static int READ_INPUT_REGISTERS
          Defines a class 1 function code for read input registers.
static int READ_MULTIPLE_REGISTERS
          Defines the class 0 function code for read multiple registers.
static String SERIAL_ENCODING_ASCII
          Defines the serial encoding "ASCII".
static String SERIAL_ENCODING_BIN
          Defines the serial encoding "BIN".
static String SERIAL_ENCODING_RTU
          Defines the serial encoding "RTU".
static int WRITE_COIL
          Defines a class 1 function code for write coil.
static int WRITE_MULTIPLE_COILS
          Defines a standard function code for write multiple coils.
static int WRITE_MULTIPLE_REGISTERS
          Defines the class 0 function code for write multiple registers.
static int WRITE_SINGLE_REGISTER
          Defines a class 1 function code for write single register.
 

Field Detail

debug

static final boolean debug
JVM flag for debug mode. Can be set passing the system property net.wimpi.modbus.debug=false|true (-D flag to the jvm).


READ_MULTIPLE_REGISTERS

static final int READ_MULTIPLE_REGISTERS
Defines the class 0 function code for read multiple registers.

See Also:
Constant Field Values

WRITE_MULTIPLE_REGISTERS

static final int WRITE_MULTIPLE_REGISTERS
Defines the class 0 function code for write multiple registers.

See Also:
Constant Field Values

READ_COILS

static final int READ_COILS
Defines the class 1 function code for read coils.

See Also:
Constant Field Values

READ_INPUT_DISCRETES

static final int READ_INPUT_DISCRETES
Defines a class 1 function code for read input discretes.

See Also:
Constant Field Values

READ_INPUT_REGISTERS

static final int READ_INPUT_REGISTERS
Defines a class 1 function code for read input registers.

See Also:
Constant Field Values

WRITE_COIL

static final int WRITE_COIL
Defines a class 1 function code for write coil.

See Also:
Constant Field Values

WRITE_MULTIPLE_COILS

static final int WRITE_MULTIPLE_COILS
Defines a standard function code for write multiple coils.

See Also:
Constant Field Values

WRITE_SINGLE_REGISTER

static final int WRITE_SINGLE_REGISTER
Defines a class 1 function code for write single register.

See Also:
Constant Field Values

COIL_ON

static final int COIL_ON
Defines the byte representation of the coil state on.

See Also:
Constant Field Values

COIL_OFF

static final int COIL_OFF
Defines the byte representation of the coil state pos.

See Also:
Constant Field Values

COIL_ON_BYTES

static final byte[] COIL_ON_BYTES
Defines the word representation of the coil state on.


COIL_OFF_BYTES

static final byte[] COIL_OFF_BYTES
Defines the word representation of the coil state pos.


MAX_BITS

static final int MAX_BITS
Defines the maximum number of bits in multiple read/write of input discretes or coils (2000).

See Also:
Constant Field Values

EXCEPTION_OFFSET

static final int EXCEPTION_OFFSET
Defines the Modbus slave exception offset that is added to the function code, to flag an exception.

See Also:
Constant Field Values

ILLEGAL_FUNCTION_EXCEPTION

static final int ILLEGAL_FUNCTION_EXCEPTION
Defines the Modbus slave exception type illegal function. This exception code is returned if the slave:

See Also:
Constant Field Values

ILLEGAL_ADDRESS_EXCEPTION

static final int ILLEGAL_ADDRESS_EXCEPTION
Defines the Modbus slave exception type illegal data address. This exception code is returned if the reference:

See Also:
Constant Field Values

ILLEGAL_VALUE_EXCEPTION

static final int ILLEGAL_VALUE_EXCEPTION
Defines the Modbus slave exception type illegal data value. This exception code indicates a fault in the structure of the data values of a complex request, such as an incorrect implied length.
This code does not indicate a problem with application specific validity of the value.

See Also:
Constant Field Values

DEFAULT_PORT

static final int DEFAULT_PORT
Defines the default port number of Modbus (=502).

See Also:
Constant Field Values

MAX_MESSAGE_LENGTH

static final int MAX_MESSAGE_LENGTH
Defines the maximum message length in bytes (=256).

See Also:
Constant Field Values

DEFAULT_TRANSACTION_ID

static final int DEFAULT_TRANSACTION_ID
Defines the default transaction identifier (=0).

See Also:
Constant Field Values

DEFAULT_PROTOCOL_ID

static final int DEFAULT_PROTOCOL_ID
Defines the default protocol identifier (=0).

See Also:
Constant Field Values

DEFAULT_UNIT_ID

static final int DEFAULT_UNIT_ID
Defines the default unit identifier (=0).

See Also:
Constant Field Values

DEFAULT_VALIDITYCHECK

static final boolean DEFAULT_VALIDITYCHECK
Defines the default setting for validity checking in transactions (=true).

See Also:
Constant Field Values

DEFAULT_TIMEOUT

static final int DEFAULT_TIMEOUT
Defines the default setting for I/O operation timeouts in milliseconds (=3000).

See Also:
Constant Field Values

DEFAULT_RECONNECTING

static final boolean DEFAULT_RECONNECTING
Defines the default reconnecting setting for transactions (=false).

See Also:
Constant Field Values

DEFAULT_RETRIES

static final int DEFAULT_RETRIES
Defines the default amount of retires for opening a connection (=3).

See Also:
Constant Field Values

DEFAULT_TRANSMIT_DELAY

static final int DEFAULT_TRANSMIT_DELAY
Defines the default number of msec to delay before transmission (=50).

See Also:
Constant Field Values

MAX_TRANSACTION_ID

static final int MAX_TRANSACTION_ID
Defines the maximum value of the transaction identifier.

See Also:
Constant Field Values

SERIAL_ENCODING_ASCII

static final String SERIAL_ENCODING_ASCII
Defines the serial encoding "ASCII".

See Also:
Constant Field Values

SERIAL_ENCODING_RTU

static final String SERIAL_ENCODING_RTU
Defines the serial encoding "RTU".

See Also:
Constant Field Values

SERIAL_ENCODING_BIN

static final String SERIAL_ENCODING_BIN
Defines the serial encoding "BIN".

See Also:
Constant Field Values

DEFAULT_SERIAL_ENCODING

static final String DEFAULT_SERIAL_ENCODING
Defines the default serial encoding (ASCII).

See Also:
Constant Field Values


Copyright © 2010. All Rights Reserved.