1078-设备注册兼容1078-2013
This commit is contained in:
@@ -62,11 +62,30 @@ public class J0100 extends Re {
|
|||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int i = buf.readUnsignedShort();
|
|
||||||
// decode as 2013
|
// decode as 2013
|
||||||
}
|
cityId = buf.readUnsignedShort();
|
||||||
// 发送终端注册消息
|
// decode as 2019
|
||||||
|
byte[] bytes5 = new byte[5];
|
||||||
|
buf.readBytes(bytes5);
|
||||||
|
makerId = new String(bytes5).trim();
|
||||||
|
|
||||||
|
byte[] bytes20 = new byte[20];
|
||||||
|
buf.readBytes(bytes20);
|
||||||
|
deviceModel = new String(bytes20).trim();
|
||||||
|
|
||||||
|
byte[] bytes7 = new byte[7];
|
||||||
|
buf.readBytes(bytes7);
|
||||||
|
deviceId = new String(bytes7).trim();
|
||||||
|
|
||||||
|
plateColor = buf.readByte();
|
||||||
|
byte[] plateColorBytes = new byte[buf.readableBytes()];
|
||||||
|
buf.readBytes(plateColorBytes);
|
||||||
|
try {
|
||||||
|
plateNo = new String(plateColorBytes, "GBK").trim();
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user