public class TcpModbusMessageDecoder
extends io.netty.handler.codec.ReplayingDecoder<net.solarnetwork.io.modbus.tcp.netty.TcpModbusMessageDecoder.DecoderState>
| Modifier and Type | Field | Description |
|---|---|---|
static int |
FIXED_HEADER_LENGTH |
The length of the fixed-length header.
|
| Constructor | Description |
|---|---|
TcpModbusMessageDecoder(boolean controller,
ConcurrentMap<Integer,TcpModbusMessage> pendingMessages) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in,
List<Object> out) |
callDecode, checkpoint, checkpoint, state, stateactualReadableBytes, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggeredchannelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtensureNotSharable, handlerAdded, isSharablepublic static final int FIXED_HEADER_LENGTH
public TcpModbusMessageDecoder(boolean controller,
ConcurrentMap<Integer,TcpModbusMessage> pendingMessages)
controller - true if operating as a controller where decoding is for
Modbus response message, or false if operating as a
responder where decoding is for Modbus request messagespendingMessages - a mapping of transaction IDs to associated messages, to handle
request and response pairingIllegalArgumentException - if any argument is null