From cfe232769d099a691d872e0f7006e3c268e1633b Mon Sep 17 00:00:00 2001 From: sheng Date: Mon, 27 Dec 2021 09:12:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=89=E7=BB=B4=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E5=AF=B9=E8=B1=A1=E8=BD=AC=E6=8D=A2=E8=B5=8B=E5=80=BC?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/real/modbustcp/SimulationRealDeviceThread.java | 8 ++++++++ .../simulation/cbtc/device/real/modbustcp/TCPServer2.java | 4 ++++ src/main/java/club/joylink/rtss/vo/draft/Lesson3DVO.java | 1 + 3 files changed, 13 insertions(+) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/SimulationRealDeviceThread.java b/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/SimulationRealDeviceThread.java index 2bd742f98..47e769c77 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/SimulationRealDeviceThread.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/SimulationRealDeviceThread.java @@ -87,6 +87,10 @@ public class SimulationRealDeviceThread { } } + /** + * 获取真实设备数据 + * @param simulation + */ public void queryDeviceStatus(Simulation simulation) { PlcGateway plcGateway = simulation.queryPlcGatewayDevice(); if (Objects.isNull(plcGateway)) { @@ -104,6 +108,10 @@ public class SimulationRealDeviceThread { } } + /** + * 根据获取到的真实设备状态更新仿真设备状态 + * @param simulation + */ public void UpdateDeviceStatusByCollection(Simulation simulation) { Queue futureQueue = simulation.getDeviceQueryFutureQueue(); DeviceQueryFuture deviceQueryFuture = futureQueue.peek(); diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/TCPServer2.java b/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/TCPServer2.java index 72025f25e..a0fdd9ce6 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/TCPServer2.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/device/real/modbustcp/TCPServer2.java @@ -35,6 +35,10 @@ public class TCPServer2 implements ApplicationRunner { this.start(); } + /** + * 真实设备(屏蔽门、道岔、信号机等)连接服务启动 + * @throws InterruptedException + */ public void start() throws InterruptedException { EventLoopGroup bossGroup = new NioEventLoopGroup(); EventLoopGroup workerGroup = new NioEventLoopGroup(); diff --git a/src/main/java/club/joylink/rtss/vo/draft/Lesson3DVO.java b/src/main/java/club/joylink/rtss/vo/draft/Lesson3DVO.java index 2230710cc..b9847fbd5 100644 --- a/src/main/java/club/joylink/rtss/vo/draft/Lesson3DVO.java +++ b/src/main/java/club/joylink/rtss/vo/draft/Lesson3DVO.java @@ -68,6 +68,7 @@ public class Lesson3DVO { this.id = lesson.getId(); this.name = lesson.getName(); this.type = lesson.getType(); + this.data = lesson.getData(); this.state = lesson.getState(); this.userId = lesson.getUserId(); this.createTime = lesson.getCreateTime();