【修改透传协议解析配置】

This commit is contained in:
weizhihong 2023-03-20 11:10:31 +08:00
parent 60fca3df21
commit 273a33dea1

View File

@ -46,8 +46,8 @@ public class AfcTransferServer implements ApplicationRunner {
@Override
public void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast(new ModbusTcpCodec(new ModbusRequestEncoder(), new ModbusResponseDecoder()));
pipeline.addLast(new ModbusTcpCodec(new ModbusResponseEncoder(), new ModbusRequestDecoder()));
pipeline.addLast(new ModbusTcpCodec(new ModbusRequestEncoder(), new ModbusRequestDecoder()));
pipeline.addLast(new ModbusTcpCodec(new ModbusResponseEncoder(), new ModbusResponseDecoder()));
pipeline.addLast(new AfcMessageHandler(plcGatewayConnectManager, modbusMessageHandler));
}
})