From 53726f14fce2220b145b459f8f12838a170d9091 Mon Sep 17 00:00:00 2001 From: thesai <1021828630@qq.com> Date: Thu, 25 Nov 2021 17:19:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=A8DeviceFault=E7=9A=84=E6=B3=A8?= =?UTF-8?q?=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cbtc/data/map/MayOutOfOrderDevice.java | 11 ++++++ .../rtss/simulation/cbtc/data/map/Switch.java | 34 +++++++++---------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/MayOutOfOrderDevice.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/MayOutOfOrderDevice.java index 997471a36..c86c77d21 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/MayOutOfOrderDevice.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/MayOutOfOrderDevice.java @@ -33,10 +33,21 @@ public abstract class MayOutOfOrderDevice extends StatusDevice { @JsonSubTypes.Type(value = Switch.SwitchFault.class, name = "Switch$SwitchFault$2"), @JsonSubTypes.Type(value = Switch.SwitchFault.class, name = "Switch$SwitchFault$3"), @JsonSubTypes.Type(value = Switch.SwitchFault.class, name = "Switch$SwitchFault$4"), + @JsonSubTypes.Type(value = Switch.SwitchFault.class, name = "Switch$SwitchFault$5"), + @JsonSubTypes.Type(value = Switch.SwitchFault.class, name = "Switch$SwitchFault$6"), + @JsonSubTypes.Type(value = Switch.SwitchFault.class, name = "Switch$SwitchFault$7"), + @JsonSubTypes.Type(value = Switch.SwitchFault.class, name = "Switch$SwitchFault$8"), @JsonSubTypes.Type(value = Section.AxleFault.class, name = "Section$AxleFault$1"), + @JsonSubTypes.Type(value = Section.AxleFault.class, name = "Section$AxleFault$2"), + @JsonSubTypes.Type(value = Section.AxleFault.class, name = "Section$AxleFault$3"), + @JsonSubTypes.Type(value = Section.AxleFault.class, name = "Section$AxleFault$4"), @JsonSubTypes.Type(value = Stand.Fault.class, name = "Stand$Fault$1"), @JsonSubTypes.Type(value = Stand.Fault.class, name = "Stand$Fault$2"), + @JsonSubTypes.Type(value = Stand.Fault.class, name = "Stand$Fault$3"), @JsonSubTypes.Type(value = Signal.SignalFault.class, name = "Signal$SignalFault$1"), + @JsonSubTypes.Type(value = Signal.SignalFault.class, name = "Signal$SignalFault$2"), + @JsonSubTypes.Type(value = Signal.SignalFault.class, name = "Signal$SignalFault$3"), + @JsonSubTypes.Type(value = Signal.SignalFault.class, name = "Signal$SignalFault$4"), @JsonSubTypes.Type(value = Catenary.CatenaryFault.class, name = "Catenary$CatenaryFault$1"), @JsonSubTypes.Type(value = ZC.Fault.class, name = "ZC$Fault$1") }) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Switch.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Switch.java index ca6a90553..74034bb26 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Switch.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/map/Switch.java @@ -568,23 +568,6 @@ public class Switch extends DelayUnlockDevice { } }, - /** - * 转动4次后恢复的失表故障 - */ - SPLIT_4{ - @Override - public boolean apply(MayOutOfOrderDevice device) { - Switch aSwitch = (Switch) device; - if (Objects.equals(aSwitch.getFault(), this)) { - return false; - } - aSwitch.setFault(this); - aSwitch.setPos(SwitchIndication.NO); - aSwitch.setTurnTimes(new AtomicInteger(0)); - return true; - } - }, - /** * 定位失表 */ @@ -683,6 +666,23 @@ public class Switch extends DelayUnlockDevice { } }, + /** + * 转动4次后恢复的失表故障 + */ + SPLIT_4{ + @Override + public boolean apply(MayOutOfOrderDevice device) { + Switch aSwitch = (Switch) device; + if (Objects.equals(aSwitch.getFault(), this)) { + return false; + } + aSwitch.setFault(this); + aSwitch.setPos(SwitchIndication.NO); + aSwitch.setTurnTimes(new AtomicInteger(0)); + return true; + } + }, + /** * 道岔区段灰显 */