From 0613a5b982c6521560ea17eda7c07bb97e6ec5e9 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期三, 17 一月 2024 09:14:43 +0800
Subject: [PATCH] 修改交互状态页面

---
 springboot-vue3/src/main/java/com/example/springboot/component/MessageHandler.java |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/MessageHandler.java b/springboot-vue3/src/main/java/com/example/springboot/component/MessageHandler.java
index 1661078..0e02e97 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/MessageHandler.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/MessageHandler.java
@@ -24,6 +24,11 @@
         }
     }
 
+
+
+
+
+
     //鍐欏叆bit
     public void writeBitToPLC(JSONArray messageArray, List<String> addresses, int index) {
         try {
@@ -204,6 +209,17 @@
 
 
 
+    public short[] convertBooleanListToShortArray(List<Boolean> booleanList) {
+        short[] shortArray = new short[booleanList.size()];
+        for (int i = 0; i < booleanList.size(); i++) {
+            boolean value = booleanList.get(i);
+            shortArray[i] = value ? (short) 1 : (short) 0;
+        }
+        return shortArray;
+    }
+
+
+
 
 
 

--
Gitblit v1.8.0