|  |  | 
 |  |  |      * 获取托盘顶升命令 | 
 |  |  |      * @param lift 1顶升,2下降 | 
 |  |  |      */ | 
 |  |  |     private ShuttleCommand getPalletCommand(Short lift) { | 
 |  |  |     public ShuttleCommand getPalletCommand(Short lift) { | 
 |  |  |         ShuttleCommand command = new ShuttleCommand(); | 
 |  |  |         command.setCommandWord((short) 2); | 
 |  |  |         command.setStartCodeNum((short) 0); | 
 |  |  | 
 |  |  |      * 正常移动命令 | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     private ShuttleCommand getMoveCommand(Short startCodeNum, Short distCodeNum, Integer startToDistDistance, Short runDirection) { | 
 |  |  |     public ShuttleCommand getMoveCommand(Short startCodeNum, Short distCodeNum, Integer startToDistDistance, Short runDirection) { | 
 |  |  |         ShuttleCommand command = new ShuttleCommand(); | 
 |  |  |         command.setCommandWord((short) 1); | 
 |  |  |         command.setStartCodeNum(startCodeNum); | 
 |  |  | 
 |  |  |      * 强制移动命令 | 
 |  |  |      * @param direction 移动方向 1左移,2右移,3前移,4后移 | 
 |  |  |      */ | 
 |  |  |     private ShuttleCommand getForceMoveCommand(Short direction) { | 
 |  |  |     public ShuttleCommand getForceMoveCommand(Short direction) { | 
 |  |  |         ShuttleCommand command = new ShuttleCommand(); | 
 |  |  |         command.setCommandWord((short) 3); | 
 |  |  |         command.setStartCodeNum((short) 0); | 
 |  |  | 
 |  |  |     /** | 
 |  |  |      * 状态复位命令 | 
 |  |  |      */ | 
 |  |  |     private ShuttleCommand getResetCommand() { | 
 |  |  |     public ShuttleCommand getResetCommand() { | 
 |  |  |         ShuttleCommand command = new ShuttleCommand(); | 
 |  |  |         command.setCommandWord((short) 6); | 
 |  |  |         command.setStartCodeNum((short) 0); | 
 |  |  | 
 |  |  |      * 获取寻库位命令 | 
 |  |  |      * @param direction 1:向正方向(左)寻库位,2:向负方向(右)寻库位,3:向负方向(后)寻库位,4:向正方向(前)寻库位 | 
 |  |  |      */ | 
 |  |  |     private ShuttleCommand getFindLocCommand(Short direction, Integer startToDistance, Short runSpeed) { | 
 |  |  |     public ShuttleCommand getFindLocCommand(Short direction, Integer startToDistance, Short runSpeed) { | 
 |  |  |         ShuttleCommand command = new ShuttleCommand(); | 
 |  |  |         command.setCommandWord((short) 4); | 
 |  |  |         command.setRunDirection(direction); | 
 |  |  | 
 |  |  |      * 获取寻库位命令,默认移动距离3000,运行速度1000 | 
 |  |  |      * @param direction 1:向正方向(左)寻库位,2:向负方向(右)寻库位,3:向负方向(后)寻库位,4:向正方向(前)寻库位 | 
 |  |  |      */ | 
 |  |  |     private ShuttleCommand getFindLocCommand(Short direction) { | 
 |  |  |     public ShuttleCommand getFindLocCommand(Short direction) { | 
 |  |  |         return getFindLocCommand(direction, 3000, (short) 1000); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 获取充电开关命令 | 
 |  |  |      */ | 
 |  |  |     private ShuttleCommand getChargeSwitchCommand() { | 
 |  |  |     public ShuttleCommand getChargeSwitchCommand() { | 
 |  |  |         ShuttleCommand command = new ShuttleCommand(); | 
 |  |  |         command.setCommandWord((short) 8); | 
 |  |  |         command.setIOControl((short) 4); | 
 |  |  | 
 |  |  |         return command; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * charge:1=>开始充电,2=>断开充电 | 
 |  |  |      */ | 
 |  |  |     public ShuttleCommand getChargeSwitchCommand(Short charge) { | 
 |  |  |         ShuttleCommand command = new ShuttleCommand(); | 
 |  |  |         command.setCommandWord((short) 5);//充电 | 
 |  |  |         command.setShuttleNo(shuttleProtocol.getShuttleNo()); | 
 |  |  |         command.setChargeSwitch(charge);//开始充电 | 
 |  |  |         command.setCommandEnd((short) 1); | 
 |  |  |         return command; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /******************************************************************************************/ | 
 |  |  |     /**************************************** 测试专用 *****************************************/ | 
 |  |  |     /*****************************************************************************************/ |