From 26784989e73fc36c6315e54939d1b13a50eb5020 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期四, 26 三月 2026 21:03:00 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/network/ZyStationConnectDriver.java |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/core/network/ZyStationConnectDriver.java b/src/main/java/com/zy/core/network/ZyStationConnectDriver.java
index d986133..184d4af 100644
--- a/src/main/java/com/zy/core/network/ZyStationConnectDriver.java
+++ b/src/main/java/com/zy/core/network/ZyStationConnectDriver.java
@@ -69,7 +69,8 @@
                 if (deviceConfig.getFake() == 0) {
                     if ("ZyStationV3Thread".equals(deviceConfig.getThreadImpl())) {
                         connectApi = new ZyStationV3RealConnect(deviceConfig, redisUtil);
-                    } else if ("ZyStationV4Thread".equals(deviceConfig.getThreadImpl())) {
+                    } else if ("ZyStationV4Thread".equals(deviceConfig.getThreadImpl())
+                            || "ZyStationV5Thread".equals(deviceConfig.getThreadImpl())) {
                         connectApi = new ZyStationV4RealConnect(deviceConfig, redisUtil);
                     } else {
                         connectApi = new ZyStationRealConnect(deviceConfig, redisUtil);
@@ -78,13 +79,14 @@
                     if ("ZyStationV3Thread".equals(deviceConfig.getThreadImpl())) {
                         zyStationFakeSegConnect.addFakeConnect(deviceConfig, redisUtil);
                         connectApi = zyStationFakeSegConnect;
-                    } else if ("ZyStationV4Thread".equals(deviceConfig.getThreadImpl())) {
+                    } else if ("ZyStationV4Thread".equals(deviceConfig.getThreadImpl())
+                            || "ZyStationV5Thread".equals(deviceConfig.getThreadImpl())) {
                         zyStationV4FakeSegConnect.addFakeConnect(deviceConfig, redisUtil);
                         connectApi = zyStationV4FakeSegConnect;
                     } else {
                         fakeConfigUnsupported = true;
                         zyStationConnectApi = null;
-                        log.error("鏃х増杈撻�佺珯 fake 宸茬Щ闄わ紝deviceNo={}, threadImpl={}, 璇峰垏鎹㈠埌 ZyStationV3Thread 鎴� ZyStationV4Thread",
+                        log.error("鏃х増杈撻�佺珯 fake 宸茬Щ闄わ紝deviceNo={}, threadImpl={}, 璇峰垏鎹㈠埌 ZyStationV3Thread銆乑yStationV4Thread 鎴� ZyStationV5Thread",
                                 deviceConfig.getDeviceNo(), deviceConfig.getThreadImpl());
                         return false;
                     }
@@ -184,6 +186,15 @@
         return connectApi.sendOriginCommand(address, data);
     }
 
+    public boolean clearTaskBufferSlot(Integer stationId, Integer slotIdx) {
+        ZyStationConnectApi connectApi = zyStationConnectApi;
+        if (!connected || connecting || connectApi == null) {
+            return false;
+        }
+        CommandResponse response = connectApi.clearTaskBufferSlot(deviceConfig.getDeviceNo(), stationId, slotIdx);
+        return response != null && Boolean.TRUE.equals(response.getResult());
+    }
+
     public byte[] readOriginCommand(String address, int length) {
         ZyStationConnectApi connectApi = zyStationConnectApi;
         if (!connected || connecting || connectApi == null) {

--
Gitblit v1.9.1