修正示例报文的校验和

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

@@ -5,7 +5,7 @@
#### 上行登录
> 桩编号20231212000010HEX:20231212000010
`68 22 00 19 00 01 20 23 12 12 00 00 10 01 01 10 47 56 2E 39 35 72 31 33 00 89 86 04 D1 17 22 D0 34 86 06 02 4E 87`
`68 22 00 19 00 01 20 23 12 12 00 00 10 01 01 10 47 56 2E 39 35 72 31 33 00 89 86 04 D1 17 22 D0 34 86 06 02 87 4E`
#### 下行登录应答
`68 0C 00 19 00 02 20 23 12 12 00 00 10 00 A1 55`
#### 下行登录后对时
@@ -59,6 +59,6 @@
---
### 7.4上行BMS参数配置
`68 31 00 16 00 17 32 01 02 00 00 00 00 11 15 11 16 15 55 35 02 60 20 23 12 12 00 00 10 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 78 BB`
`68 31 00 16 00 17 32 01 02 00 00 00 00 11 15 11 16 15 55 35 02 60 20 23 12 12 00 00 10 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 BB 78`

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();