mirror of
https://gitee.com/san-bing/JChargePointProtocol
synced 2026-05-05 02:19:56 +08:00
添加查询充电枪状态接口
This commit is contained in:
@@ -36,7 +36,29 @@
|
||||
---
|
||||
|
||||
#### 0x13 上报充电桩状态(充电桩 -> JCPP)
|
||||
`68 40 bb bd 00 13 20 23 12 12 00 00 10 00 00 00 00 10 05 71 36 00 32 01 06 00 39 56 00 02 03 02 01 94 0e f4 03 54 00 00 00 00 00 00 00 00 4e 55 10 00 20 00 c0 57 01 00 00 00 00 00 60 6c 01 00 00 00 93 73`
|
||||
|
||||
``` prototext
|
||||
68 40 bb bd 00 13
|
||||
20 23 12 12 00 00 10 00 00 00 00 10 05 71 36 00
|
||||
20 23 12 12 00 00 10
|
||||
01
|
||||
03
|
||||
00
|
||||
01
|
||||
94 0e
|
||||
f4 03
|
||||
54
|
||||
00 00 00 00 00 00 00 00
|
||||
4e
|
||||
55
|
||||
10 00
|
||||
20 00
|
||||
c0 57 01 00
|
||||
00 00 00 00
|
||||
60 6c 01 00
|
||||
00 00
|
||||
4C 56
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public class YunKuaiChongV150BmsAbortULCmd extends YunKuaiChongUplinkCmdExe {
|
||||
|
||||
BmsAbortProto proto = BmsAbortProto.newBuilder()
|
||||
.setPileCode(pileCode)
|
||||
.setGunCode(gunCode)
|
||||
.setGunNo(gunCode)
|
||||
.setTradeNo(tradeNo)
|
||||
.setAdditionalInfo(additionalInfo.toString())
|
||||
.build();
|
||||
|
||||
@@ -117,7 +117,7 @@ public class YunKuaiChongV150BmsChargingErrorULCmd extends YunKuaiChongUplinkCmd
|
||||
BmsChargingErrorProto bmsChargingErrorProto = BmsChargingErrorProto.newBuilder()
|
||||
.setPileCode(pileCode)
|
||||
.setTradeNo(tradeNo)
|
||||
.setGunCode(gunCode)
|
||||
.setGunNo(gunCode)
|
||||
.setAdditionalInfo(additionalInfo.toString())
|
||||
.build();
|
||||
UplinkQueueMessage uplinkQueueMessage = uplinkMessageBuilder(bmsChargingErrorProto.getPileCode(), tcpSession, yunKuaiChongUplinkMessage)
|
||||
|
||||
@@ -78,7 +78,7 @@ public class YunKuaiChongV150BmsChargingInfoULCmd extends YunKuaiChongUplinkCmdE
|
||||
BmsChargingInfoProto bmsCharingInfoProto = BmsChargingInfoProto.newBuilder()
|
||||
.setPileCode(pileCode)
|
||||
.setTradeNo(tradeNo)
|
||||
.setGunCode(gunCode)
|
||||
.setGunNo(gunCode)
|
||||
.setAdditionalInfo(additionalInfo.toString())
|
||||
.build();
|
||||
UplinkQueueMessage uplinkQueueMessage = uplinkMessageBuilder(bmsCharingInfoProto.getPileCode(), tcpSession, yunKuaiChongUplinkMessage)
|
||||
|
||||
@@ -95,7 +95,7 @@ public class YunKuaiChongV150BmsDemandChargerOutputULCmd extends YunKuaiChongUpl
|
||||
|
||||
BmsDemandChargerOutputProto proto = BmsDemandChargerOutputProto.newBuilder()
|
||||
.setPileCode(pileCode)
|
||||
.setGunCode(gunCode)
|
||||
.setGunNo(gunCode)
|
||||
.setTradeNo(tradeNo)
|
||||
.setAdditionalInfo(additionalInfo.toString())
|
||||
.build();
|
||||
|
||||
@@ -105,7 +105,7 @@ public class YunKuaiChongV150BmsHandshakeULCmd extends YunKuaiChongUplinkCmdExe
|
||||
// 构建BmsHandshakeProto对象
|
||||
BmsHandshakeProto bmsHandshakeProto = BmsHandshakeProto.newBuilder()
|
||||
.setPileCode(pileCode)
|
||||
.setGunCode(gunCode)
|
||||
.setGunNo(gunCode)
|
||||
.setTradeNo(tradeNo)
|
||||
.setBmsProtocolVersion(HexUtil.encodeHexStr(bmsConnectVersionBytes))
|
||||
.setBmsBatteryType(bmsBatteryType)
|
||||
|
||||
@@ -93,7 +93,7 @@ public class YunKuaiChongV150BmsParamConfigReportULCmd extends YunKuaiChongUplin
|
||||
BmsParamConfigReportProto bmsParamConfigReportProto = BmsParamConfigReportProto.newBuilder()
|
||||
.setPileCode(pileCode)
|
||||
.setTradeNo(tradeNo)
|
||||
.setGunCode(gunCode)
|
||||
.setGunNo(gunCode)
|
||||
.setMaxSingleCellVoltage(maxSingleCellVoltage.toPlainString())
|
||||
.setMaxChargeCurrent(maxChargeCurrent.toPlainString())
|
||||
.setRatedEnergy(ratedEnergy.toPlainString())
|
||||
|
||||
@@ -71,7 +71,7 @@ public class YunKuaiChongV150LockStatusULCmd extends YunKuaiChongUplinkCmdExe {
|
||||
// 构建转发消息
|
||||
GroundLockStatusProto groundLockStatusProto = GroundLockStatusProto.newBuilder()
|
||||
.setPileCode(pileCode)
|
||||
.setGunCode(gunCode)
|
||||
.setGunNo(gunCode)
|
||||
.setLockStatus(lockStatus)
|
||||
.setParkStatus(parkStatus)
|
||||
.setLockBattery(lockBattery)
|
||||
|
||||
@@ -9,7 +9,6 @@ package sanbing.jcpp.protocol.yunkuaichong.v150.cmd;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import sanbing.jcpp.infrastructure.util.codec.BCDUtil;
|
||||
import sanbing.jcpp.proto.gen.DownlinkProto.OfflineCardBalanceUpdateRequest;
|
||||
import sanbing.jcpp.protocol.ProtocolContext;
|
||||
import sanbing.jcpp.protocol.annotation.ProtocolCmd;
|
||||
@@ -44,7 +43,7 @@ public class YunKuaiChongV150OfflineCardBalanceUpdateRequestDLCmd extends YunKua
|
||||
ByteBuf msgBody = Unpooled.buffer(20);
|
||||
OfflineCardBalanceUpdateRequest request = message.getMsg().getOfflineCardBalanceUpdateRequest();
|
||||
msgBody.writeBytes(encodePileCode(request.getPileCode()));
|
||||
msgBody.writeBytes(encodeGunCode(request.getGunCode()));
|
||||
msgBody.writeBytes(encodeGunCode(request.getGunNo()));
|
||||
msgBody.writeBytes(encodeCardNo(request.getCardNo()));
|
||||
msgBody.writeIntLE(new BigDecimal(request.getLimitYuan()).movePointRight(2).intValue());
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ public class YunKuaiChongV150RealTimeDataULCmd extends YunKuaiChongUplinkCmdExe
|
||||
GunRunStatus gunRunStatus = parseGunRunStatus(gunStatus, gunInsert, tradeNo);
|
||||
GunRunStatusProto.Builder gunRunStatusProtoBuilder = GunRunStatusProto.newBuilder()
|
||||
.setPileCode(pileCode)
|
||||
.setGunCode(gunCode)
|
||||
.setGunNo(gunCode)
|
||||
.setGunRunStatus(gunRunStatus)
|
||||
.addAllFaultMessages(faults)
|
||||
.setAdditionalInfo(additionalInfo.toString());
|
||||
@@ -152,7 +152,7 @@ public class YunKuaiChongV150RealTimeDataULCmd extends YunKuaiChongUplinkCmdExe
|
||||
// 充电进度
|
||||
ChargingProgressProto.Builder chargingProgressProtoBuilder = ChargingProgressProto.newBuilder()
|
||||
.setPileCode(pileCode)
|
||||
.setGunCode(gunCode)
|
||||
.setGunNo(gunCode)
|
||||
.setTradeNo(tradeNo)
|
||||
.setOutputVoltage(outputVoltage.toPlainString())
|
||||
.setOutputCurrent(outputCurrent.toPlainString())
|
||||
|
||||
@@ -40,7 +40,7 @@ public class YunKuaiChongV150RemoteStartDLCmd extends YunKuaiChongDownlinkCmdExe
|
||||
|
||||
RemoteStartChargingRequest remoteStartChargingRequest = yunKuaiChongDwonlinkMessage.getMsg().getRemoteStartChargingRequest();
|
||||
String pileCode = remoteStartChargingRequest.getPileCode();
|
||||
String gunCode = remoteStartChargingRequest.getGunCode();
|
||||
String gunCode = remoteStartChargingRequest.getGunNo();
|
||||
String tradeNo = remoteStartChargingRequest.getTradeNo();
|
||||
String limitYuan = remoteStartChargingRequest.getLimitYuan();
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class YunKuaiChongV150RemoteStartResultULCmd extends YunKuaiChongUplinkCm
|
||||
|
||||
RemoteStartChargingResponse remoteStartChargingResponse = RemoteStartChargingResponse.newBuilder()
|
||||
.setPileCode(pileCode)
|
||||
.setGunCode(gunCode)
|
||||
.setGunNo(gunCode)
|
||||
.setTradeNo(tradeNo)
|
||||
.setSuccess(isSuccess)
|
||||
.setFailReason(failReason)
|
||||
|
||||
@@ -37,7 +37,7 @@ public class YunKuaiChongV150RemoteStopDLCmd extends YunKuaiChongDownlinkCmdExe
|
||||
|
||||
RemoteStopChargingRequest remoteStopChargingRequest = yunKuaiChongDwonlinkMessage.getMsg().getRemoteStopChargingRequest();
|
||||
String pileCode = remoteStopChargingRequest.getPileCode();
|
||||
String gunCode = remoteStopChargingRequest.getGunCode();
|
||||
String gunCode = remoteStopChargingRequest.getGunNo();
|
||||
|
||||
ByteBuf msgBody = Unpooled.buffer(44);
|
||||
// 桩编码
|
||||
|
||||
@@ -55,7 +55,7 @@ public class YunKuaiChongV150RemoteStopResultULCmd extends YunKuaiChongUplinkCmd
|
||||
|
||||
RemoteStopChargingResponse remoteStopChargingResponse = RemoteStopChargingResponse.newBuilder()
|
||||
.setPileCode(pileCode)
|
||||
.setGunCode(gunCode)
|
||||
.setGunNo(gunCode)
|
||||
.setSuccess(isSuccess)
|
||||
.setFailReason(failReason)
|
||||
.setAdditionalInfo(additionalInfo.toString())
|
||||
|
||||
@@ -46,7 +46,7 @@ public class YunKuaiChongV150StartChargeAckDLCmd extends YunKuaiChongDownlinkCmd
|
||||
DownlinkProto.StartChargeResponse startChargeResponse = yunKuaiChongDwonlinkMessage.getMsg().getStartChargeResponse();
|
||||
String tradeNo = startChargeResponse.getTradeNo();
|
||||
String pileCode = startChargeResponse.getPileCode();
|
||||
String gunCode = startChargeResponse.getGunCode();
|
||||
String gunCode = startChargeResponse.getGunNo();
|
||||
String logicalCardNo = startChargeResponse.getLogicalCardNo();
|
||||
String limitYuan = startChargeResponse.getLimitYuan();
|
||||
String failReasonValue = startChargeResponse.getFailReason();
|
||||
|
||||
@@ -85,7 +85,7 @@ public class YunKuaiChongV150StartChargeULCmd extends YunKuaiChongUplinkCmdExe {
|
||||
UplinkProto.StartChargeRequest startChargingRequest = UplinkProto.StartChargeRequest.newBuilder()
|
||||
.setTs(ts)
|
||||
.setPileCode(pileCode)
|
||||
.setGunCode(gunCode)
|
||||
.setGunNo(gunCode)
|
||||
.setStartType(startType)
|
||||
.setNeedPassword(needPassword)
|
||||
.setCardNo(cardNo)
|
||||
|
||||
@@ -177,7 +177,7 @@ public class YunKuaiChongV150TransactionRecordULCmd extends YunKuaiChongUplinkCm
|
||||
// 构建交易记录
|
||||
TransactionRecordRequest transactionRecordRequest = TransactionRecordRequest.newBuilder()
|
||||
.setPileCode(pileCode)
|
||||
.setGunCode(gunCode)
|
||||
.setGunNo(gunCode)
|
||||
.setTradeNo(tradeNo)
|
||||
.setStartTs(startTime.toEpochMilli())
|
||||
.setEndTs(endTime.toEpochMilli())
|
||||
|
||||
@@ -47,7 +47,7 @@ public class YunKuaiChongV160RemoteParallelStartDLCmd extends YunKuaiChongDownli
|
||||
|
||||
DownlinkProto.RemoteStartChargingRequest remoteStartChargingRequest = yunKuaiChongDwonlinkMessage.getMsg().getRemoteStartChargingRequest();
|
||||
String pileCode = remoteStartChargingRequest.getPileCode();
|
||||
String gunCode = remoteStartChargingRequest.getGunCode();
|
||||
String gunCode = remoteStartChargingRequest.getGunNo();
|
||||
String tradeNo = remoteStartChargingRequest.getTradeNo();
|
||||
String limitYuan = remoteStartChargingRequest.getLimitYuan();
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ public class YunKuaiChongV160RemoteParallelStartResultULCmd extends YunKuaiChong
|
||||
|
||||
RemoteStartChargingResponse remoteStartChargingResponse = RemoteStartChargingResponse.newBuilder()
|
||||
.setPileCode(pileCode)
|
||||
.setGunCode(gunCode)
|
||||
.setGunNo(gunCode)
|
||||
.setTradeNo(tradeNo)
|
||||
.setSuccess(isSuccess)
|
||||
.setFailReason(failReason)
|
||||
|
||||
@@ -201,7 +201,7 @@ public class YunKuaiChongV170TransactionRecordULCmd extends YunKuaiChongUplinkCm
|
||||
// 构建交易记录
|
||||
TransactionRecordRequest transactionRecordRequest = TransactionRecordRequest.newBuilder()
|
||||
.setPileCode(pileCode)
|
||||
.setGunCode(gunCode)
|
||||
.setGunNo(gunCode)
|
||||
.setTradeNo(tradeNo)
|
||||
.setStartTs(startTime.toEpochMilli())
|
||||
.setEndTs(endTime.toEpochMilli())
|
||||
|
||||
Reference in New Issue
Block a user