1、打印收到未知消息码流

This commit is contained in:
weidong 2025-01-29 16:41:41 +08:00
parent bdacee54e6
commit 44c267f238
2 changed files with 5 additions and 3 deletions

View File

@ -46,7 +46,9 @@ public class RtcmUdpHandler extends ChannelInboundHandlerAdapter {
} }
BizExecutors.execute(message); BizExecutors.execute(message);
} catch (UnSupportedMessageException e) { } catch (UnSupportedMessageException e) {
logger.warn("receive un supported message: {}", e.getMessage()); byte[] data = new byte[packet.content().readableBytes()];
packet.content().getBytes(0, data);
logger.warn("receive un supported message: {}", DataTypeUtil.getHexString(data));
} catch (Exception e) { } catch (Exception e) {
logger.error("channel read error: {}", e.toString()); logger.error("channel read error: {}", e.toString());
} finally { } finally {

View File

@ -56,7 +56,7 @@ public class ApiController {
// send command // send command
ByteBuf buf = Unpooled.buffer(); ByteBuf buf = Unpooled.buffer();
byte[] data = getBinaryData(ConfigDataTypeEnum.HEX, configuration); byte[] data = getBinaryData(ConfigDataTypeEnum.HEX, configuration);
logger.info("send command:{}", configuration); logger.debug("send command:{}", configuration);
buf.writeBytes(data); buf.writeBytes(data);
deviceChannel.writeAndFlush(buf); deviceChannel.writeAndFlush(buf);
} }
@ -83,7 +83,7 @@ public class ApiController {
// send command // send command
ByteBuf buf = Unpooled.buffer(); ByteBuf buf = Unpooled.buffer();
byte[] data = getBinaryData(ConfigDataTypeEnum.HEX, configuration); byte[] data = getBinaryData(ConfigDataTypeEnum.HEX, configuration);
logger.info("send command:{}", configuration); logger.debug("send command:{}", configuration);
buf.writeBytes(data); buf.writeBytes(data);
deviceChannel.writeAndFlush(buf); deviceChannel.writeAndFlush(buf);
} }