public class UDPMasterConnection extends Object
| Constructor and Description |
|---|
UDPMasterConnection(InetAddress adr)
Constructs a UDPMasterConnection instance
with a given destination address.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this UDPMasterConnection.
|
void |
connect()
Opens this UDPMasterConnection.
|
InetAddress |
getAddress()
Returns the destination InetAddress of this
UDPMasterConnection.
|
ModbusTransport |
getModbusTransport()
Returns the ModbusTransport associated with this
UDPMasterConnection.
|
int |
getPort()
Returns the destination port of this
UDPMasterConnection.
|
UDPTerminal |
getTerminal()
Returns the terminal used for handling the package traffic.
|
int |
getTimeout()
Returns the timeout for this UDPMasterConnection.
|
boolean |
isConnected()
Tests if this UDPMasterConnection is connected.
|
void |
setAddress(InetAddress adr)
Sets the destination InetAddress of this
UDPMasterConnection.
|
void |
setPort(int port)
Sets the destination port of this
UDPMasterConnection.
|
void |
setTimeout(int timeout)
Sets the timeout for this UDPMasterConnection.
|
public UDPMasterConnection(InetAddress adr)
adr - the destination InetAddress.public void connect()
throws Exception
Exception - if there is a network failure.public void close()
public ModbusTransport getModbusTransport()
public UDPTerminal getTerminal()
public int getTimeout()
public void setTimeout(int timeout)
timeout - the timeout as int.public int getPort()
public void setPort(int port)
port - the port number as int.public InetAddress getAddress()
public void setAddress(InetAddress adr)
adr - the destination address as InetAddress.public boolean isConnected()
Copyright © 2017. All rights reserved.