jamod at SF

net.wimpi.modbus
Interface Modbus


public interface Modbus

Interface defining all constants related to the Modbus protocol.

Version:
1.2rc1 (09/11/2004)
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 java.lang.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 java.lang.String SERIAL_ENCODING_ASCII
          Defines the serial encoding "ASCII".
static java.lang.String SERIAL_ENCODING_BIN
          Defines the serial encoding "BIN".
static java.lang.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

public 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

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

See Also:
Constant Field Values

WRITE_MULTIPLE_REGISTERS

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

See Also:
Constant Field Values

READ_COILS

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

See Also:
Constant Field Values

READ_INPUT_DISCRETES

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

See Also:
Constant Field Values

READ_INPUT_REGISTERS

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

See Also:
Constant Field Values

WRITE_COIL

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

See Also:
Constant Field Values

WRITE_MULTIPLE_COILS

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

See Also:
Constant Field Values

WRITE_SINGLE_REGISTER

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

See Also:
Constant Field Values

COIL_ON

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

See Also:
Constant Field Values

COIL_OFF

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

See Also:
Constant Field Values

COIL_ON_BYTES

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


COIL_OFF_BYTES

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


MAX_BITS

public 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

public 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

public 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

public 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

public 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

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

See Also:
Constant Field Values

MAX_MESSAGE_LENGTH

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

See Also:
Constant Field Values

DEFAULT_TRANSACTION_ID

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

See Also:
Constant Field Values

DEFAULT_PROTOCOL_ID

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

See Also:
Constant Field Values

DEFAULT_UNIT_ID

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

See Also:
Constant Field Values

DEFAULT_VALIDITYCHECK

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

See Also:
Constant Field Values

DEFAULT_TIMEOUT

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

See Also:
Constant Field Values

DEFAULT_RECONNECTING

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

See Also:
Constant Field Values

DEFAULT_RETRIES

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

See Also:
Constant Field Values

DEFAULT_TRANSMIT_DELAY

public 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

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

See Also:
Constant Field Values

SERIAL_ENCODING_ASCII

public static final java.lang.String SERIAL_ENCODING_ASCII
Defines the serial encoding "ASCII".

See Also:
Constant Field Values

SERIAL_ENCODING_RTU

public static final java.lang.String SERIAL_ENCODING_RTU
Defines the serial encoding "RTU".

See Also:
Constant Field Values

SERIAL_ENCODING_BIN

public static final java.lang.String SERIAL_ENCODING_BIN
Defines the serial encoding "BIN".

See Also:
Constant Field Values

DEFAULT_SERIAL_ENCODING

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

See Also:
Constant Field Values

jamod at SF

Copyright © 2002-2004 jamod development team.