| | |
| | | import com.zy.asrs.entity.DeviceConfig; |
| | | import com.zy.core.News; |
| | | import com.zy.core.cache.OutputQueue; |
| | | import com.zy.core.enums.CrnTaskModeType; |
| | | import com.zy.core.model.CommandResponse; |
| | | import com.zy.core.model.command.CrnCommand; |
| | | import com.zy.core.network.api.ZyCrnConnectApi; |
| | |
| | | return response; |
| | | } |
| | | |
| | | Integer commandTaskNo = command.getTaskNo(); |
| | | Integer commandTaskMode = command.getTaskMode(); |
| | | if (commandTaskMode.equals(CrnTaskModeType.RESET.id)) { |
| | | commandTaskNo = 0; |
| | | commandTaskMode = 0; |
| | | } |
| | | |
| | | short[] array = new short[9]; |
| | | array[0] = command.getAckFinish().shortValue(); |
| | | array[1] = command.getTaskNo().shortValue(); |
| | | array[2] = command.getTaskMode().shortValue(); |
| | | array[1] = commandTaskNo.shortValue(); |
| | | array[2] = commandTaskMode.shortValue(); |
| | | array[3] = command.getSourcePosX().shortValue(); |
| | | array[4] = command.getSourcePosY().shortValue(); |
| | | array[5] = command.getSourcePosZ().shortValue(); |
| | |
| | | } |
| | | writeConfirmIdx++; |
| | | Thread.sleep(200); |
| | | } while (writeConfirmIdx < 5); |
| | | } while (writeConfirmIdx < 1); |
| | | |
| | | if (!commandConfirmResult) { |
| | | News.error("堆垛机写入确认数据失败 ===>> [id:{}]", command.getCrnNo()); |
| | |
| | | if (resultAck.IsSuccess) { |
| | | News.info("库位橙色按钮命令下发[locNo:{}] >>>>> {}", command.getLocNo(), command.getValue()); |
| | | } else { |
| | | News.error("库位白色灯命令下发失败[locNo:{}] >>>>> {}", command.getLocNo(), command.getValue()); |
| | | News.error("库位橙色按钮命令下发失败[locNo:{}] >>>>> {}", command.getLocNo(), command.getValue()); |
| | | } |
| | | return response; |
| | | } catch (Exception e) { |