| | |
| | | package com.zy.core.thread; |
| | | |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.core.Slave; |
| | | import com.zy.core.ThreadHandler; |
| | | import com.zy.core.cache.OutputQueue; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | import java.net.Socket; |
| | | import java.net.SocketAddress; |
| | | import java.net.SocketTimeoutException; |
| | | import java.text.MessageFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 条码扫描仪线程 |
| | |
| | | if (!Cools.isEmpty(s)) { |
| | | barcode = new String(read); |
| | | log.info("{}号条码器,检索数据:{}", slave.getId(), this.barcode); |
| | | OutputQueue.CRN.offer(MessageFormat.format("【{0}】堆垛机plc连接失败!!! ===>> [id:{1}] [ip:{2}] [port:{3}] ", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort())); |
| | | } |
| | | } |
| | | Thread.sleep(100); |