public class MessageManager extends Object
Constructor and Description |
---|
MessageManager(ProtocolOptions options) |
Modifier and Type | Method and Description |
---|---|
void |
encodeMessage(Object msg,
io.netty.buffer.ByteBuf buf) |
protected void |
handleUnknownMessage(byte typeId,
ASDUHeader header,
io.netty.buffer.ByteBuf data) |
io.netty.buffer.ByteBuf |
receiveMessage(InformationTransfer informationTransfer,
List<Object> out) |
<T> void |
registerClass(Class<T> clazz)
Register a message class to the protocol stack
|
void |
registerCodec(byte typeId,
InformationStructure informationStructure,
MessageCodec codec) |
protected void |
registerCodec(org.eclipse.neoscada.protocol.iec60870.asdu.MessageManager.MessageTypeId messageTypeId,
MessageCodec codec) |
public MessageManager(ProtocolOptions options)
public io.netty.buffer.ByteBuf receiveMessage(InformationTransfer informationTransfer, List<Object> out)
public void encodeMessage(Object msg, io.netty.buffer.ByteBuf buf)
protected void handleUnknownMessage(byte typeId, ASDUHeader header, io.netty.buffer.ByteBuf data)
protected void registerCodec(org.eclipse.neoscada.protocol.iec60870.asdu.MessageManager.MessageTypeId messageTypeId, MessageCodec codec)
public void registerCodec(byte typeId, InformationStructure informationStructure, MessageCodec codec)
public <T> void registerClass(Class<T> clazz)
If the requirements posed by this method don't fit the message class to
be registered it is possible to write a complete custom message codec
using registerCodec(byte, InformationStructure, MessageCodec)
.
The message class must:
public static T parse ( ProtocolOptions, byte, ASDUHeader, ByteBuf )
public void encode ( ProtocolOptions, ByteBuf )
In addition the class should implement the following interfaces
Encodeable
Encodeable.encode(ProtocolOptions, ByteBuf)
method.Dumpable
clazz
- the message class to register