| | |
| | | |
| | | //设备读取 |
| | | Thread readThread = new Thread(() -> { |
| | | while (true) { |
| | | while (!Thread.currentThread().isInterrupted()) { |
| | | try { |
| | | readStatus(); |
| | | Thread.sleep(200); |
| | |
| | | }); |
| | | readThread.start(); |
| | | |
| | | while (true) { |
| | | while (!Thread.currentThread().isInterrupted()) { |
| | | try { |
| | | int step = 1; |
| | | Task task = MessageQueue.poll(SlaveType.Devp, deviceConfig.getDeviceNo()); |
| | |
| | | } |
| | | |
| | | if(statusList.isEmpty()) { |
| | | BasDevpService basDevpService = SpringUtils.getBean(BasDevpService.class); |
| | | BasDevpService basDevpService = null; |
| | | try { |
| | | basDevpService = SpringUtils.getBean(BasDevpService.class); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | if (basDevpService == null) { |
| | | return; |
| | | } |