| | |
| | | command.setTaskMode1(RgvTaskModeType.FETCH_PUT); // 任务模式: 取放货 |
| | | command.setSourceStaNo1(param.getSourceStaNo1()); // 源站 |
| | | command.setDestinationStaNo1(param.getStaNo1()); // 目标站 |
| | | command.setAckFinish2((short) 0); // 任务完成确认位 |
| | | command.setTaskNo2((short) 0); // 工作号 |
| | | command.setTaskMode2(RgvTaskModeType.FETCH_PUT); // 任务模式: 取放货 |
| | | command.setSourceStaNo2(param.getSourceStaNo2()); // 源站 |
| | | command.setDestinationStaNo2(param.getStaNo2()); // 目标站 |
| | | // command.setAckFinish2((short) 0); // 任务完成确认位 |
| | | // command.setTaskNo2((short) 0); // 工作号 |
| | | // command.setTaskMode2(RgvTaskModeType.FETCH_PUT); // 任务模式: 取放货 |
| | | // command.setSourceStaNo2(param.getSourceStaNo2()); // 源站 |
| | | // command.setDestinationStaNo2(param.getStaNo2()); // 目标站 |
| | | command.setCommand((short) 0); |
| | | |
| | | return rgvControl(command)? R.ok(): R.error(); |
| | |
| | | Command.setCommand((short) 0); // 任务完成确认位 |
| | | // 延时发送 |
| | | Thread.sleep(1000L); |
| | | if (MessageQueue.offer(SlaveType.Rgv, rgv.getId(), new Task(2, Command))) { |
| | | if (MessageQueue.offer(SlaveType.Rgv, rgv.getId(), new Task(4, Command))) { |
| | | return R.ok(); |
| | | } else { |
| | | throw new CoolException("命令下发失败"); |
| | |
| | | if (rgvProtocol == null) { |
| | | throw new CoolException("RGV不在线"); |
| | | } |
| | | if (MessageQueue.offer(SlaveType.Rgv, rgv.getId(), new Task(2, command))) { |
| | | if (MessageQueue.offer(SlaveType.Rgv, rgv.getId(), new Task(4, command))) { |
| | | return true; |
| | | } else { |
| | | throw new CoolException("命令下发失败"); |