diff --git a/src/main/java/club/joylink/xiannccda/alert/AlertDetail.java b/src/main/java/club/joylink/xiannccda/alert/AlertDetail.java index 488c221..284517c 100644 --- a/src/main/java/club/joylink/xiannccda/alert/AlertDetail.java +++ b/src/main/java/club/joylink/xiannccda/alert/AlertDetail.java @@ -4,6 +4,8 @@ import java.time.LocalDateTime; public interface AlertDetail { + AlertType getAlertType(); + LocalDateTime getAlertTime(); Integer getAlertTipId(); diff --git a/src/main/java/club/joylink/xiannccda/alert/xian3/Xian3TrainDelayAlert.java b/src/main/java/club/joylink/xiannccda/alert/AlertDetailImpl.java similarity index 60% rename from src/main/java/club/joylink/xiannccda/alert/xian3/Xian3TrainDelayAlert.java rename to src/main/java/club/joylink/xiannccda/alert/AlertDetailImpl.java index 12fae72..b56dad1 100644 --- a/src/main/java/club/joylink/xiannccda/alert/xian3/Xian3TrainDelayAlert.java +++ b/src/main/java/club/joylink/xiannccda/alert/AlertDetailImpl.java @@ -1,19 +1,27 @@ -package club.joylink.xiannccda.alert.xian3; +package club.joylink.xiannccda.alert; -import club.joylink.xiannccda.alert.AlertDetail; -import club.joylink.xiannccda.alert.AlertType; import java.time.LocalDateTime; -import lombok.Builder; +import lombok.AllArgsConstructor; +import lombok.Data; /** * 西安三号线报警 */ -@Builder -public class Xian3TrainDelayAlert implements AlertDetail { +@Data +@AllArgsConstructor +public class AlertDetailImpl implements AlertDetail { + private AlertType alertType; private LocalDateTime alertTime; - private String info; private Integer alertTipId; + private String info; + private String deviceInfo; + private String reason; + + @Override + public AlertType getAlertType() { + return alertType; + } @Override public LocalDateTime getAlertTime() { @@ -27,20 +35,16 @@ public class Xian3TrainDelayAlert implements AlertDetail { @Override public String getDeviceInfo() { - return "道岔P0110"; + return deviceInfo; } @Override public String getReason() { - return "道岔P0110失表"; + return reason; } @Override public Integer getAlertTipId() { return alertTipId; } - - public AlertType getAlertType() { - return AlertType.XIAN3_TRAIN_DELAY; - } } diff --git a/src/main/java/club/joylink/xiannccda/alert/AlertEmitJob.java b/src/main/java/club/joylink/xiannccda/alert/AlertEmitJob.java new file mode 100644 index 0000000..0dd7a62 --- /dev/null +++ b/src/main/java/club/joylink/xiannccda/alert/AlertEmitJob.java @@ -0,0 +1,35 @@ +package club.joylink.xiannccda.alert; + +import club.joylink.xiannccda.alert.core.AlertManager; +import org.springframework.boot.ApplicationArguments; +import org.springframework.boot.ApplicationRunner; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; + +@Order(1) +@Component +public class AlertEmitJob implements ApplicationRunner { + + private TrainDelayAlertMonitoringTask trainDelayAlertMonitoringTask; + private BlueDisplayAlertMonitoringTask blueDisplayAlertMonitoringTask; + private PlatformDoorAlertMonitoringTask platformDoorAlertMonitoringTask; + + public AlertEmitJob( + TrainDelayAlertMonitoringTask trainDelayAlertMonitoringTask, + BlueDisplayAlertMonitoringTask blueDisplayAlertMonitoringTask, + PlatformDoorAlertMonitoringTask platformDoorAlertMonitoringTask) { + this.trainDelayAlertMonitoringTask = trainDelayAlertMonitoringTask; + this.blueDisplayAlertMonitoringTask = blueDisplayAlertMonitoringTask; + this.platformDoorAlertMonitoringTask = platformDoorAlertMonitoringTask; + } + + + @Override + public void run(ApplicationArguments args) throws Exception { + AlertManager alertManager = AlertManager.getInstance(); + //报警源 + alertManager.addTask(trainDelayAlertMonitoringTask); + alertManager.addTask(blueDisplayAlertMonitoringTask); + alertManager.addTask(platformDoorAlertMonitoringTask); + } +} diff --git a/src/main/java/club/joylink/xiannccda/alert/AlertJob.java b/src/main/java/club/joylink/xiannccda/alert/AlertListenerJob.java similarity index 91% rename from src/main/java/club/joylink/xiannccda/alert/AlertJob.java rename to src/main/java/club/joylink/xiannccda/alert/AlertListenerJob.java index 89acb39..d479c7d 100644 --- a/src/main/java/club/joylink/xiannccda/alert/AlertJob.java +++ b/src/main/java/club/joylink/xiannccda/alert/AlertListenerJob.java @@ -13,10 +13,10 @@ import org.springframework.stereotype.Component; @Order @Component -public class AlertJob implements ApplicationRunner { +public class AlertListenerJob implements ApplicationRunner { private final WsMessageServerManager wsMessageServerManager; - public AlertJob(WsMessageServerManager wsMessageServerManager) { + public AlertListenerJob(WsMessageServerManager wsMessageServerManager) { this.wsMessageServerManager = wsMessageServerManager; } @@ -27,7 +27,7 @@ public class AlertJob implements ApplicationRunner { //添加报警事件监听器 addAlertListeners(); //注册西安NCC的报警ws消息发送服务 - wsMessageServerManager.registerMessageServer(NccAlertMessageServer.getInstance()); + wsMessageServerManager.registerMessageServer(NccAlertMessageServer.getDefault()); //启动报警源事件监测任务 AlertManager.getInstance().taskStart(); } @@ -49,14 +49,15 @@ public class AlertJob implements ApplicationRunner { } private void addAlertListeners() { - NccAlertMessageServer nccAlertMessageServer = NccAlertMessageServer.getInstance(); + NccAlertMessageServer nccAlertMessageServer = NccAlertMessageServer.getDefault(); AlertManager alertManager = AlertManager.getInstance(); - //报警监听 + //添加消息 alertManager.on(new Listener() { @Override public void accept(NccAlertInfo event) { nccAlertMessageServer.addMsg(event); } }); + } } diff --git a/src/main/java/club/joylink/xiannccda/alert/AlertType.java b/src/main/java/club/joylink/xiannccda/alert/AlertType.java index a5d14fd..66bb3ee 100644 --- a/src/main/java/club/joylink/xiannccda/alert/AlertType.java +++ b/src/main/java/club/joylink/xiannccda/alert/AlertType.java @@ -2,11 +2,17 @@ package club.joylink.xiannccda.alert; public enum AlertType { /** - * 西安三蓝显 + * 蓝显 */ - XIAN3_BLUE_DISPLAY, + BLUE_DISPLAY, /** - * 西安三列车延误 + * 列车延误 */ - XIAN3_TRAIN_DELAY, + TRAIN_DELAY, + /** + * 站台门无关闭锁紧信号 + */ + PLATFORM_DOOR_WITHOUT_LOCKED_SIGNAL, + PLATFORM_DOOR_CANNOT_OPEN, + PLATFORM_DOOR_CANNOT_CLOSE, } diff --git a/src/main/java/club/joylink/xiannccda/alert/BlueDisplayAlertMonitoringTask.java b/src/main/java/club/joylink/xiannccda/alert/BlueDisplayAlertMonitoringTask.java new file mode 100644 index 0000000..da9e861 --- /dev/null +++ b/src/main/java/club/joylink/xiannccda/alert/BlueDisplayAlertMonitoringTask.java @@ -0,0 +1,51 @@ +package club.joylink.xiannccda.alert; + +import club.joylink.xiannccda.alert.core.AlertManager; +import club.joylink.xiannccda.alert.core.AlertMonitoringTask; +import club.joylink.xiannccda.entity.AlertTip; +import club.joylink.xiannccda.repository.IAlertTipRepository; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import java.time.LocalDateTime; +import org.springframework.stereotype.Component; + +@Component +public class BlueDisplayAlertMonitoringTask implements AlertMonitoringTask { + + private IAlertTipRepository alertTipRepository; + private boolean alertTriggered; + + public BlueDisplayAlertMonitoringTask(IAlertTipRepository alertTipRepository) { + this.alertTipRepository = alertTipRepository; + } + + @Override + public String getName() { + return "blue_display"; + } + + @Override + public void run() { + LocalDateTime now = LocalDateTime.now(); + if (alertTriggered) { + if (now.getSecond() % 30 != 0) { + alertTriggered = false; + } + } else { + if (now.getSecond() % 30 == 0) { + AlertType alertType = AlertType.BLUE_DISPLAY; + LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery(AlertTip.class); + queryWrapper.eq(AlertTip::getAlertType, alertType) + .eq(AlertTip::getLocationType, AlertTipLocationType.QX); + AlertTip alertTip = alertTipRepository.getOne(queryWrapper); + Integer alertTipId = alertTip == null ? null : alertTip.getId(); + + AlertManager alertManager = AlertManager.getInstance(); + AlertDetailImpl alert = new AlertDetailImpl(alertType, now, alertTipId, "[3号线]全线蓝显", + "轨旁设备", "轨旁设备故障"); + alertManager.emit(alert); + alertTriggered = true; + } + } + } +} diff --git a/src/main/java/club/joylink/xiannccda/alert/PlatformDoorAlertMonitoringTask.java b/src/main/java/club/joylink/xiannccda/alert/PlatformDoorAlertMonitoringTask.java new file mode 100644 index 0000000..0214107 --- /dev/null +++ b/src/main/java/club/joylink/xiannccda/alert/PlatformDoorAlertMonitoringTask.java @@ -0,0 +1,85 @@ +package club.joylink.xiannccda.alert; + +import club.joylink.xiannccda.alert.core.AlertManager; +import club.joylink.xiannccda.alert.core.AlertMonitoringTask; +import club.joylink.xiannccda.entity.AlertTip; +import club.joylink.xiannccda.repository.IAlertTipRepository; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import java.time.LocalDateTime; +import org.springframework.stereotype.Component; + +@Component +public class PlatformDoorAlertMonitoringTask implements AlertMonitoringTask { + + private IAlertTipRepository alertTipRepository; + private boolean alertTriggered; + + public PlatformDoorAlertMonitoringTask(IAlertTipRepository alertTipRepository) { + this.alertTipRepository = alertTipRepository; + } + + @Override + public String getName() { + return "platform_door"; + } + + @Override + public void run() { + LocalDateTime now = LocalDateTime.now(); + if (alertTriggered) { + if (now.getSecond() % 30 != 0) { + alertTriggered = false; + } + } else { + if (now.getSecond() % 30 == 0) { + emitPlatformDoorWithoutLockedSignalAlert(now, alertTipRepository); + emitPlatformDoorCannotOpenAlert(now, alertTipRepository); + emitPlatformDoorCannotCloseAlert(now, alertTipRepository); + alertTriggered = true; + } + } + } + + public void emitPlatformDoorWithoutLockedSignalAlert(LocalDateTime now, + IAlertTipRepository alertTipRepository) { + AlertType alertType = AlertType.PLATFORM_DOOR_WITHOUT_LOCKED_SIGNAL; + LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery(AlertTip.class); + queryWrapper.eq(AlertTip::getAlertType, alertType); + AlertTip alertTip = alertTipRepository.getOne(queryWrapper); + Integer alertTipId = alertTip == null ? null : alertTip.getId(); + + AlertManager alertManager = AlertManager.getInstance(); + AlertDetailImpl alert = new AlertDetailImpl(alertType, now, alertTipId, + "[3号线]站台门无关闭锁紧信号", "鱼化寨下行站台", "鱼化寨下行站台无关闭锁紧信号"); + alertManager.emit(alert); + } + + public void emitPlatformDoorCannotOpenAlert(LocalDateTime now, + IAlertTipRepository alertTipRepository) { + AlertType alertType = AlertType.PLATFORM_DOOR_CANNOT_OPEN; + LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery(AlertTip.class); + queryWrapper.eq(AlertTip::getAlertType, alertType); + AlertTip alertTip = alertTipRepository.getOne(queryWrapper); + Integer alertTipId = alertTip == null ? null : alertTip.getId(); + + AlertManager alertManager = AlertManager.getInstance(); + AlertDetailImpl alert = new AlertDetailImpl(alertType, now, alertTipId, + "[3号线]站台门整侧站台门无法打开", "鱼化寨下行站台", "鱼化寨下行站台整侧站台门无法打开"); + alertManager.emit(alert); + } + + public void emitPlatformDoorCannotCloseAlert(LocalDateTime now, + IAlertTipRepository alertTipRepository) { + AlertType alertType = AlertType.PLATFORM_DOOR_CANNOT_CLOSE; + LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery(AlertTip.class); + queryWrapper.eq(AlertTip::getAlertType, alertType); + AlertTip alertTip = alertTipRepository.getOne(queryWrapper); + Integer alertTipId = alertTip == null ? null : alertTip.getId(); + + AlertManager alertManager = AlertManager.getInstance(); + AlertDetailImpl alert = new AlertDetailImpl(alertType, now, alertTipId, + "[3号线]站台门整侧站台门无法关闭", "鱼化寨下行站台", "鱼化寨下行站台整侧站台门无法关闭"); + alertManager.emit(alert); + } +} diff --git a/src/main/java/club/joylink/xiannccda/alert/TrainDelayAlertMonitoringTask.java b/src/main/java/club/joylink/xiannccda/alert/TrainDelayAlertMonitoringTask.java new file mode 100644 index 0000000..19a898e --- /dev/null +++ b/src/main/java/club/joylink/xiannccda/alert/TrainDelayAlertMonitoringTask.java @@ -0,0 +1,52 @@ +package club.joylink.xiannccda.alert; + +import club.joylink.xiannccda.alert.core.AlertManager; +import club.joylink.xiannccda.alert.core.AlertMonitoringTask; +import club.joylink.xiannccda.entity.AlertTip; +import club.joylink.xiannccda.repository.IAlertTipRepository; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import java.time.LocalDateTime; +import org.springframework.stereotype.Component; + +@Component +public class TrainDelayAlertMonitoringTask implements AlertMonitoringTask { + + private IAlertTipRepository alertTipRepository; + private boolean alertTriggered; + + public TrainDelayAlertMonitoringTask(IAlertTipRepository alertTipRepository) { + this.alertTipRepository = alertTipRepository; + } + + @Override + public String getName() { + return "Train_Delay"; + } + + @Override + public void run() { + LocalDateTime now = LocalDateTime.now(); + if (alertTriggered) { + if (now.getSecond() % 30 != 0) { + alertTriggered = false; + } + } else { + if (now.getSecond() % 30 == 0) { + AlertType alertType = AlertType.PLATFORM_DOOR_CANNOT_OPEN; + LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery(AlertTip.class); + queryWrapper.eq(AlertTip::getAlertType, alertType) + .eq(AlertTip::getTimeType, AlertTipTimeType.CLOCK_7_9_AND_19_21); + AlertTip alertTip = alertTipRepository.getOne(queryWrapper); + Integer alertTipId = alertTip == null ? null : alertTip.getId(); + + AlertManager alertManager = AlertManager.getInstance(); + AlertDetailImpl alert = new AlertDetailImpl(alertType, now, alertTipId, + String.format("[3号线]列车[01-1001]按计划应于%s抵达[%s],现因[%s]晚点%s分钟", + now.minusMinutes(2), "鱼化寨", "道岔P0110失表", "2"), "道岔[P0110]", "道岔[P0110]失表"); + alertManager.emit(alert); + alertTriggered = true; + } + } + } +} diff --git a/src/main/java/club/joylink/xiannccda/alert/xian3/Xian3AlertJob.java b/src/main/java/club/joylink/xiannccda/alert/xian3/Xian3AlertJob.java deleted file mode 100644 index e2d3af1..0000000 --- a/src/main/java/club/joylink/xiannccda/alert/xian3/Xian3AlertJob.java +++ /dev/null @@ -1,26 +0,0 @@ -package club.joylink.xiannccda.alert.xian3; - -import club.joylink.xiannccda.alert.core.AlertManager; -import club.joylink.xiannccda.repository.IAlertTipRepository; -import org.springframework.boot.ApplicationArguments; -import org.springframework.boot.ApplicationRunner; -import org.springframework.core.annotation.Order; -import org.springframework.stereotype.Component; - -@Order(1) -@Component -public class Xian3AlertJob implements ApplicationRunner { - - private final IAlertTipRepository alertTipRepository; - - public Xian3AlertJob(IAlertTipRepository alertTipRepository) { - this.alertTipRepository = alertTipRepository; - } - - @Override - public void run(ApplicationArguments args) throws Exception { - AlertManager alertManager = AlertManager.getInstance(); - //报警源 - alertManager.addTask(new Xian3TrainDelayAlertMonitoringTask()); - } -} diff --git a/src/main/java/club/joylink/xiannccda/alert/xian3/Xian3BlueDisplayAlert.java b/src/main/java/club/joylink/xiannccda/alert/xian3/Xian3BlueDisplayAlert.java deleted file mode 100644 index 1601dd8..0000000 --- a/src/main/java/club/joylink/xiannccda/alert/xian3/Xian3BlueDisplayAlert.java +++ /dev/null @@ -1,33 +0,0 @@ -package club.joylink.xiannccda.alert.xian3; - -import club.joylink.xiannccda.alert.core.AlertInfo; -import java.time.LocalDateTime; -import lombok.Data; - -/** - * 西安3蓝显 - */ -@Data -public class Xian3BlueDisplayAlert implements AlertInfo { - private String id; - - @Override - public String getId() { - return id; - } - - @Override - public String getLevel() { - return null; - } - - @Override - public LocalDateTime getAlertTime() { - return null; - } - - @Override - public String getInfo() { - return null; - } -} diff --git a/src/main/java/club/joylink/xiannccda/alert/xian3/Xian3SupplyShortageAlert.java b/src/main/java/club/joylink/xiannccda/alert/xian3/Xian3SupplyShortageAlert.java deleted file mode 100644 index 279ca4f..0000000 --- a/src/main/java/club/joylink/xiannccda/alert/xian3/Xian3SupplyShortageAlert.java +++ /dev/null @@ -1,32 +0,0 @@ -package club.joylink.xiannccda.alert.xian3; - -import club.joylink.xiannccda.alert.core.AlertInfo; -import java.time.LocalDateTime; - -public class Xian3SupplyShortageAlert implements AlertInfo { - private String id; - - public Xian3SupplyShortageAlert(String id) { - this.id = id; - } - - @Override - public String getId() { - return id; - } - - @Override - public String getLevel() { - return null; - } - - @Override - public LocalDateTime getAlertTime() { - return null; - } - - @Override - public String getInfo() { - return null; - } -} diff --git a/src/main/java/club/joylink/xiannccda/alert/xian3/Xian3TrainDelayAlertMonitoringTask.java b/src/main/java/club/joylink/xiannccda/alert/xian3/Xian3TrainDelayAlertMonitoringTask.java deleted file mode 100644 index 37159a7..0000000 --- a/src/main/java/club/joylink/xiannccda/alert/xian3/Xian3TrainDelayAlertMonitoringTask.java +++ /dev/null @@ -1,43 +0,0 @@ -package club.joylink.xiannccda.alert.xian3; - -import club.joylink.xiannccda.alert.core.AlertManager; -import club.joylink.xiannccda.alert.core.AlertMonitoringTask; -import java.time.LocalDateTime; -import java.util.concurrent.atomic.AtomicInteger; - -public class Xian3TrainDelayAlertMonitoringTask implements AlertMonitoringTask { - - private final AtomicInteger id = new AtomicInteger(1); - - private boolean alertTriggered; - - public Xian3TrainDelayAlertMonitoringTask() { - } - - @Override - public String getName() { - return "Xian3_Train_Delay"; - } - - @Override - public void run() { - LocalDateTime now = LocalDateTime.now(); - if (alertTriggered) { - if (now.getSecond() % 10 != 0) { - alertTriggered = false; - } - } else { - if (now.getSecond() % 10 == 0) { - AlertManager alertManager = AlertManager.getInstance(); - Xian3TrainDelayAlert alert = Xian3TrainDelayAlert.builder() - .alertTime(now) - .info(String.format("[3号线]列车[01-1001]按计划应于%s抵达[%s],现因[%s]晚点%s分钟", - now.minusMinutes(2), "鱼化寨", "道岔P0110失表", "2")) - .alertTipId(1) - .build(); - alertManager.emit(alert); - alertTriggered = true; - } - } - } -} diff --git a/src/main/java/club/joylink/xiannccda/ats/message/line3/changer/SignalChanger.java b/src/main/java/club/joylink/xiannccda/ats/message/line3/changer/SignalChanger.java index 9278f8a..5677bf0 100644 --- a/src/main/java/club/joylink/xiannccda/ats/message/line3/changer/SignalChanger.java +++ b/src/main/java/club/joylink/xiannccda/ats/message/line3/changer/SignalChanger.java @@ -7,6 +7,9 @@ import org.apache.commons.lang3.StringUtils; public class SignalChanger { + /** + * X10301 /XR + */ public static class Signal1Changer implements NameChangerFilter { @Override @@ -31,6 +34,9 @@ public class SignalChanger { } } + /** + * X1506_L2 + */ public static class Signal2Changer implements NameChangerFilter { @Override diff --git a/src/main/java/club/joylink/xiannccda/ats/message/line3/changer/SwitchChanger.java b/src/main/java/club/joylink/xiannccda/ats/message/line3/changer/SwitchChanger.java index fa61b38..e65e0a3 100644 --- a/src/main/java/club/joylink/xiannccda/ats/message/line3/changer/SwitchChanger.java +++ b/src/main/java/club/joylink/xiannccda/ats/message/line3/changer/SwitchChanger.java @@ -4,9 +4,11 @@ import club.joylink.xiannccda.ats.message.line3.device.DeviceType; import java.util.regex.Matcher; import java.util.regex.Pattern; +/** + * P09301 + */ public class SwitchChanger implements NameChangerFilter { - @Override public DeviceType deviceType() { return DeviceType.DEVICE_TYPE_SWITCH; diff --git a/src/main/java/club/joylink/xiannccda/ats/message/line3/changer/TrackChanger.java b/src/main/java/club/joylink/xiannccda/ats/message/line3/changer/TrackChanger.java index 53c8726..d3ea31d 100644 --- a/src/main/java/club/joylink/xiannccda/ats/message/line3/changer/TrackChanger.java +++ b/src/main/java/club/joylink/xiannccda/ats/message/line3/changer/TrackChanger.java @@ -6,6 +6,9 @@ import java.util.regex.Pattern; public class TrackChanger { + /** + * 处理 3号线 区段位 T06301A 这样类似的格式 + */ public static class Track1Changer implements NameChangerFilter { @Override @@ -15,7 +18,7 @@ public class TrackChanger { @Override public String changeDeviceName(String sourceName) { - Pattern regex = Pattern.compile("^([A-Za-z]{1,2})([\\d]{1,2})3?(.*?)([A-Z])$"); + Pattern regex = Pattern.compile("^([A-Za-z]{1,2})([\\d]{1,2})3(.*?)([A-Z])$"); // Pattern regex = Pattern.compile("^([A-Za-z]{1,2})([\\d]{2})3(.*?)([A-Z])$"); Matcher matcher = regex.matcher(sourceName); if (matcher.find()) { @@ -28,6 +31,9 @@ public class TrackChanger { } } + /** + * 处理区段 T11301 这样类似的格式 + */ public static class Track4Changer implements NameChangerFilter { @Override @@ -53,6 +59,9 @@ public class TrackChanger { } } + /** + * 处理区段 TP_D33G 这样类似的格式 + */ public static class Track2Changer implements NameChangerFilter { @Override @@ -71,6 +80,9 @@ public class TrackChanger { } } + /** + * 处理区段 T150406 这样类似的格式 + */ public static class Track3Changer implements NameChangerFilter { @Override diff --git a/src/main/java/club/joylink/xiannccda/dto/protos/DeviceStatusProto.java b/src/main/java/club/joylink/xiannccda/dto/protos/DeviceStatusProto.java index 2162e83..367de39 100644 --- a/src/main/java/club/joylink/xiannccda/dto/protos/DeviceStatusProto.java +++ b/src/main/java/club/joylink/xiannccda/dto/protos/DeviceStatusProto.java @@ -6464,14 +6464,87 @@ public final class DeviceStatusProto { /** *
-     * bool ipSingleSwitchStusExpectLock = 9;      // 期望锁闭
-     * bool ipSingleSwitchStusExpectUnlock = 10;   // 期望锁闭解除
-     * bool ipSingleSwitchStusExpectNormal = 11;   // 期望道岔定位
-     * bool ipSingleSwitchStusExpectReverse = 12;  // 期望道岔反位
-     * bool ipSingleSwitchStusExpectBlock = 13;    // 期望道岔单锁
-     * bool ipSingleSwitchStusExpectUnblock = 14;  // 期望道岔解除单锁
-     * bool ipSingleSwitchStusInRoute = 15;        // 是否在进路中锁闭
-     * bool ipSingleSwitchStusManualMode = 16;     // 道岔为手动操作模式
+     * 期望锁闭
+     * 
+ * + * bool ipSingleSwitchStusExpectLock = 9; + * @return The ipSingleSwitchStusExpectLock. + */ + boolean getIpSingleSwitchStusExpectLock(); + + /** + *
+     * 期望锁闭解除
+     * 
+ * + * bool ipSingleSwitchStusExpectUnlock = 10; + * @return The ipSingleSwitchStusExpectUnlock. + */ + boolean getIpSingleSwitchStusExpectUnlock(); + + /** + *
+     * 期望道岔定位
+     * 
+ * + * bool ipSingleSwitchStusExpectNormal = 11; + * @return The ipSingleSwitchStusExpectNormal. + */ + boolean getIpSingleSwitchStusExpectNormal(); + + /** + *
+     * 期望道岔反位
+     * 
+ * + * bool ipSingleSwitchStusExpectReverse = 12; + * @return The ipSingleSwitchStusExpectReverse. + */ + boolean getIpSingleSwitchStusExpectReverse(); + + /** + *
+     * 期望道岔单锁
+     * 
+ * + * bool ipSingleSwitchStusExpectBlock = 13; + * @return The ipSingleSwitchStusExpectBlock. + */ + boolean getIpSingleSwitchStusExpectBlock(); + + /** + *
+     * 期望道岔解除单锁
+     * 
+ * + * bool ipSingleSwitchStusExpectUnblock = 14; + * @return The ipSingleSwitchStusExpectUnblock. + */ + boolean getIpSingleSwitchStusExpectUnblock(); + + /** + *
+     * 是否在进路中锁闭
+     * 
+ * + * bool ipSingleSwitchStusInRoute = 15; + * @return The ipSingleSwitchStusInRoute. + */ + boolean getIpSingleSwitchStusInRoute(); + + /** + *
+     * 道岔为手动操作模式
+     * 
+ * + * bool ipSingleSwitchStusManualMode = 16; + * @return The ipSingleSwitchStusManualMode. + */ + boolean getIpSingleSwitchStusManualMode(); + + /** + *
+     * 道岔切除
      * 
* * bool ipSingleSwitchStusCut = 17; @@ -6765,18 +6838,131 @@ public final class DeviceStatusProto { return ipSingleSwitchStusJammed_; } + public static final int IPSINGLESWITCHSTUSEXPECTLOCK_FIELD_NUMBER = 9; + private boolean ipSingleSwitchStusExpectLock_ = false; + /** + *
+     * 期望锁闭
+     * 
+ * + * bool ipSingleSwitchStusExpectLock = 9; + * @return The ipSingleSwitchStusExpectLock. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusExpectLock() { + return ipSingleSwitchStusExpectLock_; + } + + public static final int IPSINGLESWITCHSTUSEXPECTUNLOCK_FIELD_NUMBER = 10; + private boolean ipSingleSwitchStusExpectUnlock_ = false; + /** + *
+     * 期望锁闭解除
+     * 
+ * + * bool ipSingleSwitchStusExpectUnlock = 10; + * @return The ipSingleSwitchStusExpectUnlock. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusExpectUnlock() { + return ipSingleSwitchStusExpectUnlock_; + } + + public static final int IPSINGLESWITCHSTUSEXPECTNORMAL_FIELD_NUMBER = 11; + private boolean ipSingleSwitchStusExpectNormal_ = false; + /** + *
+     * 期望道岔定位
+     * 
+ * + * bool ipSingleSwitchStusExpectNormal = 11; + * @return The ipSingleSwitchStusExpectNormal. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusExpectNormal() { + return ipSingleSwitchStusExpectNormal_; + } + + public static final int IPSINGLESWITCHSTUSEXPECTREVERSE_FIELD_NUMBER = 12; + private boolean ipSingleSwitchStusExpectReverse_ = false; + /** + *
+     * 期望道岔反位
+     * 
+ * + * bool ipSingleSwitchStusExpectReverse = 12; + * @return The ipSingleSwitchStusExpectReverse. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusExpectReverse() { + return ipSingleSwitchStusExpectReverse_; + } + + public static final int IPSINGLESWITCHSTUSEXPECTBLOCK_FIELD_NUMBER = 13; + private boolean ipSingleSwitchStusExpectBlock_ = false; + /** + *
+     * 期望道岔单锁
+     * 
+ * + * bool ipSingleSwitchStusExpectBlock = 13; + * @return The ipSingleSwitchStusExpectBlock. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusExpectBlock() { + return ipSingleSwitchStusExpectBlock_; + } + + public static final int IPSINGLESWITCHSTUSEXPECTUNBLOCK_FIELD_NUMBER = 14; + private boolean ipSingleSwitchStusExpectUnblock_ = false; + /** + *
+     * 期望道岔解除单锁
+     * 
+ * + * bool ipSingleSwitchStusExpectUnblock = 14; + * @return The ipSingleSwitchStusExpectUnblock. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusExpectUnblock() { + return ipSingleSwitchStusExpectUnblock_; + } + + public static final int IPSINGLESWITCHSTUSINROUTE_FIELD_NUMBER = 15; + private boolean ipSingleSwitchStusInRoute_ = false; + /** + *
+     * 是否在进路中锁闭
+     * 
+ * + * bool ipSingleSwitchStusInRoute = 15; + * @return The ipSingleSwitchStusInRoute. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusInRoute() { + return ipSingleSwitchStusInRoute_; + } + + public static final int IPSINGLESWITCHSTUSMANUALMODE_FIELD_NUMBER = 16; + private boolean ipSingleSwitchStusManualMode_ = false; + /** + *
+     * 道岔为手动操作模式
+     * 
+ * + * bool ipSingleSwitchStusManualMode = 16; + * @return The ipSingleSwitchStusManualMode. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusManualMode() { + return ipSingleSwitchStusManualMode_; + } + public static final int IPSINGLESWITCHSTUSCUT_FIELD_NUMBER = 17; private boolean ipSingleSwitchStusCut_ = false; /** *
-     * bool ipSingleSwitchStusExpectLock = 9;      // 期望锁闭
-     * bool ipSingleSwitchStusExpectUnlock = 10;   // 期望锁闭解除
-     * bool ipSingleSwitchStusExpectNormal = 11;   // 期望道岔定位
-     * bool ipSingleSwitchStusExpectReverse = 12;  // 期望道岔反位
-     * bool ipSingleSwitchStusExpectBlock = 13;    // 期望道岔单锁
-     * bool ipSingleSwitchStusExpectUnblock = 14;  // 期望道岔解除单锁
-     * bool ipSingleSwitchStusInRoute = 15;        // 是否在进路中锁闭
-     * bool ipSingleSwitchStusManualMode = 16;     // 道岔为手动操作模式
+     * 道岔切除
      * 
* * bool ipSingleSwitchStusCut = 17; @@ -7037,6 +7223,30 @@ public final class DeviceStatusProto { if (ipSingleSwitchStusJammed_ != false) { output.writeBool(8, ipSingleSwitchStusJammed_); } + if (ipSingleSwitchStusExpectLock_ != false) { + output.writeBool(9, ipSingleSwitchStusExpectLock_); + } + if (ipSingleSwitchStusExpectUnlock_ != false) { + output.writeBool(10, ipSingleSwitchStusExpectUnlock_); + } + if (ipSingleSwitchStusExpectNormal_ != false) { + output.writeBool(11, ipSingleSwitchStusExpectNormal_); + } + if (ipSingleSwitchStusExpectReverse_ != false) { + output.writeBool(12, ipSingleSwitchStusExpectReverse_); + } + if (ipSingleSwitchStusExpectBlock_ != false) { + output.writeBool(13, ipSingleSwitchStusExpectBlock_); + } + if (ipSingleSwitchStusExpectUnblock_ != false) { + output.writeBool(14, ipSingleSwitchStusExpectUnblock_); + } + if (ipSingleSwitchStusInRoute_ != false) { + output.writeBool(15, ipSingleSwitchStusInRoute_); + } + if (ipSingleSwitchStusManualMode_ != false) { + output.writeBool(16, ipSingleSwitchStusManualMode_); + } if (ipSingleSwitchStusCut_ != false) { output.writeBool(17, ipSingleSwitchStusCut_); } @@ -7117,6 +7327,38 @@ public final class DeviceStatusProto { size += com.google.protobuf.CodedOutputStream .computeBoolSize(8, ipSingleSwitchStusJammed_); } + if (ipSingleSwitchStusExpectLock_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, ipSingleSwitchStusExpectLock_); + } + if (ipSingleSwitchStusExpectUnlock_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(10, ipSingleSwitchStusExpectUnlock_); + } + if (ipSingleSwitchStusExpectNormal_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(11, ipSingleSwitchStusExpectNormal_); + } + if (ipSingleSwitchStusExpectReverse_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(12, ipSingleSwitchStusExpectReverse_); + } + if (ipSingleSwitchStusExpectBlock_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(13, ipSingleSwitchStusExpectBlock_); + } + if (ipSingleSwitchStusExpectUnblock_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(14, ipSingleSwitchStusExpectUnblock_); + } + if (ipSingleSwitchStusInRoute_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(15, ipSingleSwitchStusInRoute_); + } + if (ipSingleSwitchStusManualMode_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(16, ipSingleSwitchStusManualMode_); + } if (ipSingleSwitchStusCut_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(17, ipSingleSwitchStusCut_); @@ -7199,6 +7441,22 @@ public final class DeviceStatusProto { != other.getIpSingleSwitchStusBlocked1()) return false; if (getIpSingleSwitchStusJammed() != other.getIpSingleSwitchStusJammed()) return false; + if (getIpSingleSwitchStusExpectLock() + != other.getIpSingleSwitchStusExpectLock()) return false; + if (getIpSingleSwitchStusExpectUnlock() + != other.getIpSingleSwitchStusExpectUnlock()) return false; + if (getIpSingleSwitchStusExpectNormal() + != other.getIpSingleSwitchStusExpectNormal()) return false; + if (getIpSingleSwitchStusExpectReverse() + != other.getIpSingleSwitchStusExpectReverse()) return false; + if (getIpSingleSwitchStusExpectBlock() + != other.getIpSingleSwitchStusExpectBlock()) return false; + if (getIpSingleSwitchStusExpectUnblock() + != other.getIpSingleSwitchStusExpectUnblock()) return false; + if (getIpSingleSwitchStusInRoute() + != other.getIpSingleSwitchStusInRoute()) return false; + if (getIpSingleSwitchStusManualMode() + != other.getIpSingleSwitchStusManualMode()) return false; if (getIpSingleSwitchStusCut() != other.getIpSingleSwitchStusCut()) return false; if (getIpSingleSwitchStusAtcInvalid() @@ -7260,6 +7518,30 @@ public final class DeviceStatusProto { hash = (37 * hash) + IPSINGLESWITCHSTUSJAMMED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIpSingleSwitchStusJammed()); + hash = (37 * hash) + IPSINGLESWITCHSTUSEXPECTLOCK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIpSingleSwitchStusExpectLock()); + hash = (37 * hash) + IPSINGLESWITCHSTUSEXPECTUNLOCK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIpSingleSwitchStusExpectUnlock()); + hash = (37 * hash) + IPSINGLESWITCHSTUSEXPECTNORMAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIpSingleSwitchStusExpectNormal()); + hash = (37 * hash) + IPSINGLESWITCHSTUSEXPECTREVERSE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIpSingleSwitchStusExpectReverse()); + hash = (37 * hash) + IPSINGLESWITCHSTUSEXPECTBLOCK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIpSingleSwitchStusExpectBlock()); + hash = (37 * hash) + IPSINGLESWITCHSTUSEXPECTUNBLOCK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIpSingleSwitchStusExpectUnblock()); + hash = (37 * hash) + IPSINGLESWITCHSTUSINROUTE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIpSingleSwitchStusInRoute()); + hash = (37 * hash) + IPSINGLESWITCHSTUSMANUALMODE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIpSingleSwitchStusManualMode()); hash = (37 * hash) + IPSINGLESWITCHSTUSCUT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIpSingleSwitchStusCut()); @@ -7436,6 +7718,14 @@ public final class DeviceStatusProto { ipSingleSwitchStusReverse_ = false; ipSingleSwitchStusBlocked1_ = false; ipSingleSwitchStusJammed_ = false; + ipSingleSwitchStusExpectLock_ = false; + ipSingleSwitchStusExpectUnlock_ = false; + ipSingleSwitchStusExpectNormal_ = false; + ipSingleSwitchStusExpectReverse_ = false; + ipSingleSwitchStusExpectBlock_ = false; + ipSingleSwitchStusExpectUnblock_ = false; + ipSingleSwitchStusInRoute_ = false; + ipSingleSwitchStusManualMode_ = false; ipSingleSwitchStusCut_ = false; ipSingleSwitchStusAtcInvalid_ = false; ipSingleSwitchStusOverlap_ = false; @@ -7507,42 +7797,66 @@ public final class DeviceStatusProto { result.ipSingleSwitchStusJammed_ = ipSingleSwitchStusJammed_; } if (((from_bitField0_ & 0x00000100) != 0)) { - result.ipSingleSwitchStusCut_ = ipSingleSwitchStusCut_; + result.ipSingleSwitchStusExpectLock_ = ipSingleSwitchStusExpectLock_; } if (((from_bitField0_ & 0x00000200) != 0)) { - result.ipSingleSwitchStusAtcInvalid_ = ipSingleSwitchStusAtcInvalid_; + result.ipSingleSwitchStusExpectUnlock_ = ipSingleSwitchStusExpectUnlock_; } if (((from_bitField0_ & 0x00000400) != 0)) { - result.ipSingleSwitchStusOverlap_ = ipSingleSwitchStusOverlap_; + result.ipSingleSwitchStusExpectNormal_ = ipSingleSwitchStusExpectNormal_; } if (((from_bitField0_ & 0x00000800) != 0)) { - result.ipSingleSwitchStusTsrCbtcMain_ = ipSingleSwitchStusTsrCbtcMain_; + result.ipSingleSwitchStusExpectReverse_ = ipSingleSwitchStusExpectReverse_; } if (((from_bitField0_ & 0x00001000) != 0)) { - result.ipSingleSwitchStusTsrCbtcNormal_ = ipSingleSwitchStusTsrCbtcNormal_; + result.ipSingleSwitchStusExpectBlock_ = ipSingleSwitchStusExpectBlock_; } if (((from_bitField0_ & 0x00002000) != 0)) { - result.ipSingleSwitchStusTsrCbtcReverse_ = ipSingleSwitchStusTsrCbtcReverse_; + result.ipSingleSwitchStusExpectUnblock_ = ipSingleSwitchStusExpectUnblock_; } if (((from_bitField0_ & 0x00004000) != 0)) { - result.ipSingleSwitchStusTsrBmMain_ = ipSingleSwitchStusTsrBmMain_; + result.ipSingleSwitchStusInRoute_ = ipSingleSwitchStusInRoute_; } if (((from_bitField0_ & 0x00008000) != 0)) { - result.ipSingleSwitchStusTsrBmNormal_ = ipSingleSwitchStusTsrBmNormal_; + result.ipSingleSwitchStusManualMode_ = ipSingleSwitchStusManualMode_; } if (((from_bitField0_ & 0x00010000) != 0)) { - result.ipSingleSwitchStusTsrBmReverse_ = ipSingleSwitchStusTsrBmReverse_; + result.ipSingleSwitchStusCut_ = ipSingleSwitchStusCut_; } if (((from_bitField0_ & 0x00020000) != 0)) { - result.ipSingleSwitchStusBlocked2_ = ipSingleSwitchStusBlocked2_; + result.ipSingleSwitchStusAtcInvalid_ = ipSingleSwitchStusAtcInvalid_; } if (((from_bitField0_ & 0x00040000) != 0)) { - result.ipSingleSwitchStusLostIndication_ = ipSingleSwitchStusLostIndication_; + result.ipSingleSwitchStusOverlap_ = ipSingleSwitchStusOverlap_; } if (((from_bitField0_ & 0x00080000) != 0)) { - result.id_ = id_; + result.ipSingleSwitchStusTsrCbtcMain_ = ipSingleSwitchStusTsrCbtcMain_; } if (((from_bitField0_ & 0x00100000) != 0)) { + result.ipSingleSwitchStusTsrCbtcNormal_ = ipSingleSwitchStusTsrCbtcNormal_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.ipSingleSwitchStusTsrCbtcReverse_ = ipSingleSwitchStusTsrCbtcReverse_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.ipSingleSwitchStusTsrBmMain_ = ipSingleSwitchStusTsrBmMain_; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.ipSingleSwitchStusTsrBmNormal_ = ipSingleSwitchStusTsrBmNormal_; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.ipSingleSwitchStusTsrBmReverse_ = ipSingleSwitchStusTsrBmReverse_; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.ipSingleSwitchStusBlocked2_ = ipSingleSwitchStusBlocked2_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.ipSingleSwitchStusLostIndication_ = ipSingleSwitchStusLostIndication_; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x10000000) != 0)) { result.speedLimit_ = speedLimit_; } } @@ -7583,6 +7897,30 @@ public final class DeviceStatusProto { if (other.getIpSingleSwitchStusJammed() != false) { setIpSingleSwitchStusJammed(other.getIpSingleSwitchStusJammed()); } + if (other.getIpSingleSwitchStusExpectLock() != false) { + setIpSingleSwitchStusExpectLock(other.getIpSingleSwitchStusExpectLock()); + } + if (other.getIpSingleSwitchStusExpectUnlock() != false) { + setIpSingleSwitchStusExpectUnlock(other.getIpSingleSwitchStusExpectUnlock()); + } + if (other.getIpSingleSwitchStusExpectNormal() != false) { + setIpSingleSwitchStusExpectNormal(other.getIpSingleSwitchStusExpectNormal()); + } + if (other.getIpSingleSwitchStusExpectReverse() != false) { + setIpSingleSwitchStusExpectReverse(other.getIpSingleSwitchStusExpectReverse()); + } + if (other.getIpSingleSwitchStusExpectBlock() != false) { + setIpSingleSwitchStusExpectBlock(other.getIpSingleSwitchStusExpectBlock()); + } + if (other.getIpSingleSwitchStusExpectUnblock() != false) { + setIpSingleSwitchStusExpectUnblock(other.getIpSingleSwitchStusExpectUnblock()); + } + if (other.getIpSingleSwitchStusInRoute() != false) { + setIpSingleSwitchStusInRoute(other.getIpSingleSwitchStusInRoute()); + } + if (other.getIpSingleSwitchStusManualMode() != false) { + setIpSingleSwitchStusManualMode(other.getIpSingleSwitchStusManualMode()); + } if (other.getIpSingleSwitchStusCut() != false) { setIpSingleSwitchStusCut(other.getIpSingleSwitchStusCut()); } @@ -7618,7 +7956,7 @@ public final class DeviceStatusProto { } if (!other.getId().isEmpty()) { id_ = other.id_; - bitField0_ |= 0x00080000; + bitField0_ |= 0x08000000; onChanged(); } if (other.getSpeedLimit() != 0) { @@ -7690,69 +8028,109 @@ public final class DeviceStatusProto { bitField0_ |= 0x00000080; break; } // case 64 + case 72: { + ipSingleSwitchStusExpectLock_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + ipSingleSwitchStusExpectUnlock_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: { + ipSingleSwitchStusExpectNormal_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: { + ipSingleSwitchStusExpectReverse_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 104: { + ipSingleSwitchStusExpectBlock_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 104 + case 112: { + ipSingleSwitchStusExpectUnblock_ = input.readBool(); + bitField0_ |= 0x00002000; + break; + } // case 112 + case 120: { + ipSingleSwitchStusInRoute_ = input.readBool(); + bitField0_ |= 0x00004000; + break; + } // case 120 + case 128: { + ipSingleSwitchStusManualMode_ = input.readBool(); + bitField0_ |= 0x00008000; + break; + } // case 128 case 136: { ipSingleSwitchStusCut_ = input.readBool(); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00010000; break; } // case 136 case 144: { ipSingleSwitchStusAtcInvalid_ = input.readBool(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00020000; break; } // case 144 case 152: { ipSingleSwitchStusOverlap_ = input.readBool(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00040000; break; } // case 152 case 160: { ipSingleSwitchStusTsrCbtcMain_ = input.readBool(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00080000; break; } // case 160 case 168: { ipSingleSwitchStusTsrCbtcNormal_ = input.readBool(); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00100000; break; } // case 168 case 176: { ipSingleSwitchStusTsrCbtcReverse_ = input.readBool(); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00200000; break; } // case 176 case 184: { ipSingleSwitchStusTsrBmMain_ = input.readBool(); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00400000; break; } // case 184 case 192: { ipSingleSwitchStusTsrBmNormal_ = input.readBool(); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00800000; break; } // case 192 case 200: { ipSingleSwitchStusTsrBmReverse_ = input.readBool(); - bitField0_ |= 0x00010000; + bitField0_ |= 0x01000000; break; } // case 200 case 208: { ipSingleSwitchStusBlocked2_ = input.readBool(); - bitField0_ |= 0x00020000; + bitField0_ |= 0x02000000; break; } // case 208 case 216: { ipSingleSwitchStusLostIndication_ = input.readBool(); - bitField0_ |= 0x00040000; + bitField0_ |= 0x04000000; break; } // case 216 case 226: { id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00080000; + bitField0_ |= 0x08000000; break; } // case 226 case 232: { speedLimit_ = input.readInt32(); - bitField0_ |= 0x00100000; + bitField0_ |= 0x10000000; break; } // case 232 default: { @@ -8124,17 +8502,362 @@ public final class DeviceStatusProto { return this; } + private boolean ipSingleSwitchStusExpectLock_ ; + /** + *
+       * 期望锁闭
+       * 
+ * + * bool ipSingleSwitchStusExpectLock = 9; + * @return The ipSingleSwitchStusExpectLock. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusExpectLock() { + return ipSingleSwitchStusExpectLock_; + } + /** + *
+       * 期望锁闭
+       * 
+ * + * bool ipSingleSwitchStusExpectLock = 9; + * @param value The ipSingleSwitchStusExpectLock to set. + * @return This builder for chaining. + */ + public Builder setIpSingleSwitchStusExpectLock(boolean value) { + + ipSingleSwitchStusExpectLock_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + *
+       * 期望锁闭
+       * 
+ * + * bool ipSingleSwitchStusExpectLock = 9; + * @return This builder for chaining. + */ + public Builder clearIpSingleSwitchStusExpectLock() { + bitField0_ = (bitField0_ & ~0x00000100); + ipSingleSwitchStusExpectLock_ = false; + onChanged(); + return this; + } + + private boolean ipSingleSwitchStusExpectUnlock_ ; + /** + *
+       * 期望锁闭解除
+       * 
+ * + * bool ipSingleSwitchStusExpectUnlock = 10; + * @return The ipSingleSwitchStusExpectUnlock. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusExpectUnlock() { + return ipSingleSwitchStusExpectUnlock_; + } + /** + *
+       * 期望锁闭解除
+       * 
+ * + * bool ipSingleSwitchStusExpectUnlock = 10; + * @param value The ipSingleSwitchStusExpectUnlock to set. + * @return This builder for chaining. + */ + public Builder setIpSingleSwitchStusExpectUnlock(boolean value) { + + ipSingleSwitchStusExpectUnlock_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + *
+       * 期望锁闭解除
+       * 
+ * + * bool ipSingleSwitchStusExpectUnlock = 10; + * @return This builder for chaining. + */ + public Builder clearIpSingleSwitchStusExpectUnlock() { + bitField0_ = (bitField0_ & ~0x00000200); + ipSingleSwitchStusExpectUnlock_ = false; + onChanged(); + return this; + } + + private boolean ipSingleSwitchStusExpectNormal_ ; + /** + *
+       * 期望道岔定位
+       * 
+ * + * bool ipSingleSwitchStusExpectNormal = 11; + * @return The ipSingleSwitchStusExpectNormal. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusExpectNormal() { + return ipSingleSwitchStusExpectNormal_; + } + /** + *
+       * 期望道岔定位
+       * 
+ * + * bool ipSingleSwitchStusExpectNormal = 11; + * @param value The ipSingleSwitchStusExpectNormal to set. + * @return This builder for chaining. + */ + public Builder setIpSingleSwitchStusExpectNormal(boolean value) { + + ipSingleSwitchStusExpectNormal_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + *
+       * 期望道岔定位
+       * 
+ * + * bool ipSingleSwitchStusExpectNormal = 11; + * @return This builder for chaining. + */ + public Builder clearIpSingleSwitchStusExpectNormal() { + bitField0_ = (bitField0_ & ~0x00000400); + ipSingleSwitchStusExpectNormal_ = false; + onChanged(); + return this; + } + + private boolean ipSingleSwitchStusExpectReverse_ ; + /** + *
+       * 期望道岔反位
+       * 
+ * + * bool ipSingleSwitchStusExpectReverse = 12; + * @return The ipSingleSwitchStusExpectReverse. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusExpectReverse() { + return ipSingleSwitchStusExpectReverse_; + } + /** + *
+       * 期望道岔反位
+       * 
+ * + * bool ipSingleSwitchStusExpectReverse = 12; + * @param value The ipSingleSwitchStusExpectReverse to set. + * @return This builder for chaining. + */ + public Builder setIpSingleSwitchStusExpectReverse(boolean value) { + + ipSingleSwitchStusExpectReverse_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + *
+       * 期望道岔反位
+       * 
+ * + * bool ipSingleSwitchStusExpectReverse = 12; + * @return This builder for chaining. + */ + public Builder clearIpSingleSwitchStusExpectReverse() { + bitField0_ = (bitField0_ & ~0x00000800); + ipSingleSwitchStusExpectReverse_ = false; + onChanged(); + return this; + } + + private boolean ipSingleSwitchStusExpectBlock_ ; + /** + *
+       * 期望道岔单锁
+       * 
+ * + * bool ipSingleSwitchStusExpectBlock = 13; + * @return The ipSingleSwitchStusExpectBlock. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusExpectBlock() { + return ipSingleSwitchStusExpectBlock_; + } + /** + *
+       * 期望道岔单锁
+       * 
+ * + * bool ipSingleSwitchStusExpectBlock = 13; + * @param value The ipSingleSwitchStusExpectBlock to set. + * @return This builder for chaining. + */ + public Builder setIpSingleSwitchStusExpectBlock(boolean value) { + + ipSingleSwitchStusExpectBlock_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + *
+       * 期望道岔单锁
+       * 
+ * + * bool ipSingleSwitchStusExpectBlock = 13; + * @return This builder for chaining. + */ + public Builder clearIpSingleSwitchStusExpectBlock() { + bitField0_ = (bitField0_ & ~0x00001000); + ipSingleSwitchStusExpectBlock_ = false; + onChanged(); + return this; + } + + private boolean ipSingleSwitchStusExpectUnblock_ ; + /** + *
+       * 期望道岔解除单锁
+       * 
+ * + * bool ipSingleSwitchStusExpectUnblock = 14; + * @return The ipSingleSwitchStusExpectUnblock. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusExpectUnblock() { + return ipSingleSwitchStusExpectUnblock_; + } + /** + *
+       * 期望道岔解除单锁
+       * 
+ * + * bool ipSingleSwitchStusExpectUnblock = 14; + * @param value The ipSingleSwitchStusExpectUnblock to set. + * @return This builder for chaining. + */ + public Builder setIpSingleSwitchStusExpectUnblock(boolean value) { + + ipSingleSwitchStusExpectUnblock_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + *
+       * 期望道岔解除单锁
+       * 
+ * + * bool ipSingleSwitchStusExpectUnblock = 14; + * @return This builder for chaining. + */ + public Builder clearIpSingleSwitchStusExpectUnblock() { + bitField0_ = (bitField0_ & ~0x00002000); + ipSingleSwitchStusExpectUnblock_ = false; + onChanged(); + return this; + } + + private boolean ipSingleSwitchStusInRoute_ ; + /** + *
+       * 是否在进路中锁闭
+       * 
+ * + * bool ipSingleSwitchStusInRoute = 15; + * @return The ipSingleSwitchStusInRoute. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusInRoute() { + return ipSingleSwitchStusInRoute_; + } + /** + *
+       * 是否在进路中锁闭
+       * 
+ * + * bool ipSingleSwitchStusInRoute = 15; + * @param value The ipSingleSwitchStusInRoute to set. + * @return This builder for chaining. + */ + public Builder setIpSingleSwitchStusInRoute(boolean value) { + + ipSingleSwitchStusInRoute_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + *
+       * 是否在进路中锁闭
+       * 
+ * + * bool ipSingleSwitchStusInRoute = 15; + * @return This builder for chaining. + */ + public Builder clearIpSingleSwitchStusInRoute() { + bitField0_ = (bitField0_ & ~0x00004000); + ipSingleSwitchStusInRoute_ = false; + onChanged(); + return this; + } + + private boolean ipSingleSwitchStusManualMode_ ; + /** + *
+       * 道岔为手动操作模式
+       * 
+ * + * bool ipSingleSwitchStusManualMode = 16; + * @return The ipSingleSwitchStusManualMode. + */ + @java.lang.Override + public boolean getIpSingleSwitchStusManualMode() { + return ipSingleSwitchStusManualMode_; + } + /** + *
+       * 道岔为手动操作模式
+       * 
+ * + * bool ipSingleSwitchStusManualMode = 16; + * @param value The ipSingleSwitchStusManualMode to set. + * @return This builder for chaining. + */ + public Builder setIpSingleSwitchStusManualMode(boolean value) { + + ipSingleSwitchStusManualMode_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + *
+       * 道岔为手动操作模式
+       * 
+ * + * bool ipSingleSwitchStusManualMode = 16; + * @return This builder for chaining. + */ + public Builder clearIpSingleSwitchStusManualMode() { + bitField0_ = (bitField0_ & ~0x00008000); + ipSingleSwitchStusManualMode_ = false; + onChanged(); + return this; + } + private boolean ipSingleSwitchStusCut_ ; /** *
-       * bool ipSingleSwitchStusExpectLock = 9;      // 期望锁闭
-       * bool ipSingleSwitchStusExpectUnlock = 10;   // 期望锁闭解除
-       * bool ipSingleSwitchStusExpectNormal = 11;   // 期望道岔定位
-       * bool ipSingleSwitchStusExpectReverse = 12;  // 期望道岔反位
-       * bool ipSingleSwitchStusExpectBlock = 13;    // 期望道岔单锁
-       * bool ipSingleSwitchStusExpectUnblock = 14;  // 期望道岔解除单锁
-       * bool ipSingleSwitchStusInRoute = 15;        // 是否在进路中锁闭
-       * bool ipSingleSwitchStusManualMode = 16;     // 道岔为手动操作模式
+       * 道岔切除
        * 
* * bool ipSingleSwitchStusCut = 17; @@ -8146,14 +8869,7 @@ public final class DeviceStatusProto { } /** *
-       * bool ipSingleSwitchStusExpectLock = 9;      // 期望锁闭
-       * bool ipSingleSwitchStusExpectUnlock = 10;   // 期望锁闭解除
-       * bool ipSingleSwitchStusExpectNormal = 11;   // 期望道岔定位
-       * bool ipSingleSwitchStusExpectReverse = 12;  // 期望道岔反位
-       * bool ipSingleSwitchStusExpectBlock = 13;    // 期望道岔单锁
-       * bool ipSingleSwitchStusExpectUnblock = 14;  // 期望道岔解除单锁
-       * bool ipSingleSwitchStusInRoute = 15;        // 是否在进路中锁闭
-       * bool ipSingleSwitchStusManualMode = 16;     // 道岔为手动操作模式
+       * 道岔切除
        * 
* * bool ipSingleSwitchStusCut = 17; @@ -8163,27 +8879,20 @@ public final class DeviceStatusProto { public Builder setIpSingleSwitchStusCut(boolean value) { ipSingleSwitchStusCut_ = value; - bitField0_ |= 0x00000100; + bitField0_ |= 0x00010000; onChanged(); return this; } /** *
-       * bool ipSingleSwitchStusExpectLock = 9;      // 期望锁闭
-       * bool ipSingleSwitchStusExpectUnlock = 10;   // 期望锁闭解除
-       * bool ipSingleSwitchStusExpectNormal = 11;   // 期望道岔定位
-       * bool ipSingleSwitchStusExpectReverse = 12;  // 期望道岔反位
-       * bool ipSingleSwitchStusExpectBlock = 13;    // 期望道岔单锁
-       * bool ipSingleSwitchStusExpectUnblock = 14;  // 期望道岔解除单锁
-       * bool ipSingleSwitchStusInRoute = 15;        // 是否在进路中锁闭
-       * bool ipSingleSwitchStusManualMode = 16;     // 道岔为手动操作模式
+       * 道岔切除
        * 
* * bool ipSingleSwitchStusCut = 17; * @return This builder for chaining. */ public Builder clearIpSingleSwitchStusCut() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00010000); ipSingleSwitchStusCut_ = false; onChanged(); return this; @@ -8214,7 +8923,7 @@ public final class DeviceStatusProto { public Builder setIpSingleSwitchStusAtcInvalid(boolean value) { ipSingleSwitchStusAtcInvalid_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -8227,7 +8936,7 @@ public final class DeviceStatusProto { * @return This builder for chaining. */ public Builder clearIpSingleSwitchStusAtcInvalid() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00020000); ipSingleSwitchStusAtcInvalid_ = false; onChanged(); return this; @@ -8258,7 +8967,7 @@ public final class DeviceStatusProto { public Builder setIpSingleSwitchStusOverlap(boolean value) { ipSingleSwitchStusOverlap_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -8271,7 +8980,7 @@ public final class DeviceStatusProto { * @return This builder for chaining. */ public Builder clearIpSingleSwitchStusOverlap() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00040000); ipSingleSwitchStusOverlap_ = false; onChanged(); return this; @@ -8302,7 +9011,7 @@ public final class DeviceStatusProto { public Builder setIpSingleSwitchStusTsrCbtcMain(boolean value) { ipSingleSwitchStusTsrCbtcMain_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -8315,7 +9024,7 @@ public final class DeviceStatusProto { * @return This builder for chaining. */ public Builder clearIpSingleSwitchStusTsrCbtcMain() { - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00080000); ipSingleSwitchStusTsrCbtcMain_ = false; onChanged(); return this; @@ -8346,7 +9055,7 @@ public final class DeviceStatusProto { public Builder setIpSingleSwitchStusTsrCbtcNormal(boolean value) { ipSingleSwitchStusTsrCbtcNormal_ = value; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -8359,7 +9068,7 @@ public final class DeviceStatusProto { * @return This builder for chaining. */ public Builder clearIpSingleSwitchStusTsrCbtcNormal() { - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00100000); ipSingleSwitchStusTsrCbtcNormal_ = false; onChanged(); return this; @@ -8390,7 +9099,7 @@ public final class DeviceStatusProto { public Builder setIpSingleSwitchStusTsrCbtcReverse(boolean value) { ipSingleSwitchStusTsrCbtcReverse_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -8403,7 +9112,7 @@ public final class DeviceStatusProto { * @return This builder for chaining. */ public Builder clearIpSingleSwitchStusTsrCbtcReverse() { - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00200000); ipSingleSwitchStusTsrCbtcReverse_ = false; onChanged(); return this; @@ -8434,7 +9143,7 @@ public final class DeviceStatusProto { public Builder setIpSingleSwitchStusTsrBmMain(boolean value) { ipSingleSwitchStusTsrBmMain_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -8447,7 +9156,7 @@ public final class DeviceStatusProto { * @return This builder for chaining. */ public Builder clearIpSingleSwitchStusTsrBmMain() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00400000); ipSingleSwitchStusTsrBmMain_ = false; onChanged(); return this; @@ -8478,7 +9187,7 @@ public final class DeviceStatusProto { public Builder setIpSingleSwitchStusTsrBmNormal(boolean value) { ipSingleSwitchStusTsrBmNormal_ = value; - bitField0_ |= 0x00008000; + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -8491,7 +9200,7 @@ public final class DeviceStatusProto { * @return This builder for chaining. */ public Builder clearIpSingleSwitchStusTsrBmNormal() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00800000); ipSingleSwitchStusTsrBmNormal_ = false; onChanged(); return this; @@ -8522,7 +9231,7 @@ public final class DeviceStatusProto { public Builder setIpSingleSwitchStusTsrBmReverse(boolean value) { ipSingleSwitchStusTsrBmReverse_ = value; - bitField0_ |= 0x00010000; + bitField0_ |= 0x01000000; onChanged(); return this; } @@ -8535,7 +9244,7 @@ public final class DeviceStatusProto { * @return This builder for chaining. */ public Builder clearIpSingleSwitchStusTsrBmReverse() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x01000000); ipSingleSwitchStusTsrBmReverse_ = false; onChanged(); return this; @@ -8566,7 +9275,7 @@ public final class DeviceStatusProto { public Builder setIpSingleSwitchStusBlocked2(boolean value) { ipSingleSwitchStusBlocked2_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x02000000; onChanged(); return this; } @@ -8579,7 +9288,7 @@ public final class DeviceStatusProto { * @return This builder for chaining. */ public Builder clearIpSingleSwitchStusBlocked2() { - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x02000000); ipSingleSwitchStusBlocked2_ = false; onChanged(); return this; @@ -8610,7 +9319,7 @@ public final class DeviceStatusProto { public Builder setIpSingleSwitchStusLostIndication(boolean value) { ipSingleSwitchStusLostIndication_ = value; - bitField0_ |= 0x00040000; + bitField0_ |= 0x04000000; onChanged(); return this; } @@ -8623,7 +9332,7 @@ public final class DeviceStatusProto { * @return This builder for chaining. */ public Builder clearIpSingleSwitchStusLostIndication() { - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x04000000); ipSingleSwitchStusLostIndication_ = false; onChanged(); return this; @@ -8684,7 +9393,7 @@ public final class DeviceStatusProto { java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; - bitField0_ |= 0x00080000; + bitField0_ |= 0x08000000; onChanged(); return this; } @@ -8698,7 +9407,7 @@ public final class DeviceStatusProto { */ public Builder clearId() { id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00080000); + bitField0_ = (bitField0_ & ~0x08000000); onChanged(); return this; } @@ -8716,7 +9425,7 @@ public final class DeviceStatusProto { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; - bitField0_ |= 0x00080000; + bitField0_ |= 0x08000000; onChanged(); return this; } @@ -8746,7 +9455,7 @@ public final class DeviceStatusProto { public Builder setSpeedLimit(int value) { speedLimit_ = value; - bitField0_ |= 0x00100000; + bitField0_ |= 0x10000000; onChanged(); return this; } @@ -8759,7 +9468,7 @@ public final class DeviceStatusProto { * @return This builder for chaining. */ public Builder clearSpeedLimit() { - bitField0_ = (bitField0_ & ~0x00100000); + bitField0_ = (bitField0_ & ~0x10000000); speedLimit_ = 0; onChanged(); return this; @@ -19128,7 +19837,7 @@ public final class DeviceStatusProto { "\001(\010\022\023\n\013yellowGreen\030\025 \001(\010\022\017\n\007blocked\030\026 \001(" + "\010\022\023\n\013lampFailure\030\027 \001(\010\022\n\n\002id\030\030 \001(\t\"I\n\005En" + "try\022\017\n\007dirLeft\030\001 \001(\010\022\020\n\010dirRight\030\002 \001(\010\022\021" + - "\n\tdirLocked\030\003 \001(\010\022\n\n\002id\030\004 \001(\t\"\355\005\n\006Switch" + + "\n\tdirLocked\030\003 \001(\010\022\n\n\002id\030\004 \001(\t\"\245\010\n\006Switch" + "\022$\n\034ipSingleSwitchStusCiOccupied\030\001 \001(\010\022&" + "\n\036ipSingleSwitchStusCbtcOccupied\030\002 \001(\010\022 " + "\n\030ipSingleSwitchStusLocked\030\003 \001(\010\022$\n\034ipSi" + @@ -19136,78 +19845,85 @@ public final class DeviceStatusProto { "leSwitchStusNormal\030\005 \001(\010\022!\n\031ipSingleSwit" + "chStusReverse\030\006 \001(\010\022\"\n\032ipSingleSwitchStu" + "sBlocked1\030\007 \001(\010\022 \n\030ipSingleSwitchStusJam" + - "med\030\010 \001(\010\022\035\n\025ipSingleSwitchStusCut\030\021 \001(\010" + - "\022$\n\034ipSingleSwitchStusAtcInvalid\030\022 \001(\010\022!" + - "\n\031ipSingleSwitchStusOverlap\030\023 \001(\010\022%\n\035ipS" + - "ingleSwitchStusTsrCbtcMain\030\024 \001(\010\022\'\n\037ipSi" + - "ngleSwitchStusTsrCbtcNormal\030\025 \001(\010\022(\n ipS" + - "ingleSwitchStusTsrCbtcReverse\030\026 \001(\010\022#\n\033i" + - "pSingleSwitchStusTsrBmMain\030\027 \001(\010\022%\n\035ipSi" + - "ngleSwitchStusTsrBmNormal\030\030 \001(\010\022&\n\036ipSin" + - "gleSwitchStusTsrBmReverse\030\031 \001(\010\022\"\n\032ipSin" + - "gleSwitchStusBlocked2\030\032 \001(\010\022(\n ipSingleS" + - "witchStusLostIndication\030\033 \001(\010\022\n\n\002id\030\034 \001(" + - "\t\022\022\n\nspeedLimit\030\035 \001(\005\"\344\002\n\005Track\022\022\n\nciOcc" + - "upied\030\001 \001(\010\022\024\n\014cbtcOccupied\030\002 \001(\010\022\016\n\006loc" + - "ked\030\003 \001(\010\022\022\n\nfailLocked\030\004 \001(\010\022\022\n\nexpectL" + - "ock\030\005 \001(\010\022\024\n\014expectUnlock\030\006 \001(\010\022\017\n\007inRou" + - "te\030\007 \001(\010\022\013\n\003cut\030\010 \001(\010\022\022\n\natcInvalid\030\t \001(" + - "\010\022\017\n\007overlap\030\n \001(\010\022\017\n\007blocked\030\013 \001(\010\022\n\n\002i" + - "d\030\014 \001(\t\022\022\n\nspeedLimit\030\r \001(\005\022)\n\tlimitType" + - "\030\016 \001(\0162\026.state.Track.LimitType\"D\n\tLimitT" + - "ype\022\013\n\007Unknown\020\000\022\010\n\004Cbtc\020\001\022\r\n\tInterlock\020" + - "\002\022\021\n\rCbtcInterlock\020\004\"\340\002\n\010Platform\022\021\n\teme" + - "rgstop\030\001 \001(\010\022\022\n\ntrainberth\030\002 \001(\010\022\r\n\005clos" + - "e\030\003 \001(\010\022\016\n\006upHold\030\004 \001(\010\022\020\n\010downHold\030\005 \001(" + - "\010\022\021\n\tupOccHold\030\006 \001(\010\022\023\n\013downOccHold\030\007 \001(" + - "\010\022\017\n\007psdOpen\030\010 \001(\010\022\016\n\006psdCut\030\t \001(\010\022\022\n\nup" + - "Skipstop\030\n \001(\010\022\024\n\014downSkipstop\030\013 \001(\010\022\027\n\017" + - "upTrainSkipstop\030\014 \001(\010\022\031\n\021downTrainSkipst" + - "op\030\r \001(\010\022\n\n\002id\030\016 \001(\t\022\032\n\022nextSectionRunTi" + - "me\030\017 \001(\005\022\033\n\023nextSectionRunLevel\030\020 \001(\005\022\020\n" + - "\010stopTime\030\021 \001(\005\"S\n\005Scada\022\017\n\007scadaOn\030\001 \001(" + - "\010\022\030\n\020scadaSinglePower\030\002 \001(\010\022\023\n\013scadaUnko" + - "wn\030\003 \001(\010\022\n\n\002id\030\004 \001(\t\"\215\001\n\016WaterProofDoor\022" + - "\022\n\ndoorClosed\030\001 \001(\010\022\027\n\017doorExpectClose\030\002" + - " \001(\010\022\027\n\017doorAgreeClosed\030\003 \001(\010\022\023\n\013doorClo" + - "sing\030\004 \001(\010\022\024\n\014doorOpenLock\030\005 \001(\010\022\n\n\002id\030\006" + - " \001(\t\"4\n\010WorkArea\022\034\n\024ipStusWorkAreaEnable" + - "\030\001 \001(\010\022\n\n\002id\030\002 \001(\t\"-\n\004Gama\022\031\n\021ipStusGama" + - "Disable\030\001 \001(\010\022\n\n\002id\030\002 \001(\t\"\237\010\n\tTrainMode\022" + - "\035\n\025ipModeTrainTypeManual\030\001 \001(\010\022\033\n\023ipMode" + - "TrainTypeHead\030\002 \001(\010\022\036\n\026ipModeTrainTypeSp" + - "ecial\030\003 \001(\010\022\037\n\027ipModeTrainTypeSchedule\030\004" + - " \001(\010\022\034\n\024ipModeTrainTypeRoute\030\005 \001(\010\022\036\n\026ip" + - "ModeTrainTypeShuttle\030\006 \001(\010\022\035\n\025ipModeTrai" + - "nTypeLineup\030\007 \001(\010\022\034\n\024ipModeTrainSchdEarl" + - "y\030\010 \001(\010\022\033\n\023ipModeTrainSchdLate\030\t \001(\010\022\033\n\023" + - "ipModeTrainSkipstop\030\n \001(\010\022\033\n\023ipModeTrain" + - "CbtcMode\030\013 \001(\010\022\031\n\021ipModeTrainAtpCut\030\014 \001(" + - "\010\022\032\n\022ipModeTrainBerthed\030\r \001(\010\022\031\n\021ipModeT" + - "rainStoped\030\016 \001(\010\022\031\n\021ipModeTrainHolded\030\017 " + - "\001(\010\022\030\n\020ipModeTrainItama\030\020 \001(\010\022\030\n\020ipModeT" + - "rainDirUp\030\021 \001(\010\022\032\n\022ipModeTrainDirDown\030\022 " + - "\001(\010\022\034\n\024ipModeTrainDirHeadUp\030\023 \001(\010\022\036\n\026ipM" + - "odeTrainDirHeadDown\030\024 \001(\010\022\033\n\023ipModeTrain" + - "DoorOpen\030\025 \001(\010\022\032\n\022ipModeTrainRsAlarm\030\026 \001" + - "(\010\022\034\n\024ipModeTrainDoorAlarm\030\027 \001(\010\022\032\n\022ipMo" + - "deTrainEbAlarm\030\030 \001(\010\022!\n\031ipModeTrainInteg" + - "rityAlarm\030\031 \001(\010\022\036\n\026ipModeTrainDriveModeA" + - "m\030\032 \001(\010\022\036\n\026ipModeTrainDriveModeCm\030\033 \001(\010\022" + - "\037\n\027ipModeTrainDriveModeRmf\030\034 \001(\010\022\037\n\027ipMo" + - "deTrainDriveModeDto\030\035 \001(\010\022\037\n\027ipModeTrain" + - "DriveModeAtb\030\036 \001(\010\022\037\n\027ipModeTrainDriveBl" + - "ockAm\030\037 \001(\010\022\037\n\027ipModeTrainDriveBlockCm\030 " + - " \001(\010\022\037\n\027ipModeTrainDriveModeRmr\030! \001(\010\022 \n" + - "\030ipModeTrainDriveModeWash\030\" \001(\010\022\n\n\002id\030# " + - "\001(\t\".\n\020OccNccFepNetwork\022\n\n\002id\030\001 \001(\t\022\016\n\006a" + - "ctive\030\002 \001(\010*\243\001\n\nDeviceType\022\n\n\006UNKNOW\020\000\022\007" + - "\n\003RTU\020\001\022\013\n\007STATION\020\002\022\n\n\006SIGNAL\020\003\022\n\n\006SWIT" + - "CH\020\004\022\t\n\005TRACK\020\005\022\t\n\005ENTRY\020\006\022\014\n\010PLATFORM\020\007" + - "\022\t\n\005SCADA\020\t\022\023\n\017WATERPROOF_DOOR\020\013\022\r\n\tWORK" + - "_AREA\020\014\022\010\n\004GAMA\020\rB6\n!club.joylink.xiannc" + - "cda.dto.protosB\021DeviceStatusProtob\006proto" + - "3" + "med\030\010 \001(\010\022$\n\034ipSingleSwitchStusExpectLoc" + + "k\030\t \001(\010\022&\n\036ipSingleSwitchStusExpectUnloc" + + "k\030\n \001(\010\022&\n\036ipSingleSwitchStusExpectNorma" + + "l\030\013 \001(\010\022\'\n\037ipSingleSwitchStusExpectRever" + + "se\030\014 \001(\010\022%\n\035ipSingleSwitchStusExpectBloc" + + "k\030\r \001(\010\022\'\n\037ipSingleSwitchStusExpectUnblo" + + "ck\030\016 \001(\010\022!\n\031ipSingleSwitchStusInRoute\030\017 " + + "\001(\010\022$\n\034ipSingleSwitchStusManualMode\030\020 \001(" + + "\010\022\035\n\025ipSingleSwitchStusCut\030\021 \001(\010\022$\n\034ipSi" + + "ngleSwitchStusAtcInvalid\030\022 \001(\010\022!\n\031ipSing" + + "leSwitchStusOverlap\030\023 \001(\010\022%\n\035ipSingleSwi" + + "tchStusTsrCbtcMain\030\024 \001(\010\022\'\n\037ipSingleSwit" + + "chStusTsrCbtcNormal\030\025 \001(\010\022(\n ipSingleSwi" + + "tchStusTsrCbtcReverse\030\026 \001(\010\022#\n\033ipSingleS" + + "witchStusTsrBmMain\030\027 \001(\010\022%\n\035ipSingleSwit" + + "chStusTsrBmNormal\030\030 \001(\010\022&\n\036ipSingleSwitc" + + "hStusTsrBmReverse\030\031 \001(\010\022\"\n\032ipSingleSwitc" + + "hStusBlocked2\030\032 \001(\010\022(\n ipSingleSwitchStu" + + "sLostIndication\030\033 \001(\010\022\n\n\002id\030\034 \001(\t\022\022\n\nspe" + + "edLimit\030\035 \001(\005\"\344\002\n\005Track\022\022\n\nciOccupied\030\001 " + + "\001(\010\022\024\n\014cbtcOccupied\030\002 \001(\010\022\016\n\006locked\030\003 \001(" + + "\010\022\022\n\nfailLocked\030\004 \001(\010\022\022\n\nexpectLock\030\005 \001(" + + "\010\022\024\n\014expectUnlock\030\006 \001(\010\022\017\n\007inRoute\030\007 \001(\010" + + "\022\013\n\003cut\030\010 \001(\010\022\022\n\natcInvalid\030\t \001(\010\022\017\n\007ove" + + "rlap\030\n \001(\010\022\017\n\007blocked\030\013 \001(\010\022\n\n\002id\030\014 \001(\t\022" + + "\022\n\nspeedLimit\030\r \001(\005\022)\n\tlimitType\030\016 \001(\0162\026" + + ".state.Track.LimitType\"D\n\tLimitType\022\013\n\007U" + + "nknown\020\000\022\010\n\004Cbtc\020\001\022\r\n\tInterlock\020\002\022\021\n\rCbt" + + "cInterlock\020\004\"\340\002\n\010Platform\022\021\n\temergstop\030\001" + + " \001(\010\022\022\n\ntrainberth\030\002 \001(\010\022\r\n\005close\030\003 \001(\010\022" + + "\016\n\006upHold\030\004 \001(\010\022\020\n\010downHold\030\005 \001(\010\022\021\n\tupO" + + "ccHold\030\006 \001(\010\022\023\n\013downOccHold\030\007 \001(\010\022\017\n\007psd" + + "Open\030\010 \001(\010\022\016\n\006psdCut\030\t \001(\010\022\022\n\nupSkipstop" + + "\030\n \001(\010\022\024\n\014downSkipstop\030\013 \001(\010\022\027\n\017upTrainS" + + "kipstop\030\014 \001(\010\022\031\n\021downTrainSkipstop\030\r \001(\010" + + "\022\n\n\002id\030\016 \001(\t\022\032\n\022nextSectionRunTime\030\017 \001(\005" + + "\022\033\n\023nextSectionRunLevel\030\020 \001(\005\022\020\n\010stopTim" + + "e\030\021 \001(\005\"S\n\005Scada\022\017\n\007scadaOn\030\001 \001(\010\022\030\n\020sca" + + "daSinglePower\030\002 \001(\010\022\023\n\013scadaUnkown\030\003 \001(\010" + + "\022\n\n\002id\030\004 \001(\t\"\215\001\n\016WaterProofDoor\022\022\n\ndoorC" + + "losed\030\001 \001(\010\022\027\n\017doorExpectClose\030\002 \001(\010\022\027\n\017" + + "doorAgreeClosed\030\003 \001(\010\022\023\n\013doorClosing\030\004 \001" + + "(\010\022\024\n\014doorOpenLock\030\005 \001(\010\022\n\n\002id\030\006 \001(\t\"4\n\010" + + "WorkArea\022\034\n\024ipStusWorkAreaEnable\030\001 \001(\010\022\n" + + "\n\002id\030\002 \001(\t\"-\n\004Gama\022\031\n\021ipStusGamaDisable\030" + + "\001 \001(\010\022\n\n\002id\030\002 \001(\t\"\237\010\n\tTrainMode\022\035\n\025ipMod" + + "eTrainTypeManual\030\001 \001(\010\022\033\n\023ipModeTrainTyp" + + "eHead\030\002 \001(\010\022\036\n\026ipModeTrainTypeSpecial\030\003 " + + "\001(\010\022\037\n\027ipModeTrainTypeSchedule\030\004 \001(\010\022\034\n\024" + + "ipModeTrainTypeRoute\030\005 \001(\010\022\036\n\026ipModeTrai" + + "nTypeShuttle\030\006 \001(\010\022\035\n\025ipModeTrainTypeLin" + + "eup\030\007 \001(\010\022\034\n\024ipModeTrainSchdEarly\030\010 \001(\010\022" + + "\033\n\023ipModeTrainSchdLate\030\t \001(\010\022\033\n\023ipModeTr" + + "ainSkipstop\030\n \001(\010\022\033\n\023ipModeTrainCbtcMode" + + "\030\013 \001(\010\022\031\n\021ipModeTrainAtpCut\030\014 \001(\010\022\032\n\022ipM" + + "odeTrainBerthed\030\r \001(\010\022\031\n\021ipModeTrainStop" + + "ed\030\016 \001(\010\022\031\n\021ipModeTrainHolded\030\017 \001(\010\022\030\n\020i" + + "pModeTrainItama\030\020 \001(\010\022\030\n\020ipModeTrainDirU" + + "p\030\021 \001(\010\022\032\n\022ipModeTrainDirDown\030\022 \001(\010\022\034\n\024i" + + "pModeTrainDirHeadUp\030\023 \001(\010\022\036\n\026ipModeTrain" + + "DirHeadDown\030\024 \001(\010\022\033\n\023ipModeTrainDoorOpen" + + "\030\025 \001(\010\022\032\n\022ipModeTrainRsAlarm\030\026 \001(\010\022\034\n\024ip" + + "ModeTrainDoorAlarm\030\027 \001(\010\022\032\n\022ipModeTrainE" + + "bAlarm\030\030 \001(\010\022!\n\031ipModeTrainIntegrityAlar" + + "m\030\031 \001(\010\022\036\n\026ipModeTrainDriveModeAm\030\032 \001(\010\022" + + "\036\n\026ipModeTrainDriveModeCm\030\033 \001(\010\022\037\n\027ipMod" + + "eTrainDriveModeRmf\030\034 \001(\010\022\037\n\027ipModeTrainD" + + "riveModeDto\030\035 \001(\010\022\037\n\027ipModeTrainDriveMod" + + "eAtb\030\036 \001(\010\022\037\n\027ipModeTrainDriveBlockAm\030\037 " + + "\001(\010\022\037\n\027ipModeTrainDriveBlockCm\030 \001(\010\022\037\n\027" + + "ipModeTrainDriveModeRmr\030! \001(\010\022 \n\030ipModeT" + + "rainDriveModeWash\030\" \001(\010\022\n\n\002id\030# \001(\t\".\n\020O" + + "ccNccFepNetwork\022\n\n\002id\030\001 \001(\t\022\016\n\006active\030\002 " + + "\001(\010*\243\001\n\nDeviceType\022\n\n\006UNKNOW\020\000\022\007\n\003RTU\020\001\022" + + "\013\n\007STATION\020\002\022\n\n\006SIGNAL\020\003\022\n\n\006SWITCH\020\004\022\t\n\005" + + "TRACK\020\005\022\t\n\005ENTRY\020\006\022\014\n\010PLATFORM\020\007\022\t\n\005SCAD" + + "A\020\t\022\023\n\017WATERPROOF_DOOR\020\013\022\r\n\tWORK_AREA\020\014\022" + + "\010\n\004GAMA\020\rB6\n!club.joylink.xiannccda.dto." + + "protosB\021DeviceStatusProtob\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -19242,7 +19958,7 @@ public final class DeviceStatusProto { internal_static_state_Switch_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_state_Switch_descriptor, - new java.lang.String[] { "IpSingleSwitchStusCiOccupied", "IpSingleSwitchStusCbtcOccupied", "IpSingleSwitchStusLocked", "IpSingleSwitchStusFailLocked", "IpSingleSwitchStusNormal", "IpSingleSwitchStusReverse", "IpSingleSwitchStusBlocked1", "IpSingleSwitchStusJammed", "IpSingleSwitchStusCut", "IpSingleSwitchStusAtcInvalid", "IpSingleSwitchStusOverlap", "IpSingleSwitchStusTsrCbtcMain", "IpSingleSwitchStusTsrCbtcNormal", "IpSingleSwitchStusTsrCbtcReverse", "IpSingleSwitchStusTsrBmMain", "IpSingleSwitchStusTsrBmNormal", "IpSingleSwitchStusTsrBmReverse", "IpSingleSwitchStusBlocked2", "IpSingleSwitchStusLostIndication", "Id", "SpeedLimit", }); + new java.lang.String[] { "IpSingleSwitchStusCiOccupied", "IpSingleSwitchStusCbtcOccupied", "IpSingleSwitchStusLocked", "IpSingleSwitchStusFailLocked", "IpSingleSwitchStusNormal", "IpSingleSwitchStusReverse", "IpSingleSwitchStusBlocked1", "IpSingleSwitchStusJammed", "IpSingleSwitchStusExpectLock", "IpSingleSwitchStusExpectUnlock", "IpSingleSwitchStusExpectNormal", "IpSingleSwitchStusExpectReverse", "IpSingleSwitchStusExpectBlock", "IpSingleSwitchStusExpectUnblock", "IpSingleSwitchStusInRoute", "IpSingleSwitchStusManualMode", "IpSingleSwitchStusCut", "IpSingleSwitchStusAtcInvalid", "IpSingleSwitchStusOverlap", "IpSingleSwitchStusTsrCbtcMain", "IpSingleSwitchStusTsrCbtcNormal", "IpSingleSwitchStusTsrCbtcReverse", "IpSingleSwitchStusTsrBmMain", "IpSingleSwitchStusTsrBmNormal", "IpSingleSwitchStusTsrBmReverse", "IpSingleSwitchStusBlocked2", "IpSingleSwitchStusLostIndication", "Id", "SpeedLimit", }); internal_static_state_Track_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_state_Track_fieldAccessorTable = new diff --git a/src/main/java/club/joylink/xiannccda/ws/NccAlertMessageServer.java b/src/main/java/club/joylink/xiannccda/ws/NccAlertMessageServer.java index b2d7f4a..62954b3 100644 --- a/src/main/java/club/joylink/xiannccda/ws/NccAlertMessageServer.java +++ b/src/main/java/club/joylink/xiannccda/ws/NccAlertMessageServer.java @@ -66,7 +66,7 @@ public class NccAlertMessageServer implements IMessageServer { this.id = id; } - public static NccAlertMessageServer getInstance() { + public static NccAlertMessageServer getDefault() { return getInstance("default"); } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 70cfb10..011d8a7 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -2,7 +2,7 @@ server: port: 9081 spring: profiles: - active: local + active: dev banner: location: classpath:banner.txt datasource: diff --git a/src/test/java/club/joylink/xiannccda/alert/AlertManagerTest.java b/src/test/java/club/joylink/xiannccda/alert/AlertManagerTest.java index 7fab1f6..9d5331c 100644 --- a/src/test/java/club/joylink/xiannccda/alert/AlertManagerTest.java +++ b/src/test/java/club/joylink/xiannccda/alert/AlertManagerTest.java @@ -3,8 +3,6 @@ package club.joylink.xiannccda.alert; import club.joylink.xiannccda.alert.core.AlertManager; import club.joylink.xiannccda.alert.core.AlertMonitoringTask; import club.joylink.xiannccda.alert.core.AlertSourceEvent; -import club.joylink.xiannccda.alert.xian3.Xian3SupplyShortageAlert; -import club.joylink.xiannccda.alert.xian3.Xian3TrainDelayAlert; import club.joylink.xiannccda.event.Listener; import java.util.ArrayList; import java.util.List; @@ -23,8 +21,7 @@ public class AlertManagerTest { //可能报警事件监听器 manager.on(new SuppliesRemainInsufficientListener(sid)); //报警事件监听器 - manager.on((Listener) event -> System.out.println("列车延误报警")); - manager.on((Listener) event -> System.out.println("物资紧缺报警")); + manager.on((Listener) event -> System.out.println("列车延误报警")); manager.taskStart(); manager.emit(new SuppliesCountUpdatedEvent(this, 2)); @@ -78,9 +75,6 @@ public class AlertManagerTest { @Override public void accept(SuppliesCountUpdatedEvent event) { - if (event.getRemain() <= SuppliesAlertMin) { - AlertManager.getInstance(sId).emit(new Xian3SupplyShortageAlert("2")); - } } } diff --git a/xian-ncc-da-message b/xian-ncc-da-message index 90b6f46..eb0ad6e 160000 --- a/xian-ncc-da-message +++ b/xian-ncc-da-message @@ -1 +1 @@ -Subproject commit 90b6f4600e531c496d849163653acb80c6e933ea +Subproject commit eb0ad6e4305642b6619f5e97d1498ad5dc5a6d42