| | |
| | | // 判断包头 |
| | | if (byteBuf.readByte() != Jtt809Constant.PACKET_HEAD_FLAG) { |
| | | byteBuf.resetReaderIndex(); |
| | | log.warn("消息包头错误: {}5d", ByteBufUtil.hexDump(byteBuf)); |
| | | log.warn("消息包头错误: {}", ByteBufUtil.hexDump(byteBuf)); |
| | | return; |
| | | } |
| | | // crc校验 |
| | |
| | | int id = byteBuf.readUnsignedShort(); |
| | | // 下级平台接入码 |
| | | int gnsscenterId = byteBuf.readInt(); |
| | | ctx.channel().attr(Jtt809Constant.NettyAttribute.GNSS_CENTER_ID).setIfAbsent(String.valueOf(gnsscenterId)); |
| | | // 协议版本号标识 |
| | | String version = "v" + byteBuf.readByte() + "." + byteBuf.readByte() + "." + byteBuf.readByte(); |
| | | // 报文加密标识位 |