public class TcpConnectionBuilder extends ConnectionBuilder<TcpConnectionBuilder>
Modifier and Type | Class and Description |
---|---|
static class |
TcpConnectionBuilder.InetTransportProtocol |
class |
TcpConnectionBuilder.TcpSettingsImpl |
ConnectionBuilder.SettingsImpl
Constructor and Description |
---|
TcpConnectionBuilder(java.net.InetAddress inetAddress)
Construct a
TcpConnectionBuilder with client ID 1, logical device address 16 and a default TCP port 4059. |
TcpConnectionBuilder(java.lang.String inetAddress) |
Modifier and Type | Method and Description |
---|---|
DlmsConnection |
build()
Builds a new DLMS/COSEM Connection, which is connected to the remote meter.
|
TcpConnectionBuilder |
setInetAddress(java.net.InetAddress inetAddress)
Set the Internet address of the remote meter.
|
TcpConnectionBuilder |
setPort(int port)
Set the port of the remote meter.
|
void |
setTranportProtocol(TcpConnectionBuilder.InetTransportProtocol tranportProtocol) |
TcpConnectionBuilder |
useHdlc() |
TcpConnectionBuilder |
useWrapper() |
buildConnection, setChallengeLength, setClientId, setHdlcMaxInformationLength, setLogicalDeviceId, setPhysicalDeviceAddress, setRawMessageListener, setReferencingMethod, setResponseTimeout, setSecuritySuite, setSnObjectMapping, setSystemTitle
public TcpConnectionBuilder(java.net.InetAddress inetAddress)
TcpConnectionBuilder
with client ID 1, logical device address 16 and a default TCP port 4059.inetAddress
- the Internet address of the remote meter.public TcpConnectionBuilder(java.lang.String inetAddress) throws java.net.UnknownHostException
java.net.UnknownHostException
public TcpConnectionBuilder setInetAddress(java.net.InetAddress inetAddress)
inetAddress
- the Internet address.public void setTranportProtocol(TcpConnectionBuilder.InetTransportProtocol tranportProtocol)
public TcpConnectionBuilder setPort(int port)
port
- the port.public TcpConnectionBuilder useHdlc()
public TcpConnectionBuilder useWrapper()
public DlmsConnection build() throws java.io.IOException
ConnectionBuilder
build
in class ConnectionBuilder<TcpConnectionBuilder>
DlmsConnection
with the given settings.java.io.IOException
- if an error occurs, while connecting to the meter.