|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.jmodbus.Modbus
Class to represent a Modbus device. This is a base class that will be extended by classes representing both Master and Slave implementations.
Field Summary | |
static int |
ADDRESS_MAX
Highest permissible address value. |
static byte |
COIL_OFF
Command code to turn a single coil off. |
static byte |
COIL_ON
Command code to turn a single coil on. |
static int |
debug
Flag to adjust the debug output level at compile time. |
static byte |
EXCEPTION_MODIFIER
Function code modfifer for exceptions. |
static byte |
ILLEGAL_DATA_ADDRESS
Exception code to signify that the request contains an illegal data address. |
static byte |
ILLEGAL_DATA_VALUE
Exception code to signify that the request contains an illegal data value. |
static byte |
ILLEGAL_FUNCTION
Exception code to signify that the function code is unknown or illegal. |
static byte |
ILLEGAL_RESPONSE_LENGTH
Exception code to signify that the request whould have generated an illegaly long response. |
static int |
MAX_MESSAGE_LENGTH
Longest legal message length. |
static byte |
READ_COILS
Command code to read multiple coils. |
static byte |
READ_EXCEPTION_STATUS
Command code to read the exception status. |
static byte |
READ_INPUT_DISCRETES
Command code to read read input discretes. |
static byte |
READ_INPUT_REGISTERS
Command code to read imput registers. |
static byte |
READ_MULTIPLE_REGISTERS
Command code to read multiple registers. |
protected ModbusTransport |
transport
Modbus transport object that will be used to perform all communication of Modbus messages. |
static int |
UINT16_MAX
The maximum value for a 16 bit unsigend integer. |
static int |
UINT16_MIN
The minimum value for a 16 bit unsigned integer. |
static int |
UINT8_MAX
The maximum value for a 8 bit unsigend integer. |
static int |
UINT8_MIN
The minimum value for a 8 bit unsigned integer. |
static byte |
WRITE_COIL
Command code to write a single coil. |
static byte |
WRITE_MULTIPLE_REGISTERS
Command code to write multiple registers. |
static byte |
WRITE_SINGLE_REGISTER
Command code to write a single register. |
Constructor Summary | |
protected |
Modbus(ModbusTransport transport)
Class constructor. |
Method Summary | |
boolean |
receiveFrame(ModbusMessage msg)
Method to receive a Modbus frame via the transport media. |
boolean |
sendFrame(ModbusMessage msg)
Method to send a Modbus frame via the transport media. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int debug
The debug levels are as follows:
public static final byte READ_MULTIPLE_REGISTERS
public static final byte READ_INPUT_REGISTERS
public static final byte WRITE_MULTIPLE_REGISTERS
public static final byte WRITE_SINGLE_REGISTER
public static final byte READ_COILS
public static final byte WRITE_COIL
public static final byte READ_INPUT_DISCRETES
public static final byte COIL_OFF
public static final byte COIL_ON
public static final byte READ_EXCEPTION_STATUS
public static final byte EXCEPTION_MODIFIER
public static final byte ILLEGAL_FUNCTION
public static final byte ILLEGAL_DATA_ADDRESS
public static final byte ILLEGAL_DATA_VALUE
public static final byte ILLEGAL_RESPONSE_LENGTH
public static final int ADDRESS_MAX
public static final int MAX_MESSAGE_LENGTH
public static int UINT16_MAX
public static int UINT16_MIN
public static int UINT8_MAX
public static int UINT8_MIN
protected ModbusTransport transport
Constructor Detail |
protected Modbus(ModbusTransport transport)
transport
- The ModbusTransport object that should be used by this
Modbus object to send and receive Modbus frames.Method Detail |
public boolean sendFrame(ModbusMessage msg)
msg
- The Modbus Message to be sent.public boolean receiveFrame(ModbusMessage msg)
msg
- The Modbus Message object for received data to be written into
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |