Commit f870e67b by tiger

命名更新

1 parent 930dc6bc
...@@ -12,6 +12,6 @@ import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.data.interactive.ShutdownMach ...@@ -12,6 +12,6 @@ import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.data.interactive.ShutdownMach
*/ */
public class ShutdownMachineReq extends TcpReq<ShutdownMachineReqData> { public class ShutdownMachineReq extends TcpReq<ShutdownMachineReqData> {
public ShutdownMachineReq() { public ShutdownMachineReq() {
super(TcpMapper.FTCD_REQ_REMOTE_SHUTDOWN.getType()); super(TcpMapper.CMD_REQ_STOP_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 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_START_CHARGING.getType());
} }
} }
...@@ -12,6 +12,6 @@ import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.data.interactive.ShutdownMach ...@@ -12,6 +12,6 @@ import cn.com.glsx.charging.modules.gbt.ocpp16.tcp.data.interactive.ShutdownMach
*/ */
public class ShutdownMachineResp extends TcpReq<ShutdownMachineRespData> { public class ShutdownMachineResp extends TcpReq<ShutdownMachineRespData> {
public ShutdownMachineResp() { public ShutdownMachineResp() {
super(TcpMapper.FTCD_RSP_REMOTE_SHUTDOWN.getType()); super(TcpMapper.CMD_RSP_STOP_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_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!