From 9a90543b32701590952806ed583347460bc04f76 Mon Sep 17 00:00:00 2001 From: jiang <1354748262@qq.com> Date: 星期一, 22 一月 2024 13:14:14 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/client/ClientHandler.java | 30 ++++++++++++++++++++++++------ 1 files changed, 24 insertions(+), 6 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 7ccd646..bdc2dc7 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 @@ -227,12 +227,30 @@ * @return {@link List<DataValue>} * @throws */ - public static List<DataValue> readValues(Set<String> keys){ - List<NodeId> nodeIdList=new ArrayList<>(500); - keys.forEach(e->{ - NodeId nodeId = new NodeId(2, e); - nodeIdList.add(nodeId); - }); +// 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; +// } + + + /** + * 鏂规硶鎻忚堪: 璇诲彇澶氫釜鐐逛綅鐨勫�� + * + * @param nodeIdList 鐐逛綅闆嗗悎 + * @return {@link List<DataValue>} + * @throws + */ + public static List<DataValue> readValues(List<NodeId> nodeIdList){ try { List<DataValue> dataValues=client.readValues(0.0, TimestampsToReturn.Both,nodeIdList).get(); return dataValues; -- Gitblit v1.9.3