puzhibing
2 天以前 4ad32c37e3317fb6cb7cbfb034b53d3220c27db4
ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/util/jtt809/encoder/Jtt809Encoder.java
@@ -1,6 +1,5 @@
package com.ruoyi.dataInterchange.util.jtt809.encoder;
import com.ruoyi.dataInterchange.util.jtt809.common.ByteArrayUtil;
import com.ruoyi.dataInterchange.util.jtt809.common.CRC16CCITT;
import com.ruoyi.dataInterchange.util.jtt809.common.Jtt809Constant;
import com.ruoyi.dataInterchange.util.jtt809.common.Jtt809Util;
@@ -23,12 +22,7 @@
      if (packet == null) {
         return;
      }
      int gnsscenterId;
      if (ctx.channel().hasAttr(Jtt809Constant.NettyAttribute.GNSS_CENTER_ID)) {
         gnsscenterId = Integer.parseInt(ctx.channel().attr(Jtt809Constant.NettyAttribute.GNSS_CENTER_ID).get());
      } else {
         gnsscenterId = packet.getGnsscenterId();
      }
      int gnsscenterId = packet.getGnsscenterId();
      byte[] body = packet.getBody();
      if (body == null) {
         body = new byte[0];
@@ -72,9 +66,6 @@
      out.writeBytes(Jtt809Util.escape(escapeBytes));
      // 包尾标识
      out.writeByte(Jtt809Constant.PACKET_END_FLAG);
      byte[] readableBytes = new byte[out.readableBytes()];
      out.readBytes(readableBytes);
      log.info("下发数据包, packetLen : {}, packet : {}", readableBytes.length, ByteArrayUtil.bytes2HexStr(readableBytes));
   }
   
}