修正消息解码时,未将原码保存至 srcData 的问题
This commit is contained in:
parent
b556a3349f
commit
9495bcfcdb
@ -58,6 +58,11 @@ public class D3F0SelfCheckMessage extends BaseMessage {
|
||||
" reboot:"+src.readUnsignedShort();
|
||||
}
|
||||
|
||||
// read 会移动 bytebuf 的指针,所以保存原始码流需要将此指针挑拨回开始处
|
||||
src.readerIndex(0);
|
||||
this.srcData = new byte[src.readableBytes()];
|
||||
src.readBytes(this.srcData);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.imdroid.sideslope.message;
|
||||
|
||||
import com.imdroid.common.util.HexUtil;
|
||||
import com.imdroid.secapi.dto.GnssTrxMsg;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.Data;
|
||||
@ -60,6 +61,11 @@ public class D3F2StopIndicationMessage extends BaseMessage {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// read 会移动 bytebuf 的指针,所以保存原始码流需要将此指针挑拨回开始处
|
||||
src.readerIndex(0);
|
||||
this.srcData = new byte[src.readableBytes()];
|
||||
src.readBytes(this.srcData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user