public class HdlcTcpConnectionBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
org.openmuc.jdlms.internal.ConfirmedMode |
confirmedMode |
Constructor and Description |
---|
HdlcTcpConnectionBuilder(java.net.InetAddress inetAddress)
Construct a
TcpConnectionBuilder with client access point 1, logical device address 16 and a default TCP
port 4059. |
Modifier and Type | Method and Description |
---|---|
LnClientConnection |
buildLnConnection()
Builds a new DLMS/COSEM LN Connection, which is connected to the remote meter.
|
SnClientConnection |
buildSnConnection()
Builds a new DLMS/COSEM SN Connection, which is connected to the remote meter.
|
T |
challengeLength(int challengeLength)
Change the used challenge length.
|
T |
clientAccessPoint(int clientAccessPoint) |
T |
deviceId(long deviceId)
Change the used device ID.
|
T |
enableEncryption(byte[] globalEncryptionKey)
Enable encryption.
|
T |
enablePasswordAuthentication(byte[] password)
Use Low Level Security (LLS) that uses a pre-shared password for authentication.
|
T |
logicalDeviceAddress(int logicalDeviceAddress) |
T |
manufactureId(java.lang.String manufactureId)
Sets the manufactore ID.
|
T |
responseTimeout(int responseTimeout)
Sets the time in milliseconds the client waits for a response.
|
T |
systemTitle(java.lang.String manufacturerId,
long deviceId)
Set the client's system title.
|
HdlcTcpConnectionBuilder |
tcpPort(int tcpPort)
Sets the server TCP port.
|
T |
useGmacAuthentication(byte[] authenticationKey,
byte[] encryptionKey)
Use High Level Security (HLS) 5 that uses GMAC.
|
T |
useMd5Authentication(byte[] authenticationKey)
Use High Level Security (HLS) 3 that uses MD5.
|
public HdlcTcpConnectionBuilder(java.net.InetAddress inetAddress)
TcpConnectionBuilder
with client access point 1, logical device address 16 and a default TCP
port 4059.inetAddress
- the Internet address of the remote meter.public HdlcTcpConnectionBuilder tcpPort(int tcpPort)
tcpPort
- the server portpublic LnClientConnection buildLnConnection() throws java.io.IOException
java.io.IOException
- if an error occurs, while connecting to the meter.public SnClientConnection buildSnConnection() throws java.io.IOException
java.io.IOException
- if an error occurs, while connecting to the meter.public T clientAccessPoint(int clientAccessPoint)
public T logicalDeviceAddress(int logicalDeviceAddress)
public T useGmacAuthentication(byte[] authenticationKey, byte[] encryptionKey)
authenticationKey
- the passwordencryptionKey
- encryption keypublic T challengeLength(int challengeLength)
challengeLength
- challenge lengthpublic T deviceId(long deviceId)
deviceId
- the device IDpublic T enableEncryption(byte[] globalEncryptionKey)
globalEncryptionKey
- encryption keypublic T useMd5Authentication(byte[] authenticationKey)
authenticationKey
- the passwordpublic T enablePasswordAuthentication(byte[] password)
password
- the passwordpublic T responseTimeout(int responseTimeout)
responseTimeout
- time in milliseconds.public T manufactureId(java.lang.String manufactureId)
manufactureId
- the manufactore IDpublic T systemTitle(java.lang.String manufacturerId, long deviceId)
manufacturerId
- the manufactore IDdeviceId
- the device ID