public abstract class DlmsConnection
extends java.lang.Object
implements java.lang.AutoCloseable
ConnectionBuilder
Modifier and Type | Method and Description |
---|---|
abstract java.util.List<MethodResult> |
action(boolean priority,
java.util.List<MethodParameter> params)
Requests the remote smart meter to call one or several methods with or without committed parameters
|
MethodResult |
action(boolean priority,
MethodParameter methodParameter)
Requests the remote smart meter to call one methods with or without committed parameters.
|
java.util.List<MethodResult> |
action(java.util.List<MethodParameter> params)
Convenience method to call
action(false, params) |
MethodResult |
action(MethodParameter methodParameter)
Requests the remote smart meter to call one methods with or without committed parameters.
|
void |
changeClientGlobalAuthenticationKey(byte[] key)
Change the global authentication key used by the client.
|
void |
changeClientGlobalEncryptionKey(byte[] key)
Change the global encryption used by the client.
|
void |
close()
Closes the connection.
|
void |
disconnect()
Disconnects gracefully from the server.
|
GetResult |
get(AttributeAddress attributeAddress)
Convenience method to call
#get(false, AttributeAddress) |
GetResult |
get(boolean priority,
AttributeAddress attributeAddress)
Requests the remote smart meter to send the values of several attributes.
|
abstract java.util.List<GetResult> |
get(boolean priority,
java.util.List<AttributeAddress> params)
Requests the remote smart meter to send the values of one or several attributes
|
java.util.List<GetResult> |
get(java.util.List<AttributeAddress> params)
Convenience method to call
#get(false, List) |
abstract java.util.List<AccessResultCode> |
set(boolean priority,
java.util.List<SetParameter> params)
Requests the remote smart meter to set one or several attributes to the committed values
|
AccessResultCode |
set(boolean priority,
SetParameter setParameter)
Requests the remote smart meter to set one attributes to the committed values.
|
java.util.List<AccessResultCode> |
set(java.util.List<SetParameter> params)
Convenience method to call
set(false, SetParameter...) |
AccessResultCode |
set(SetParameter setParameter)
Requests the remote smart meter to set one or several attributes to the committed values.
|
public final java.util.List<GetResult> get(java.util.List<AttributeAddress> params) throws java.io.IOException
#get(false, List)
params
- args of specifiers which attributes to send (See AttributeAddress
)java.io.IOException
- if the connection breaks, while requesting.
May be of type FatalJDlmsException
or ResponseTimeoutException
get(boolean, List)
public final GetResult get(AttributeAddress attributeAddress) throws java.io.IOException
#get(false, AttributeAddress)
attributeAddress
- specifiers which attributes to send (See AttributeAddress
)java.io.IOException
- if the connection breaks, while requesting.
May be of type FatalJDlmsException
or ResponseTimeoutException
get(boolean, AttributeAddress)
public final GetResult get(boolean priority, AttributeAddress attributeAddress) throws java.io.IOException
priority
- if true: sends this request with high priority, if supportedattributeAddress
- specifiers which attributes to send (See AttributeAddress
)java.io.IOException
- if the connection breaks, while requesting.
May be of type FatalJDlmsException
or ResponseTimeoutException
get(boolean, List)
public abstract java.util.List<GetResult> get(boolean priority, java.util.List<AttributeAddress> params) throws java.io.IOException
priority
- if true: sends this request with high priority, if supportedparams
- args of specifiers which attributes to send (See AttributeAddress
)java.io.IOException
- if the connection breaks, while requesting.
May be of type FatalJDlmsException
or ResponseTimeoutException
public final java.util.List<AccessResultCode> set(java.util.List<SetParameter> params) throws java.io.IOException
set(false, SetParameter...)
params
- args of specifier which attributes to set to which values (See SetParameter
)java.io.IOException
- if the connection breaks, while requesting.
May be of type FatalJDlmsException
or ResponseTimeoutException
set(boolean, List)
public abstract java.util.List<AccessResultCode> set(boolean priority, java.util.List<SetParameter> params) throws java.io.IOException
priority
- Sends this request with high priority, if supportedparams
- Varargs of specifier which attributes to set to which values (See SetParameter
)java.io.IOException
- if the connection breaks, while requesting.
May be of type FatalJDlmsException
or ResponseTimeoutException
public final AccessResultCode set(boolean priority, SetParameter setParameter) throws java.io.IOException
priority
- Sends this request with high priority, if supportedsetParameter
- Varargs of specifier which attributes to set to which values (See SetParameter
)java.io.IOException
- if the connection breaks, while requesting.
May be of type FatalJDlmsException
or ResponseTimeoutException
public final AccessResultCode set(SetParameter setParameter) throws java.io.IOException
Convenience method to call set(false, SetParameter)
setParameter
- attribute and values (see SetParameter
)java.io.IOException
- if the connection breaks, while requesting.
May be of type FatalJDlmsException
or ResponseTimeoutException
public final MethodResult action(boolean priority, MethodParameter methodParameter) throws java.io.IOException
priority
- Sends this request with high priority, if supportedmethodParameter
- method to be called and, if needed, what parameters to call (See MethodParameter
java.io.IOException
- if the connection breaks, while requesting.
May be of type FatalJDlmsException
or ResponseTimeoutException
public final MethodResult action(MethodParameter methodParameter) throws java.io.IOException
Convenience method to call action(false, methodParameter)
methodParameter
- specifier which method to be called and, if needed, what parameters to call (See
MethodParameter
java.io.IOException
- if the connection breaks, while requesting.
May be of type FatalJDlmsException
or ResponseTimeoutException
public final java.util.List<MethodResult> action(java.util.List<MethodParameter> params) throws java.io.IOException
action(false, params)
params
- List of specifier which methods to be called and, if needed, what parameters to call (See
MethodParameter
java.io.IOException
- if the connection breaks, while requesting.
May be of type FatalJDlmsException
or ResponseTimeoutException
public abstract java.util.List<MethodResult> action(boolean priority, java.util.List<MethodParameter> params) throws java.io.IOException
priority
- Sends this request with high priority, if supportedparams
- List of specifier which methods to be called and, if needed, what parameters to call (See
MethodParameter
java.io.IOException
- if the connection breaks, while requesting.
May be of type FatalJDlmsException
or ResponseTimeoutException
public void disconnect() throws java.io.IOException
java.io.IOException
- if an I/O Exception occurs while closingpublic void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
java.io.IOException
- if an I/O Exception occurs while closingpublic void changeClientGlobalAuthenticationKey(byte[] key)
key
- the new keypublic void changeClientGlobalEncryptionKey(byte[] key)
key
- the new key