Interface SessionLayer
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
HdlcLayer
,WrapperLayer
public interface SessionLayer extends java.lang.AutoCloseable
Interface to implement a DLMS SessionLayer.- See Also:
HdlcLayer
,WrapperLayer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
void
send(byte[] tSdu, int off, int len, RawMessageData.RawMessageDataBuilder rawMessageBuilder)
Writeslen
bytes from the specified byte array starting at offsetoff
to this output stream.void
startListening(SessionLayerListener eventListener)
Function to start the connection.
-
-
-
Method Detail
-
startListening
void startListening(SessionLayerListener eventListener) throws java.io.IOException
Function to start the connection.- Parameters:
eventListener
- the listener.- Throws:
java.io.IOException
- if an error occurs opening the connection to the remote meter.
-
send
void send(byte[] tSdu, int off, int len, RawMessageData.RawMessageDataBuilder rawMessageBuilder) throws java.io.IOException
Writeslen
bytes from the specified byte array starting at offsetoff
to this output stream.- Parameters:
tSdu
- the data.off
- the start offset in the data.len
- the number of bytes to write.rawMessageBuilder
- the raw byte array message builder for logging purposes.- Throws:
java.io.IOException
- if an I/O error occurs. In particular, an IOException is thrown if the output stream is closed.
-
close
void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.io.IOException
-
-