|
|
@ -185,8 +185,11 @@ public class DeviceOpcProtocolRunable implements Runnable { |
|
|
|
} |
|
|
|
} while (ObjectUtil.equal(value, his));//如果两次的值相等,不走下面的代码
|
|
|
|
|
|
|
|
log.info("如果两次的值相等,不走下面的代码"); |
|
|
|
|
|
|
|
OpcItemDto itemDto = this.getItem(item.getId()); |
|
|
|
if (itemDto.getNeed_log() != null && itemDto.getNeed_log()) { |
|
|
|
// if (itemDto.getNeed_log() != null && itemDto.getNeed_log()) {
|
|
|
|
if (true) { |
|
|
|
StringBuilder sb = new StringBuilder(); |
|
|
|
//设备的ITEM项
|
|
|
|
List<String> relate_items = itemDto.getRelate_items(); |
|
|
@ -203,14 +206,13 @@ public class DeviceOpcProtocolRunable implements Runnable { |
|
|
|
} |
|
|
|
//设置值
|
|
|
|
accessor_value.setValue(item.getId(), value); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
System.out.println("opc线程停止。。。"); |
|
|
|
log.info("opc线程停止。。。"); |
|
|
|
return; |
|
|
|
} catch (Exception var30) { |
|
|
|
if (!DeviceOpcSynchronizeAutoRun.isRun) { |
|
|
|
System.out.println("opc线程停止2。。。"); |
|
|
|
log.info("opc线程停止2。。。"); |
|
|
|
if (server != null) { |
|
|
|
try { |
|
|
|
server.disconnect(); |
|
|
|