| | |
| | | return; |
| | | } |
| | | |
| | | if (System.currentTimeMillis() - shuttleProtocol.getDeviceDataLog() > 1000 * 5) { |
| | | if (System.currentTimeMillis() - shuttleProtocol.getDeviceDataLog() > 1000 * 1) { |
| | | if (this.originDeviceData != null) { |
| | | //采集时间超过5s,保存一次数据记录 |
| | | //保存数据记录 |
| | |
| | | if (System.currentTimeMillis() - shuttleProtocol.getLastOnlineTime() > 1000 * 60) { |
| | | //最后一次上线时间超过60s,认定离线 |
| | | this.shuttleProtocol.setProtocolStatus(ShuttleProtocolStatusType.OFFLINE); |
| | | OutputQueue.SHUTTLE.offer(MessageFormat.format("【{0}】四向穿梭车离线了1 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort())); |
| | | } |
| | | return; |
| | | } |
| | |
| | | if (System.currentTimeMillis() - shuttleProtocol.getLastOnlineTime() > 1000 * 60) { |
| | | //最后一次上线时间超过60s,认定离线 |
| | | this.shuttleProtocol.setProtocolStatus(ShuttleProtocolStatusType.OFFLINE); |
| | | OutputQueue.SHUTTLE.offer(MessageFormat.format("【{0}】四向穿梭车离线了2 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort())); |
| | | } |
| | | OutputQueue.SHUTTLE.offer(MessageFormat.format("【{0}】四向穿梭车Socket状态信息失败 ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort())); |
| | | }else { |
| | |
| | | data.put("xp", xp); |
| | | data.put("yp", yp); |
| | | data.put("z", z); |
| | | data.put("x", mapNode.getXBase()); |
| | | data.put("y", mapNode.getYBase()); |
| | | data.put("x", mapNode.getYBase()); |
| | | data.put("y", mapNode.getXBase()); |
| | | path.add(data); |
| | | } |
| | | |
| | |
| | | location.put("xp", row); |
| | | location.put("yp", bay); |
| | | location.put("z", lev); |
| | | location.put("x", mapNode.getXBase()); |
| | | location.put("y", mapNode.getYBase()); |
| | | location.put("x", mapNode.getYBase()); |
| | | location.put("y", mapNode.getXBase()); |
| | | |
| | | HashMap<String, Object> body = new HashMap<>(); |
| | | body.put("responseType", "init");//复位 |