public class WrapperLayer extends java.lang.Object implements SessionLayer
Constructor and Description |
---|
WrapperLayer(TcpSettings settings,
TransportLayer transportLayer) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
send(byte[] tSdu,
int off,
int len,
RawMessageData.RawMessageDataBuilder rawMessageDataBuilder)
Writes
len bytes from the specified byte array starting at offset off to this output
stream. |
void |
startListening(org.openmuc.jdlms.internal.sessionlayer.SessionLayerListener eventListener)
Function to start the connection.
|
public WrapperLayer(TcpSettings settings, TransportLayer transportLayer) throws java.io.IOException
java.io.IOException
public void startListening(org.openmuc.jdlms.internal.sessionlayer.SessionLayerListener eventListener) throws java.io.IOException
SessionLayer
startListening
in interface SessionLayer
eventListener
- the listener.java.io.IOException
- if an error occurs opening the connection to the remote meter.public void send(byte[] tSdu, int off, int len, RawMessageData.RawMessageDataBuilder rawMessageDataBuilder) throws java.io.IOException
SessionLayer
len
bytes from the specified byte array starting at offset off
to this output
stream.send
in interface SessionLayer
tSdu
- the data.off
- the start offset in the data.len
- the number of bytes to write.rawMessageDataBuilder
- the raw byte array message builder for logging purposes.java.io.IOException
- if an I/O error occurs. In particular, an IOException is thrown if the output stream is closed.public void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
close
in interface SessionLayer
java.io.IOException