From b4d06c541cf78cff02b74c8da53738098fa98b8c Mon Sep 17 00:00:00 2001 From: wangs <546428999@qq.com> Date: Mon, 21 Aug 2023 18:36:20 +0800 Subject: [PATCH] =?UTF-8?q?rev=20opc=E8=AF=BB=E5=8F=96=E6=97=B6=E4=B8=8D?= =?UTF-8?q?=E5=BB=BA=E7=AB=8B=E6=96=B0=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java b/wcs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java index df82237c..27145a66 100644 --- a/wcs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java +++ b/wcs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceOpcProtocolRunable.java @@ -83,6 +83,7 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC private void runOld() { + OpcServerService opcServerService = SpringContextHolder.getBean(OpcServerService .class); while (true) { start: try { @@ -95,10 +96,10 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC server.disconnect(); log.trace("清理server..."); } - this.server = OpcServerUtl.getServerWithOutException(this.OpcServer.getOpc_host(), this.OpcServer.getCls_id(), this.OpcServer.getUser(), this.OpcServer.getPassword(), this.OpcServer.getDomain()); this.server.addStateListener(this); group = this.server.addGroup(); +// group =opcServerService.getServer(this.getOpcGroupID()); List itemsString = new ArrayList(); Iterator var3 = this.protocols.iterator();