|
@@ -105,9 +105,10 @@ public class PinShenData86ServerHandler extends HexBinaryAcceptanceHandlerAdapte
|
|
|
private void sendReq(Channel channel, PinShenWaterDevice device, byte[] rspBody, Byte gpsType) {
|
|
|
ByteBuf buffer = Unpooled.buffer();
|
|
|
byte[] rsp = new byte[] {};
|
|
|
-
|
|
|
+ int totalLength = 20+rspBody.length;
|
|
|
+ byte[] lengthArr = BitOperator.integerTo2Bytes(totalLength);
|
|
|
rsp = ArrayUtils.addAll(rsp, device.getIdentityArr());
|
|
|
- rsp = ArrayUtils.addAll(rsp, device.getLengthArr());
|
|
|
+ rsp = ArrayUtils.addAll(rsp, lengthArr);
|
|
|
rsp = ArrayUtils.add(rsp, device.getPackageNo());
|
|
|
rsp = ArrayUtils.add(rsp, gpsType);
|
|
|
rsp = ArrayUtils.add(rsp, device.getDstAddrLength());
|