|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.wimpi.modbus.net.TCPSlaveConnection
public class TCPSlaveConnection
Class that implements a TCPSlaveConnection.
| Field Summary | |
|---|---|
private boolean |
m_Connected
|
private ModbusTCPTransport |
m_ModbusTransport
|
private Socket |
m_Socket
|
private int |
m_Timeout
|
| Constructor Summary | |
|---|---|
TCPSlaveConnection(Socket socket)
Constructs a TCPSlaveConnection instance using a given socket instance. |
|
| Method Summary | |
|---|---|
void |
close()
Closes this TCPSlaveConnection. |
InetAddress |
getAddress()
Returns the destination InetAddress of this TCPMasterConnection. |
ModbusTransport |
getModbusTransport()
Returns the ModbusTransport associated with this TCPMasterConnection. |
int |
getPort()
Returns the destination port of this TCPMasterConnection. |
int |
getTimeout()
Returns the timeout for this TCPMasterConnection. |
boolean |
isConnected()
Tests if this TCPMasterConnection is connected. |
private void |
setSocket(Socket socket)
Prepares the associated ModbusTransport of this TCPMasterConnection for use. |
void |
setTimeout(int timeout)
Sets the timeout for this TCPSlaveConnection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Socket m_Socket
private int m_Timeout
private boolean m_Connected
private ModbusTCPTransport m_ModbusTransport
| Constructor Detail |
|---|
public TCPSlaveConnection(Socket socket)
socket - the socket instance to be used for communication.| Method Detail |
|---|
public void close()
public ModbusTransport getModbusTransport()
private void setSocket(Socket socket)
throws IOException
socket - the socket to be used for communication.
IOException - if an I/O related error occurs.public int getTimeout()
public void setTimeout(int timeout)
timeout - the timeout as int.public int getPort()
public InetAddress getAddress()
public boolean isConnected()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||