mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-16 15:58:41 +08:00
地锁返回控制指令 解析
This commit is contained in:
@@ -34,24 +34,29 @@ public class RemoteControlGroundLockResponseHandler extends AbstractHandler{
|
|||||||
|
|
||||||
int startIndex = 0;
|
int startIndex = 0;
|
||||||
int length = 7;
|
int length = 7;
|
||||||
|
|
||||||
// 桩编号
|
// 桩编号
|
||||||
byte[] pileSnByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
byte[] pileSnByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
||||||
|
String pileSn = BytesUtil.bcd2Str(pileSnByteArr);
|
||||||
|
|
||||||
// 枪号
|
// 枪号
|
||||||
startIndex += length;
|
startIndex += length;
|
||||||
length = 1;
|
length = 1;
|
||||||
byte[] connectorCodeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
byte[] connectorCodeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
||||||
|
String connectorCode = BytesUtil.bcd2Str(connectorCodeByteArr);
|
||||||
|
|
||||||
// 地锁控制返回标志 布尔型( 1, 鉴权成功; 0, 鉴权失败)
|
// 地锁控制返回标志 布尔型( 1, 鉴权成功; 0, 鉴权失败)
|
||||||
startIndex += length;
|
startIndex += length;
|
||||||
byte[] controlResultByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
byte[] controlResultByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
||||||
|
String controlResult = BytesUtil.bcd2Str(controlResultByteArr);
|
||||||
|
|
||||||
// 预留位
|
// 预留位
|
||||||
startIndex += length;
|
startIndex += length;
|
||||||
length = 4;
|
length = 4;
|
||||||
byte[] waitingUseByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
byte[] waitingUseByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
||||||
|
|
||||||
|
log.info("===充电桩返回遥控地锁升锁与降锁数据(上行)=== result: 桩编号:{}, 枪号:{}, 地锁控制返回标志:( 1, 鉴权成功; 0, 鉴权失败){}",
|
||||||
|
pileSn, connectorCode, controlResult);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user