| | |
| | | /** |
| | | * 获取提升机解锁命令 |
| | | */ |
| | | private LiftCommand getUnlockCommand(Short liftNo) { |
| | | public LiftCommand getUnlockCommand(Short liftNo) { |
| | | LiftCommand command = new LiftCommand(); |
| | | command.setRun((short) 0); |
| | | command.setLiftNo(liftNo); |
| | |
| | | /** |
| | | * 获取复位命令 |
| | | */ |
| | | private LiftCommand getResetCommand() { |
| | | public LiftCommand getResetCommand() { |
| | | LiftCommand command = new LiftCommand(); |
| | | command.setRun((short) 0); |
| | | command.setLiftLock(false); |
| | |
| | | /** |
| | | * 获取提升机上升下降命令 |
| | | */ |
| | | private LiftCommand getLiftUpDownCommand(Short lev) { |
| | | public LiftCommand getLiftUpDownCommand(Short lev) { |
| | | LiftCommand command = new LiftCommand(); |
| | | command.setRun((short) 1);//升降 |
| | | command.setDistPosition(lev); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取提升机上升下降命令 |
| | | */ |
| | | public LiftCommand getLiftUpDownCommand(Short liftNo, Short taskNo, Short lev) { |
| | | LiftCommand command = new LiftCommand(); |
| | | command.setRun((short) 1);//升降 |
| | | command.setLiftNo(liftNo);//提升机号 |
| | | command.setTaskNo(taskNo);//任务号 |
| | | command.setDistPosition(lev);//目标楼层1层 |
| | | command.setLiftLock(true);//锁定提升机 |
| | | return command; |
| | | } |
| | | |
| | | /** |
| | | * 获取提升机转动命令,direction:1=》有货正转,2=》有货反转 |
| | | */ |
| | | private LiftCommand getLiftTurnCommand(Integer direction) { |
| | | public LiftCommand getLiftTurnCommand(Integer direction) { |
| | | LiftCommand command = new LiftCommand(); |
| | | command.setRun(direction == 1 ? (short) 6 : (short) 3); |
| | | return command; |
| | | } |
| | | |
| | | /** |
| | | * 获取提升机转动命令,direction:1=》有货正转,2=》有货反转 |
| | | */ |
| | | public LiftCommand getLiftTurnCommand(Short liftNo, Short taskNo, Integer direction) { |
| | | LiftCommand command = new LiftCommand(); |
| | | command.setRun(direction == 1 ? (short) 6 : (short) 3); |
| | | command.setLiftNo(liftNo);//提升机号 |
| | | command.setTaskNo(taskNo);//任务号 |
| | | command.setLiftLock(true);//锁定提升机 |
| | | return command; |
| | | } |
| | | |
| | | /** |
| | | * 初始化提升机 |
| | | */ |
| | | private void initLift() { |