From 01cb633562174ae7390d12b85690a45997f34be7 Mon Sep 17 00:00:00 2001
From: yyt <306727702@qq.com>
Date: 星期三, 24 一月 2024 11:17:20 +0800
Subject: [PATCH] 更新OPCUA

---
 jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java |   27 ++-------------------------
 1 files changed, 2 insertions(+), 25 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java
index bdc2dc7..6267237 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java
@@ -157,7 +157,7 @@
 	public void handle(NodeId id, Variant value){
 		if (b == null || 0 > b.size()) {
 			DaOpcuaConfig opcuaConfParam=new DaOpcuaConfig();
-		    opcuaConfParam.setSubscribe(1L);
+		    opcuaConfParam.setSubscribe("Y");
 		    b=daOpcuaConfigService.selectDaOpcuaConfigList(opcuaConfParam);
 		}
 		//浣跨敤Stream API鍦↙ist<T>涓煡鎵惧厓绱�
@@ -166,7 +166,7 @@
 				.findAny()
 				.orElse(null);
 		try {
-			Class<?> clazz = Class.forName(daOpcuaConfig.getrModule());
+			Class<?> clazz = Class.forName("com.jcdm.main.da.opcuaconfig.cert.MethodName");
 			Method method = clazz.getMethod(daOpcuaConfig.getrFunction(), new Class[] { String.class, String.class });
 			method.invoke(clazz.newInstance(),new Object[] {
 					new String(id.getIdentifier().toString()), new String(value.getValue().toString()) });
@@ -219,29 +219,6 @@
 
 		return statusCode.isGood();
 	}
-
-	/**
-	 * 鏂规硶鎻忚堪: 璇诲彇澶氫釜鐐逛綅鐨勫��
-	 *
-	 * @param keys 鐐逛綅闆嗗悎
-	 * @return {@link List<DataValue>}
-	 * @throws
-	 */
-//	public static List<DataValue> readValues2(Set<String> keys){
-//		List<NodeId> nodeIdList=new ArrayList<>(500);
-//		keys.forEach(e->{
-//			NodeId nodeId = new NodeId(2, e);
-//			nodeIdList.add(nodeId);
-//		});
-//		try {
-//			List<DataValue> dataValues=client.readValues(0.0, TimestampsToReturn.Both,nodeIdList).get();
-//			return dataValues;
-//		} catch (InterruptedException | ExecutionException e) {
-//			e.printStackTrace();
-//		}
-//		return null;
-//	}
-
 
 	/**
 	 * 鏂规硶鎻忚堪: 璇诲彇澶氫釜鐐逛綅鐨勫��

--
Gitblit v1.9.3