修正示例报文的校验和

This commit is contained in:
三丙
2025-08-01 14:51:07 +08:00
parent 975d9223ea
commit b7e1c7b7ad
3 changed files with 5 additions and 5 deletions

View File

@@ -107,11 +107,11 @@ public class YunKuaiChongProtocolMessageProcessor extends ProtocolMessageProcess
// ================== 短路校验流程 ==================
JCPPPair<Boolean, Integer> checkResult = checkCrcSum(checkData, checkSumLE);
if (!checkResult.getFirst()) {
checkResult = checkCrcSum(checkData, checkSumBE);
if (log.isDebugEnabled()) { // 日志惰性计算
log.debug("{} 云快充校验域一次校验失败 CMD:{} 校验和0x{} 期望校验和:0x{}",
session, frameType, Integer.toHexString(checkSumBE), Integer.toHexString(checkResult.getSecond()));
session, frameType, Integer.toHexString(checkSumBE), Integer.toHexString(checkSumLE));
}
checkResult = checkCrcSum(checkData, checkSumBE);
}
// ================== 最终校验失败处理 ==================

View File

@@ -30,7 +30,7 @@ public class YunKuaiChongV150BmsChargingErrorULCmd extends YunKuaiChongUplinkCmd
@Override
public void execute(TcpSession tcpSession, YunKuaiChongUplinkMessage yunKuaiChongUplinkMessage, ProtocolContext ctx) {
log.debug("{} 云快充1.5.0错误请求", tcpSession);
log.debug("{} 云快充1.5.0 充电桩与 BMS 充电错误报文", tcpSession);
ByteBuf byteBuf = Unpooled.wrappedBuffer(yunKuaiChongUplinkMessage.getMsgBody());
// 从Tracer总获取当前时间
long ts = TracerContextUtil.getCurrentTracer().getTracerTs();