Commit 72852134 by 叶立庆

Merge branch 'master' of http://192.168.3.233:8090/platform/platform-charging-server

# Conflicts:
#	platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/protocol/interactive/req/ShutdownMachineReq.java
#	platform-charging/src/main/java/cn/com/glsx/charging/modules/gbt/ocpp16/tcp/protocol/interactive/resp/ShutdownMachineResp.java
2 parents fb1508a6 c23dade5
...@@ -54,12 +54,16 @@ public final class TcpMapper { ...@@ -54,12 +54,16 @@ public final class TcpMapper {
public static TcpMapper CMD_RSP_MODEL_QUERY = regist(0x0A, "计费模型请求应答", null); public static TcpMapper CMD_RSP_MODEL_QUERY = regist(0x0A, "计费模型请求应答", null);
// public static TcpMapper CMD_NOTIFY_TIME = regist(0x56, "对时设置", TimeNotifyHandler.class); // public static TcpMapper CMD_NOTIFY_TIME = regist(0x56, "对时设置", TimeNotifyHandler.class);
// 运营交互帧类型码数据定义 0x31~0x47 // 运营交互帧类型码数据定义 0x31~0x47
public static TcpMapper CMD_RSP_START_CHARGING = regist(0x33, "远程启动充电命令回复", StartMachineRespHandler.class); public static TcpMapper CMD_RSP_START_CHARGING = regist(0x31, "充电桩主动申请启动充电 ", null);
public static TcpMapper CMD_REQ_START_CHARGING = regist(0x34, "运营平台远程控制启机", StartMachineReqHandler.class); public static TcpMapper CMD_REQ_START_CHARGING = regist(0x32, "充电桩主动申请启动充电应答", null);
public static TcpMapper CMD_RSP_REMOTE_START_CHARGING = regist(0x33, "远程启动充电命令回复", StartMachineRespHandler.class);
public static TcpMapper CMD_REQ_REMOTE_START_CHARGING = regist(0x34, "运营平台远程控制启机", StartMachineReqHandler.class);
public static TcpMapper CMD_RSP_STOP_CHARGING = regist(0x35, "远程停机命令回复", ShutdownMachineRespHandler.class); public static TcpMapper CMD_RSP_STOP_CHARGING = regist(0x35, "远程停机命令回复", ShutdownMachineRespHandler.class);
...@@ -77,7 +81,6 @@ public final class TcpMapper { ...@@ -77,7 +81,6 @@ public final class TcpMapper {
public static TcpMapper CMD_RSP_TIME_CHECK = regist(0x55, "对时设置应答", TimeSettingRspHandler.class); public static TcpMapper CMD_RSP_TIME_CHECK = regist(0x55, "对时设置应答", TimeSettingRspHandler.class);
public static TcpMapper fromType(byte type) { public static TcpMapper fromType(byte type) {
TcpMapper c = mappers.get(type); TcpMapper c = mappers.get(type);
if (c == null) { if (c == null) {
......
...@@ -12,6 +12,6 @@ import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.data.interactive.StartMachine ...@@ -12,6 +12,6 @@ import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.data.interactive.StartMachine
*/ */
public class StartMachineReq extends TcpReq<StartMachineReqData> { public class StartMachineReq extends TcpReq<StartMachineReqData> {
public StartMachineReq() { public StartMachineReq() {
super(TcpMapper.CMD_REQ_START_CHARGING.getType()); super(TcpMapper.CMD_REQ_REMOTE_START_CHARGING.getType());
} }
} }
...@@ -12,6 +12,6 @@ import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.data.interactive.StartMachine ...@@ -12,6 +12,6 @@ import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.data.interactive.StartMachine
*/ */
public class StartMachineResp extends TcpRsp<StartMachineRspData> { public class StartMachineResp extends TcpRsp<StartMachineRspData> {
public StartMachineResp() { public StartMachineResp() {
super(TcpMapper.CMD_RSP_START_CHARGING.getType()); super(TcpMapper.CMD_RSP_REMOTE_START_CHARGING.getType());
} }
} }
...@@ -9,7 +9,7 @@ import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.login.HeartbeatReq; ...@@ -9,7 +9,7 @@ import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.login.HeartbeatReq;
import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.login.HeartbeatRsp; import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.login.HeartbeatRsp;
import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.login.LoginReq; import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.login.LoginReq;
import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.login.LoginRsp; import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.login.LoginRsp;
import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.login.TimeNotify; import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.protocol.time.TimeSettingReq;
import cn.com.glsx.charging.util.ByteUtils; import cn.com.glsx.charging.util.ByteUtils;
import cn.com.glsx.charging.util.CrcUtils; import cn.com.glsx.charging.util.CrcUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -107,7 +107,7 @@ public class CrcTest { ...@@ -107,7 +107,7 @@ public class CrcTest {
String hex = "68120002005655031412782305F055020E070B178676"; String hex = "68120002005655031412782305F055020E070B178676";
log.info(hex); log.info(hex);
byte[] bytes = ByteUtils.fromHex(hex); byte[] bytes = ByteUtils.fromHex(hex);
TimeNotify protocol = Ocpp16Helper.parse(bytes); TimeSettingReq protocol = Ocpp16Helper.parse(bytes);
log.info("expect: " + protocol.getCrc()); log.info("expect: " + protocol.getCrc());
byte[] data = ByteUtils.getBytes(bytes, 2, bytes.length - 4); byte[] data = ByteUtils.getBytes(bytes, 2, bytes.length - 4);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!