|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.jmodbus.ModbusTCPTransport
Class to implement a TCP transport mechanisim for Modbus communication. This will allow a decice to communicate via ModbusTCP, also known as Modnet.
Field Summary | |
static int |
DATA_MAX
The maximum number of bytes in the body of a Modbus TCP packet. |
static int |
HEADER_LENGTH
The length (in bytes) of the header of a Modbus TCP packet. |
static int |
MAX_TRANSACTION_LENGTH
The maximum length (in bytes) of a Modbus TCP packet. |
static int |
MODBUS_TCP_PORT
The TCP port number that Modbus TCP services should operate over. |
static short |
PROTOCOL_IDENTIFIER
The protocol identifier for Modbus TCP. |
Constructor Summary | |
ModbusTCPTransport(java.net.Socket socket)
Constructor for the ModbusTCPTransport. |
|
ModbusTCPTransport(java.lang.String host,
int port)
Constructor for the ModbusTCPTransport. |
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 MODBUS_TCP_PORT
public static final int HEADER_LENGTH
public static final int DATA_MAX
public static final int MAX_TRANSACTION_LENGTH
public static final short PROTOCOL_IDENTIFIER
Constructor Detail |
public ModbusTCPTransport(java.net.Socket socket)
public ModbusTCPTransport(java.lang.String host, int port)
Method Detail |
public boolean sendFrame(ModbusMessage msg)
sendFrame
in interface ModbusTransport
msg
- The Modbus Message to be sent.public boolean receiveFrame(ModbusMessage msg)
receiveFrame
in interface ModbusTransport
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 |