public class HdlcConnectionBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
long |
baudrateChangeTime |
org.openmuc.jdlms.internal.ConfirmedMode |
confirmedMode |
Constructor and Description |
---|
HdlcConnectionBuilder(java.lang.String serialPortName) |
Modifier and Type | Method and Description |
---|---|
HdlcConnectionBuilder |
baudrate(int baudrate) |
HdlcConnectionBuilder |
baudrateChangeTime(long baudrateChangeTime) |
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.
|
HdlcConnectionBuilder |
disableHandshake() |
T |
enableEncryption(byte[] globalEncryptionKey)
Enable encryption.
|
HdlcConnectionBuilder |
enableHandshake() |
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.
|
HdlcConnectionBuilder |
physicalDeviceAddress(int physicalDeviceAddress) |
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.
|
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 long baudrateChangeTime
public org.openmuc.jdlms.internal.ConfirmedMode confirmedMode
public HdlcConnectionBuilder(java.lang.String serialPortName)
public HdlcConnectionBuilder physicalDeviceAddress(int physicalDeviceAddress)
public HdlcConnectionBuilder disableHandshake()
public HdlcConnectionBuilder enableHandshake()
public HdlcConnectionBuilder baudrate(int baudrate)
public HdlcConnectionBuilder baudrateChangeTime(long baudrateChangeTime)
public 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