From d15cae9e8d2cabf8d0f3ed41f2f88b04131f8c76 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 31 七月 2025 14:18:58 +0800
Subject: [PATCH] 增加查询单个设备(RTU或FBox)是否在线的功能接口
---
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 52 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java
index 42d074e..23b2675 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/rtuMw/Web2RtuMw.java
@@ -185,6 +185,7 @@
/**
* 鍒涘缓澶栭儴鍛戒护锛堝彂缁欐帶鍒跺櫒锛�
+ * @param comId 鍛戒护ID
* @param code 鍛戒护code
* @return
*/
@@ -197,7 +198,42 @@
}
/**
+ * 鍒涘缓澶栭儴鍛戒护锛堝彂缁欐帶鍒跺櫒锛�
+ * @param rtuAddr 鎺у埗鍣ㄥ湴鍧�
+ * @param comId 鍛戒护ID
+ * @param code 鍛戒护code
+ * @return
+ */
+ public Command createOuterCommand(String rtuAddr, String comId, String code) {
+ Command com = new Command();
+ com.id = comId;
+ com.rtuAddr = rtuAddr;
+ com.code = code ;
+ com.type = CommandType.outerCommand;
+ return com ;
+ }
+
+ /**
+ * 鍒涘缓澶栭儴鍛戒护锛堝彂缁欐帶鍒跺櫒锛�
+ * @param fboxId FBox璁惧搴忓垪鍙�
+ * @param comId 鍛戒护ID
+ * @param code 鍛戒护code
+ * @return
+ */
+ public Command createMQTTCommand(String fboxId, String comId, String protocol, Short protocolVer, String code) {
+ Command com = new Command();
+ com.id = comId;
+ com.rtuAddr = fboxId;
+ com.code = code ;
+ com.protocol = protocol ;
+ com.protocolVersion = protocolVer ;
+ com.type = CommandType.mqttCommand;
+ return com ;
+ }
+
+ /**
* 鍒涘缓澶栭儴閫忎紶鍛戒护锛堝彂缁欐帶鍒跺櫒锛�
+ * @param comId 鍛戒护ID
* @param code 鍛戒护code
* @return
*/
@@ -210,6 +246,22 @@
}
/**
+ * 鍒涘缓澶栭儴閫忎紶鍛戒护锛堝彂缁欐帶鍒跺櫒锛�
+ * @param rtuAddr 鎺у埗鍣ㄥ湴鍧�
+ * @param comId 鍛戒护ID
+ * @param code 鍛戒护code
+ * @return
+ */
+ public Command createOuterTransparentCommand(String rtuAddr, String comId, String code) {
+ Command com = new Command();
+ com.id = comId;
+ com.rtuAddr = rtuAddr;
+ com.code = code ;
+ com.type = CommandType.outerTransCommand;
+ return com ;
+ }
+
+ /**
* 鍒涘缓鍐呴儴鍛戒护
* @param code 鍛戒护code
* @return
--
Gitblit v1.8.0