From 1d103955ceb47ddc80ac6e288128a8a87a3bf202 Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Mon, 7 Jun 2021 08:50:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9APSL=E7=9B=98?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../simulation/SimulationV1Controller.java | 19 +++ .../psl/IVirtualRealityPslService.java | 14 ++ .../psl/VirtualRealityPslService.java | 133 ++++++++++++++++++ .../rtss/simulation/cbtc/Simulation.java | 1 + .../cbtc/SimulationLifeCycleServiceImpl.java | 5 + .../simulation/cbtc/SimulationMainThread.java | 9 ++ .../cbtc/constant/SimulationConstants.java | 3 + .../cbtc/data/SimulationDataRepository.java | 7 + .../rtss/simulation/cbtc/data/map/Stand.java | 5 + .../cbtc/data/vr/VirtualRealityPsl.java | 56 ++++++++ .../cbtc/event/SimulationPslStatusEvent.java | 19 +++ .../rtss/vo/client/WebSocketMessageType.java | 2 + .../client/factory/SocketMessageFactory.java | 6 + .../joylink/rtss/vo/client/psl/PslStatus.java | 124 ++++++++++++++++ 14 files changed, 403 insertions(+) create mode 100644 src/main/java/club/joylink/rtss/services/psl/IVirtualRealityPslService.java create mode 100644 src/main/java/club/joylink/rtss/services/psl/VirtualRealityPslService.java create mode 100644 src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityPsl.java create mode 100644 src/main/java/club/joylink/rtss/simulation/cbtc/event/SimulationPslStatusEvent.java create mode 100644 src/main/java/club/joylink/rtss/vo/client/psl/PslStatus.java diff --git a/src/main/java/club/joylink/rtss/controller/simulation/SimulationV1Controller.java b/src/main/java/club/joylink/rtss/controller/simulation/SimulationV1Controller.java index b1888d5e6..83bbdfa60 100644 --- a/src/main/java/club/joylink/rtss/controller/simulation/SimulationV1Controller.java +++ b/src/main/java/club/joylink/rtss/controller/simulation/SimulationV1Controller.java @@ -3,6 +3,7 @@ package club.joylink.rtss.controller.simulation; import club.joylink.rtss.controller.advice.AuthenticateInterceptor; import club.joylink.rtss.exception.BusinessExceptionAssertEnum; import club.joylink.rtss.services.IVirtualRealityIbpService; +import club.joylink.rtss.services.psl.IVirtualRealityPslService; import club.joylink.rtss.services.simulation.SimulationSupportService; import club.joylink.rtss.simulation.cbtc.ATS.data.AtsAlarm; import club.joylink.rtss.simulation.cbtc.ATS.data.SimulationLog; @@ -13,6 +14,7 @@ import club.joylink.rtss.simulation.cbtc.communication.vo.fault.DeviceFaultInfo; import club.joylink.rtss.simulation.cbtc.data.status.IbpStatus; import club.joylink.rtss.simulation.cbtc.data.vo.SimulationVO; import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityIbp; +import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityPsl; import club.joylink.rtss.simulation.cbtc.member.SimulationMember; import club.joylink.rtss.simulation.cbtc.script.ScriptBO; import club.joylink.rtss.vo.LoginUserInfoVO; @@ -22,6 +24,7 @@ import club.joylink.rtss.vo.client.fault.FaultRuleVO; import club.joylink.rtss.vo.client.map.DestinationCodeVO; import club.joylink.rtss.vo.client.map.MapVO; import club.joylink.rtss.vo.client.map.newmap.MapStationNewVO; +import club.joylink.rtss.vo.client.psl.PslStatus; import club.joylink.rtss.vo.client.runplan.PlanTripNumberVO; import club.joylink.rtss.vo.client.runplan.RunPlanEChartsDataVO; import club.joylink.rtss.vo.client.simulationv1.RunAsPlanParam; @@ -59,6 +62,9 @@ public class SimulationV1Controller { @Autowired private SimulationSupportService simulationSupportService; + @Autowired + private IVirtualRealityPslService iVirtualRealityPslService; + @ApiOperation(value = "根据产品类型创建仿真") @GetMapping("") public String simulation(Long mapId, String prdType, @@ -324,4 +330,17 @@ public class SimulationV1Controller { public List queryEstablishedRoutes(@PathVariable String group, @PathVariable String groupNumber) { return simulationSupportService.queryEstablishedRoutes(group, groupNumber); } + + /* ----------------------- PSL盘接口 ----------------------- */ + @ApiOperation("获取PSL盘状态") + @GetMapping("/{group}/{standCode}/psl/status") + public PslStatus getPslStatus(@PathVariable String group, @PathVariable String standCode) { + return iVirtualRealityPslService.getStatus(group, standCode); + } + + @ApiOperation("按下IBP盘按钮") + @PutMapping("/{group}/{standCode}/psl/{button}") + public void pressPslButton(@PathVariable String group, @PathVariable String standCode, @PathVariable VirtualRealityPsl.Button button) { + iVirtualRealityPslService.pressTheButton(group, standCode, button); + } } diff --git a/src/main/java/club/joylink/rtss/services/psl/IVirtualRealityPslService.java b/src/main/java/club/joylink/rtss/services/psl/IVirtualRealityPslService.java new file mode 100644 index 000000000..5caee2cf3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/psl/IVirtualRealityPslService.java @@ -0,0 +1,14 @@ +package club.joylink.rtss.services.psl; + +import club.joylink.rtss.simulation.cbtc.Simulation; +import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityPsl; +import club.joylink.rtss.vo.client.psl.PslStatus; + +public interface IVirtualRealityPslService { + + PslStatus getStatus(String group, String standCode); + + void pressTheButton(String group, String standCode, VirtualRealityPsl.Button button); + + void addJobs(Simulation simulation); +} diff --git a/src/main/java/club/joylink/rtss/services/psl/VirtualRealityPslService.java b/src/main/java/club/joylink/rtss/services/psl/VirtualRealityPslService.java new file mode 100644 index 000000000..a5388aa6c --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/psl/VirtualRealityPslService.java @@ -0,0 +1,133 @@ +package club.joylink.rtss.services.psl; + +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import club.joylink.rtss.simulation.cbtc.GroupSimulationService; +import club.joylink.rtss.simulation.cbtc.Simulation; +import club.joylink.rtss.simulation.cbtc.constant.SimulationConstants; +import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository; +import club.joylink.rtss.simulation.cbtc.data.map.PSD; +import club.joylink.rtss.simulation.cbtc.data.map.Stand; +import club.joylink.rtss.simulation.cbtc.data.map.Station; +import club.joylink.rtss.simulation.cbtc.data.status.IbpStatus; +import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityIbp; +import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityPsl; +import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityScreenDoor; +import club.joylink.rtss.simulation.cbtc.event.SimulationIbpStatusEvent; +import club.joylink.rtss.simulation.cbtc.event.SimulationPslStatusEvent; +import club.joylink.rtss.vo.client.psl.PslStatus; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.HashMap; +import java.util.Map; + +@Service +public class VirtualRealityPslService implements IVirtualRealityPslService{ + + @Autowired + private GroupSimulationService groupSimulationService; + + @Autowired + private ApplicationContext applicationContext; + + @Override + public PslStatus getStatus(String group, String standCode) { + Simulation simulation = groupSimulationService.getSimulationByGroup(group); + SimulationDataRepository repository = simulation.getRepository(); + Map pslStatusMap = repository.getPslStatusMap(); + PslStatus status = pslStatusMap.get(standCode); + if (status != null) { + return status; + } + Stand stand = repository.getByCode(standCode, Stand.class); + VirtualRealityPsl vrPsl = makeSureIbpExistAndCollectStatus(stand); + status = new PslStatus(vrPsl); + pslStatusMap.put(standCode, status); + return status; + } + + @Override + public void pressTheButton(String group, String standCode, VirtualRealityPsl.Button button) { + Simulation simulation = groupSimulationService.getSimulationByGroup(group); + Stand stand = simulation.getRepository().getByCode(standCode, Stand.class); + VirtualRealityPsl vrPsl = makeSureIbpExistAndCollectStatus(stand); + PSD psd = stand.getPsd(); + VirtualRealityScreenDoor vrPsd = psd.getVirtualScreenDoor(); + switch (button) { + case YXJZ: + vrPsl.setYxjzKey(!vrPsl.isYxjzKey()); + vrPsd.setPslControl(vrPsl.isYxjzKey()); + break; + case HSJC: + vrPsl.setHsjcKey(!vrPsl.isHsjcKey()); + vrPsd.setInterlockRelease(vrPsl.isHsjcKey()); + break; + case KM: +// vrPsl.setKmButton(!vrPsl.isKmButton()); +// if (vrPsl.isKmButton()) + if (vrPsd.isLockAndClose()) + vrPsd.startSetting(true); + break; + case GM: +// vrPsl.setGmButton(!vrPsl.isGmButton()); +// if (vrPsl.isGmButton()) + if (vrPsd.isOpen2End()) + vrPsd.startSetting(false); + break; + case SD: + vrPsl.setSdButton(!vrPsl.isSdButton()); + break; + } + } + + @Override + public void addJobs(Simulation simulation) { + simulation.addJobIfAbsent(Simulation.JobName.pslStatus, + () -> this.collectAndDispatcher(simulation), SimulationConstants.PSL_STATUS_COLLECT_RATE); + } + + public void collectAndDispatcher(Simulation simulation) { + SimulationDataRepository repository = simulation.getRepository(); + Map ibpStatusMap = repository.getPslStatusMap(); + Map collectionMap = new HashMap<>(); + for (Stand stand : repository.getStandList()) { + if (stand.getVrPsl() == null) + continue; + VirtualRealityPsl vrPsl = this.collectStatus(stand); + PslStatus pslStatus = ibpStatusMap.get(stand.getCode()); + if (pslStatus == null) { + PslStatus newStatus = new PslStatus(vrPsl); + ibpStatusMap.put(stand.getCode(), newStatus); + collectionMap.put(stand.getCode(), newStatus); + } else { + PslStatus difference = pslStatus.collectDifference(vrPsl); + if (difference != null) { + collectionMap.put(stand.getCode(), difference); + } + } + } + if (!CollectionUtils.isEmpty(collectionMap)) { + applicationContext.publishEvent(new SimulationPslStatusEvent(this, simulation, collectionMap)); + } + } + + private VirtualRealityPsl makeSureIbpExistAndCollectStatus(Stand stand) { + BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertNotNull(stand.getPsd(), "该站台没有屏蔽门"); + if (stand.getVrPsl() == null) + stand.setVrPsl(new VirtualRealityPsl()); + return collectStatus(stand); + } + + private VirtualRealityPsl collectStatus(Stand stand) { + VirtualRealityPsl vrPsl = stand.getVrPsl(); + PSD psd = stand.getPsd(); + vrPsl.setPslczLight(vrPsl.isSdButton() || vrPsl.isYxjzKey()); + vrPsl.setHsjcLight(vrPsl.isSdButton() || vrPsl.isHsjcKey()); + vrPsl.setKmLight(vrPsl.isSdButton() || !psd.isCloseAndLock()); + vrPsl.setGmLight(vrPsl.isSdButton() || psd.isCloseAndLock()); + return vrPsl; + } + +} diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/Simulation.java b/src/main/java/club/joylink/rtss/simulation/cbtc/Simulation.java index 367dcbea1..271a4d393 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/Simulation.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/Simulation.java @@ -646,5 +646,6 @@ public class Simulation extends club.joylink.rtss.simulation.Simulation> message = + SocketMessageFactory.buildSimulationPslStatusMessage(simulation.getId(), event.getStatusMap()); + stompMessageService.sendToUser(simulation.getSimulationUserIds(), message); + } + @EventListener public void handleDeviceFaultSetEvent(SimulationDeviceFaultSetEvent event) { Simulation simulation = event.getSimulation(); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/constant/SimulationConstants.java b/src/main/java/club/joylink/rtss/simulation/cbtc/constant/SimulationConstants.java index 88df87572..ad01100df 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/constant/SimulationConstants.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/constant/SimulationConstants.java @@ -86,6 +86,9 @@ public interface SimulationConstants { /** IBP盘状态收集逻辑间隔 */ int IBP_STATUS_COLLECT_RATE = 500; + /** PSL盘状态收集逻辑间隔 */ + int PSL_STATUS_COLLECT_RATE = 500; + /** 接触网 */ int POWER_SUPPLY_STATUS_UPDATE_RATE = 500; diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/SimulationDataRepository.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/SimulationDataRepository.java index 86e8caf07..c195f4c69 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/SimulationDataRepository.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/SimulationDataRepository.java @@ -18,6 +18,7 @@ import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityTrain; import club.joylink.rtss.simulation.cbtc.exception.SimulationException; import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType; import club.joylink.rtss.util.StrUtils; +import club.joylink.rtss.vo.client.psl.PslStatus; import lombok.Getter; import lombok.Setter; import lombok.extern.slf4j.Slf4j; @@ -74,6 +75,12 @@ public class SimulationDataRepository { */ private Map ibpStatusMap = new ConcurrentHashMap<>(); + /** + * PSL盘状态map + * key - standCode + */ + private Map pslStatusMap = new ConcurrentHashMap<>(); + /** * 列车驾驶HMI显示数据 * key-列车code diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Stand.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Stand.java index 9862814aa..4cf9283a6 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Stand.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Stand.java @@ -1,5 +1,6 @@ package club.joylink.rtss.simulation.cbtc.data.map; +import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityPsl; import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityScreenDoor; import club.joylink.rtss.simulation.cbtc.exception.SimulationException; import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType; @@ -59,6 +60,8 @@ public class Stand extends MayOutOfOrderDevice { */ private boolean visible; + private VirtualRealityPsl vrPsl; + // -------------------------------状态属性--------------------------------- /** @@ -159,6 +162,8 @@ public class Stand extends MayOutOfOrderDevice { if (this.esp != null) { this.esp.reset(); } + if (this.vrPsl != null) + this.vrPsl.reset(); this.trainParking = false; this.remainTime = 0; this.stationHoldTrain = false; diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityPsl.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityPsl.java new file mode 100644 index 000000000..08460b5d8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vr/VirtualRealityPsl.java @@ -0,0 +1,56 @@ +package club.joylink.rtss.simulation.cbtc.data.vr; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class VirtualRealityPsl { + /** psl操作指示灯 */ + private boolean pslczLight; + + /** 互锁解除指示灯 */ + private boolean hsjcLight; + + /** 开门状态指示灯 */ + private boolean kmLight; + + /** 关门状态指示灯 */ + private boolean gmLight; + + /** 允许/禁止钥匙 */ + private boolean yxjzKey; + + /** 互锁解除钥匙 */ + private boolean hsjcKey; + + /** 开门按钮 */ + private boolean kmButton; + + /** 关门按钮 */ + private boolean gmButton; + + /** 试灯按钮 */ + private boolean sdButton; + + public void reset() { + this.yxjzKey = false; + this.hsjcKey = false; + this.kmButton = false; + this.gmButton = false; + this.sdButton = false; + } + + public enum Button{ + /** 允许/禁止钥匙 */ + YXJZ, + /** 互锁解除钥匙 */ + HSJC, + /** 开门按钮 */ + KM, + /** 关门按钮 */ + GM, + /** 试灯按钮 */ + SD; + } +} diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/event/SimulationPslStatusEvent.java b/src/main/java/club/joylink/rtss/simulation/cbtc/event/SimulationPslStatusEvent.java new file mode 100644 index 000000000..ba5508833 --- /dev/null +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/event/SimulationPslStatusEvent.java @@ -0,0 +1,19 @@ +package club.joylink.rtss.simulation.cbtc.event; + +import club.joylink.rtss.simulation.cbtc.Simulation; +import club.joylink.rtss.simulation.cbtc.data.status.IbpStatus; +import club.joylink.rtss.vo.client.psl.PslStatus; +import lombok.Getter; +import lombok.Setter; + +import java.util.Map; + +@Getter +public class SimulationPslStatusEvent extends AbstractSimulationEvent { + private Map statusMap; + + public SimulationPslStatusEvent(Object source, Simulation simulation, Map statusMap) { + super(source, simulation); + this.statusMap = statusMap; + } +} diff --git a/src/main/java/club/joylink/rtss/vo/client/WebSocketMessageType.java b/src/main/java/club/joylink/rtss/vo/client/WebSocketMessageType.java index 1082c1fc0..6f6520160 100644 --- a/src/main/java/club/joylink/rtss/vo/client/WebSocketMessageType.java +++ b/src/main/java/club/joylink/rtss/vo/client/WebSocketMessageType.java @@ -49,6 +49,8 @@ public enum WebSocketMessageType { Simulation_DeviceStatus, /** 仿真-IBP状态消息 */ Simulation_IbpStatus, + /** 仿真-PSL盘状态消息 */ + Simulation_PslStatus, /** 仿真-设备信息 */ Simulation_Device, /** 仿真-列车实际到发车站消息 */ diff --git a/src/main/java/club/joylink/rtss/vo/client/factory/SocketMessageFactory.java b/src/main/java/club/joylink/rtss/vo/client/factory/SocketMessageFactory.java index 5bda7297e..050fdb859 100644 --- a/src/main/java/club/joylink/rtss/vo/client/factory/SocketMessageFactory.java +++ b/src/main/java/club/joylink/rtss/vo/client/factory/SocketMessageFactory.java @@ -13,6 +13,7 @@ import club.joylink.rtss.simulation.cbtc.message.websocket.SimulationSubscribeTo import club.joylink.rtss.vo.client.SocketMessageVO; import club.joylink.rtss.vo.client.WebSocketMessageType; import club.joylink.rtss.vo.client.passenger.PassengerFlowMessage2TD; +import club.joylink.rtss.vo.client.psl.PslStatus; import club.joylink.rtss.vo.client.script.ScriptActionVO; import club.joylink.rtss.vo.client.simulationv1.SimulationMemberMessageVO; import club.joylink.rtss.vo.client.simulationv1.SimulationUserMessageVO; @@ -78,6 +79,7 @@ public class SocketMessageFactory { case Simulation_Member: case Simulation_DeviceStatus: case Simulation_IbpStatus: + case Simulation_PslStatus: case Simulation_AutoFault_Trigger: case Simulation_Error: case Simulation_RunAsPlan_Start: @@ -252,6 +254,10 @@ public class SocketMessageFactory { return build(WebSocketMessageType.Simulation_IbpStatus, group, statusMap); } + public static SocketMessageVO> buildSimulationPslStatusMessage(String group, Map statusMap) { + return build(WebSocketMessageType.Simulation_PslStatus, group, statusMap); + } + public static SocketMessageVO buildSimulationScenesReload(String group, boolean planRunning) { return build(WebSocketMessageType.Simulation_Scenes_Reload, group, planRunning); } diff --git a/src/main/java/club/joylink/rtss/vo/client/psl/PslStatus.java b/src/main/java/club/joylink/rtss/vo/client/psl/PslStatus.java new file mode 100644 index 000000000..9e72d904e --- /dev/null +++ b/src/main/java/club/joylink/rtss/vo/client/psl/PslStatus.java @@ -0,0 +1,124 @@ +package club.joylink.rtss.vo.client.psl; + +import club.joylink.rtss.simulation.cbtc.data.status.IbpStatus; +import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityIbp; +import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityPsl; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.Objects; + +@Getter +@Setter +@NoArgsConstructor +public class PslStatus { + + /** + * psl操作指示灯 + */ + private Boolean pslczLight; + + /** + * 互锁解除指示灯 + */ + private Boolean hsjcLight; + + /** + * 开门状态指示灯 + */ + private Boolean kmLight; + + /** + * 关门状态指示灯 + */ + private Boolean gmLight; + + /** + * 允许/禁止钥匙 + */ + private Boolean yxjzKey; + + /** + * 互锁解除钥匙 + */ + private Boolean hsjcKey; + + /** + * 开门按钮 + */ + private Boolean kmButton; + + /** + * 关门按钮 + */ + private Boolean gmButton; + + /** + * 试灯按钮 + */ + private Boolean sdButton; + + public PslStatus(VirtualRealityPsl psl) { + this.pslczLight = psl.isPslczLight(); + this.hsjcLight = psl.isHsjcLight(); + this.kmLight = psl.isKmLight(); + this.gmLight = psl.isGmLight(); + this.yxjzKey = psl.isYxjzKey(); + this.hsjcKey = psl.isHsjcKey(); + this.kmButton = psl.isKmButton(); + this.gmButton = psl.isGmButton(); + this.sdButton = psl.isSdButton(); + } + + public PslStatus collectDifference(VirtualRealityPsl psl) { + PslStatus pslStatus = new PslStatus(); + boolean change = false; + if (!Objects.equals(this.pslczLight, psl.isPslczLight())) { + this.pslczLight = psl.isPslczLight(); + pslStatus.setPslczLight(this.pslczLight); + change = true; + } + if (!Objects.equals(this.hsjcLight, psl.isHsjcLight())) { + this.hsjcLight = psl.isHsjcLight(); + pslStatus.setHsjcLight(this.hsjcLight); + change = true; + } + if (!Objects.equals(this.kmLight, psl.isKmLight())) { + this.kmLight = psl.isKmLight(); + pslStatus.setKmLight(this.kmLight); + change = true; + } + if (!Objects.equals(this.gmLight, psl.isGmLight())) { + this.gmLight = psl.isGmLight(); + pslStatus.setGmLight(this.gmLight); + change = true; + } + if (!Objects.equals(this.yxjzKey, psl.isYxjzKey())) { + this.yxjzKey = psl.isYxjzKey(); + pslStatus.setYxjzKey(this.yxjzKey); + change = true; + } + if (!Objects.equals(this.hsjcKey, psl.isHsjcKey())) { + this.hsjcKey = psl.isHsjcKey(); + pslStatus.setHsjcKey(this.hsjcKey); + change = true; + } + if (!Objects.equals(this.kmButton, psl.isKmButton())) { + this.kmButton = psl.isKmButton(); + pslStatus.setKmButton(this.kmButton); + change = true; + } + if (!Objects.equals(this.gmButton, psl.isGmButton())) { + this.gmButton = psl.isGmButton(); + pslStatus.setGmButton(this.gmButton); + change = true; + } + if (!Objects.equals(this.sdButton, psl.isSdButton())) { + this.sdButton = psl.isSdButton(); + pslStatus.setSdButton(this.sdButton); + change = true; + } + return change ? pslStatus : null; + } +}