| | |
| | | * 解析登录报文 |
| | | */ |
| | | public UPConnectReq decode(ByteBuf byteBuf) { |
| | | this.userId = byteBuf.readInt(); |
| | | this.password = Jtt809Util.readGBKString(byteBuf, 8); |
| | | this.downLinkIp = Jtt809Util.readGBKString(byteBuf, 32); |
| | | this.downLinkPort = byteBuf.readUnsignedShort(); |
| | | try { |
| | | this.userId = byteBuf.readInt(); |
| | | this.password = Jtt809Util.readGBKString(byteBuf, 8); |
| | | this.downLinkIp = Jtt809Util.readGBKString(byteBuf, 32); |
| | | this.downLinkPort = byteBuf.readUnsignedShort(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | return this; |
| | | } |
| | | |