public abstract class ClientConnection
extends java.lang.Object
implements org.openmuc.jdlms.internal.transportlayer.TransportLayerConnectionListener
Modifier and Type | Method and Description |
---|---|
abstract java.util.List<MethodResult> |
action(boolean highPriority,
MethodParameter... params)
Requests the remote smart meter to call one or several methods with or without committed parameters
|
java.util.List<MethodResult> |
action(MethodParameter... params)
Convenience method to call
action(false, params) |
protected abstract int |
buildContextId() |
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() |
protected boolean |
confirmedModeEnabled() |
void |
connectionInterrupted(java.io.IOException e) |
protected org.openmuc.jdlms.internal.Settings |
connectionSettings() |
void |
dataReceived(byte[] data) |
void |
disconnect()
Convenience method to call
disconnect(true) |
void |
disconnect(boolean sendDisconnectMessage)
Disconnects connection to remote smart meter
|
java.util.List<GetResult> |
get(AttributeAddress... params)
Convenience method to call
get(false, params) |
abstract java.util.List<GetResult> |
get(boolean highPriority,
AttributeAddress... params)
Requests the remote smart meter to send the values of one or several attributes
|
protected abstract byte[] |
hlsAuthentication(byte[] processedChallenge) |
protected org.openmuc.jdlms.internal.asn1.cosem.Invoke_Id_And_Priority |
invokeIdAndPriorityFor(boolean highPriority) |
protected int |
maxSendPduSize() |
protected org.openmuc.jdlms.internal.asn1.cosem.Conformance |
negotiatedFeatures() |
protected abstract void |
processPdu(org.openmuc.jdlms.internal.asn1.cosem.COSEMpdu pdu) |
protected abstract org.openmuc.jdlms.internal.asn1.cosem.Conformance |
proposedConformance() |
protected void |
send(org.openmuc.jdlms.internal.asn1.cosem.COSEMpdu pdu) |
abstract java.util.List<AccessResultCode> |
set(boolean highPriority,
SetParameter... params)
Requests the remote smart meter to set one or several attributes to the committed values
|
java.util.List<AccessResultCode> |
set(SetParameter... params)
Convenience method to call
set(3000, params) |
protected abstract void |
validateReferencingMethod() |
protected abstract int buildContextId()
protected boolean confirmedModeEnabled()
protected org.openmuc.jdlms.internal.asn1.cosem.Conformance negotiatedFeatures()
protected int maxSendPduSize()
protected org.openmuc.jdlms.internal.asn1.cosem.Invoke_Id_And_Priority invokeIdAndPriorityFor(boolean highPriority)
protected void send(org.openmuc.jdlms.internal.asn1.cosem.COSEMpdu pdu) throws java.io.IOException
java.io.IOException
public void disconnect(boolean sendDisconnectMessage)
sendDisconnectMessage
- If a message to release the connection shall be sent to the remote client. This parameter must be true
on connectionless lower layer protocols (e.g. UDP) or if you want to give the remote end point a
chance to gracefully close the connectionpublic final java.util.List<GetResult> get(AttributeAddress... params) throws java.io.IOException, java.util.concurrent.TimeoutException
get(false, params)
params
- Varargs of specifiers which attributes to send (See AttributeAddress
)java.io.IOException
- throws IOExceptionjava.util.concurrent.TimeoutException
- if the request times outget(boolean, AttributeAddress...)
public abstract java.util.List<GetResult> get(boolean highPriority, AttributeAddress... params) throws java.io.IOException, java.util.concurrent.TimeoutException
highPriority
- if true: sends this request with high priority, if supportedparams
- Varargs of specifiers which attributes to send (See AttributeAddress
)java.io.IOException
- if the connection breaksjava.util.concurrent.TimeoutException
- if the request times outpublic final java.util.List<AccessResultCode> set(SetParameter... params) throws java.io.IOException
set(3000, params)
params
- Varargs of specifier which attributes to set to which values (See SetParameter
)java.io.IOException
- throws IOExceptionpublic abstract java.util.List<AccessResultCode> set(boolean highPriority, SetParameter... params) throws java.io.IOException
params
- Varargs of specifier which attributes to set to which values (See SetParameter
)highPriority
- Sends this request with high priority, if supportedjava.io.IOException
- throws IOExceptionpublic final java.util.List<MethodResult> action(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
- throws IOExceptionpublic abstract java.util.List<MethodResult> action(boolean highPriority, MethodParameter... params) throws java.io.IOException
params
- List of specifier which methods to be called and, if needed, what parameters to call (See
MethodParameter
highPriority
- Sends this request with high priority, if supportedjava.io.IOException
- if the connection breaks, while requestingpublic void disconnect()
disconnect(true)
disconnect(boolean)
public void close()
public void dataReceived(byte[] data)
dataReceived
in interface org.openmuc.jdlms.internal.transportlayer.TransportLayerConnectionListener
public void connectionInterrupted(java.io.IOException e)
connectionInterrupted
in interface org.openmuc.jdlms.internal.transportlayer.TransportLayerConnectionListener
public void changeClientGlobalAuthenticationKey(byte[] key)
key
- the new keypublic void changeClientGlobalEncryptionKey(byte[] key)
key
- the new keyprotected abstract org.openmuc.jdlms.internal.asn1.cosem.Conformance proposedConformance()
protected abstract void processPdu(org.openmuc.jdlms.internal.asn1.cosem.COSEMpdu pdu)
protected abstract void validateReferencingMethod() throws java.io.IOException
java.io.IOException
protected abstract byte[] hlsAuthentication(byte[] processedChallenge) throws java.io.IOException
java.io.IOException
protected org.openmuc.jdlms.internal.Settings connectionSettings()