diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/TrainStatus.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/TrainStatus.java index 29711e6f5..a30452756 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/TrainStatus.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/TrainStatus.java @@ -141,6 +141,8 @@ public class TrainStatus extends DeviceStatus { private int runningTime; + private boolean parking; + private int parkingRemainTime; private String turnBackStrategy; @@ -185,6 +187,7 @@ public class TrainStatus extends DeviceStatus { this.startStation = train.getStartStation(); this.endStation = train.getEndStation(); this.runningTime = train.getRunningTimeInSeconds(); + this.parking = train.isParking(); this.parkingRemainTime = train.getParkingRemainTimeInSeconds(); this.turnBackStrategy = train.getTurnBackStrategy(); this.turnBackStatus = train.getTurnBackStatus(); @@ -330,6 +333,11 @@ public class TrainStatus extends DeviceStatus { status.setRunningTime(this.runningTime); change = true; } + if (!Objects.equals(this.parking, train.isParking())) { + this.parking = train.isParking(); + status.setParking(this.parking); + change = true; + } if (!Objects.equals(this.parkingRemainTime, train.getParkingRemainTimeInSeconds())) { this.parkingRemainTime = train.getParkingRemainTimeInSeconds(); status.setParkingRemainTime(this.parkingRemainTime); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vo/TrainStatusVO.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vo/TrainStatusVO.java index 4840d3721..4c4c55742 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/vo/TrainStatusVO.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/vo/TrainStatusVO.java @@ -141,6 +141,8 @@ public class TrainStatusVO extends DeviceStatusVO { private Integer runningTime; + private Boolean parking; + private Integer parkingRemainTime; private String turnBackStrategy; @@ -183,6 +185,7 @@ public class TrainStatusVO extends DeviceStatusVO { this.startStation = train.getStartStation(); this.endStation = train.getEndStation(); this.runningTime = train.getRunningTime(); + this.parking = train.isParking(); this.parkingRemainTime = train.getParkingRemainTime(); this.turnBackStrategy = train.getTurnBackStrategy(); this.turnBackStatus = train.getTurnBackStatus();