jamod at SF

net.wimpi.modbus.net
Class TCPSlaveConnection

java.lang.Object
  extended bynet.wimpi.modbus.net.TCPSlaveConnection

public class TCPSlaveConnection
extends java.lang.Object

Class that implements a TCPSlaveConnection.

Version:
1.2rc1 (09/11/2004)
Author:
Dieter Wimberger

Constructor Summary
TCPSlaveConnection(java.net.Socket socket)
          Constructs a TCPSlaveConnection instance using a given socket instance.
 
Method Summary
 void close()
          Closes this TCPSlaveConnection.
 java.net.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.
 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
 

Constructor Detail

TCPSlaveConnection

public TCPSlaveConnection(java.net.Socket socket)
Constructs a TCPSlaveConnection instance using a given socket instance.

Parameters:
socket - the socket instance to be used for communication.
Method Detail

close

public void close()
Closes this TCPSlaveConnection.


getModbusTransport

public ModbusTransport getModbusTransport()
Returns the ModbusTransport associated with this TCPMasterConnection.

Returns:
the connection's ModbusTransport.

getTimeout

public int getTimeout()
Returns the timeout for this TCPMasterConnection.

Returns:
the timeout as int.

setTimeout

public void setTimeout(int timeout)
Sets the timeout for this TCPSlaveConnection.

Parameters:
timeout - the timeout as int.

getPort

public int getPort()
Returns the destination port of this TCPMasterConnection.

Returns:
the port number as int.

getAddress

public java.net.InetAddress getAddress()
Returns the destination InetAddress of this TCPMasterConnection.

Returns:
the destination address as InetAddress.

isConnected

public boolean isConnected()
Tests if this TCPMasterConnection is connected.

Returns:
true if connected, false otherwise.

jamod at SF

Copyright © 2002-2004 jamod development team.