| | |
| | | |
| | | @Override |
| | | public ShuttleProtocol getStatus() { |
| | | return this.shuttleProtocol; |
| | | return this.shuttleProtocol.clone(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean isDeviceIdle() { |
| | | if (this.shuttleProtocol.getDeviceStatus() == null |
| | | || this.shuttleProtocol.getPakMk() == null |
| | | || this.shuttleProtocol.getErrorCode() == null |
| | | ) { |
| | | return false; |
| | | } |
| | | |
| | | boolean res = (this.shuttleProtocol.getDeviceStatus() == 3 || this.shuttleProtocol.getDeviceStatus() == 11) |
| | | && this.shuttleProtocol.getPakMk() |
| | | && this.shuttleProtocol.getErrorCode().equals("0") |
| | | ; |
| | | return res; |
| | | } |
| | | |
| | | @Override |
| | | public boolean isRequireCharge() { |
| | | if (this.shuttleProtocol.getDeviceStatus() == null |
| | | || this.shuttleProtocol.getPakMk() == null |
| | |
| | | return path; |
| | | } |
| | | List<NavigateNode> nodes = redisCommand.getAssignCommand().getNodes();//穿梭车预计路径 |
| | | if (nodes == null) { |
| | | return path; |
| | | } |
| | | if (!nodes.isEmpty()) { |
| | | path.addAll(nodes); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public synchronized boolean setProtocolStatus(ShuttleProtocolStatusType status) { |
| | | this.shuttleProtocol.setProtocolStatus(status); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public synchronized boolean setSyncTaskNo(Integer taskNo) { |
| | | this.shuttleProtocol.setSyncTaskNo(taskNo); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public synchronized boolean setPakMk(boolean pakMk) { |
| | | this.shuttleProtocol.setPakMk(pakMk); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public ShuttleCommand getMoveCommand(Integer taskNo, String startCodeNum, String distCodeNum, Integer allDistance, Integer runDirection, Integer runSpeed) { |
| | | HashMap<String, Object> body = new HashMap<>(); |
| | | body.put("messageName", "runOrder"); |