| | |
| | | this.slave = slave; |
| | | } |
| | | |
| | | // // PLC读取条码数据处理方式, 1到6号扫码器---------------------- |
| | | // private StringBuffer barcodePlc = new StringBuffer(); |
| | | // |
| | | // public String getBarcodePlc() { |
| | | // return barcodePlc.toString(); |
| | | // } |
| | | // |
| | | // public void setBarcodePlc(String barcodePlc) { |
| | | // this.barcodePlc.delete(0, this.barcodePlc.length()); |
| | | // this.barcodePlc.append(barcodePlc); |
| | | // if(!Cools.isEmpty(barcodePlc)) { |
| | | // log.info("{}号条码器,检索数据:{}", slave.getId(), this.barcodePlc); |
| | | // JSONObject jsonObject = new JSONObject(); |
| | | // jsonObject.put("time", DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmss_F)); |
| | | // jsonObject.put("barcode", barcodePlc); |
| | | // if (OutputQueue.BARCODE.size() >= 32) { |
| | | // OutputQueue.BARCODE.poll(); |
| | | // } |
| | | // OutputQueue.BARCODE.offer(jsonObject); |
| | | // } |
| | | // } |
| | | // // PLC读取条码数据处理方式------------------------------ |
| | | |
| | | @Override |
| | | @SuppressWarnings("InfiniteLoopStatement") |
| | | public void run() { |