CRC
This commit is contained in:
parent
1c4a354057
commit
e2eb7b3003
@ -48,7 +48,7 @@ public class RateModelRequestLogic implements ServiceLogic {
|
|||||||
String resultStr = "685E".concat(seq).concat("000A").concat(pileNo)
|
String resultStr = "685E".concat(seq).concat("000A").concat(pileNo)
|
||||||
.concat(String.format("%04X", rateModelId))
|
.concat(String.format("%04X", rateModelId))
|
||||||
.concat(rateModel);
|
.concat(rateModel);
|
||||||
resultStr = resultStr.concat(CRCCalculator.calcCrc(resultStr));
|
resultStr = resultStr.concat(CRCCalculator.calcCrc(resultStr.substring(4)));
|
||||||
return new ServiceResult(HexUtils.toBytes(resultStr), ServiceResult.OK);
|
return new ServiceResult(HexUtils.toBytes(resultStr), ServiceResult.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user